/* =========================================
   WCAG AA Color System (Corporate Palette)
========================================= */

:root {
  --color-purple: #775ED3;
  --color-lilac: #DACDF2;
  --color-white: #F7F2F9;
  --color-navy: #0A1128;
  --color-yellow: #EFE745;

  --text-dark: #0A1128;
  --text-light: #FFFFFF;
}

/* Base page styling */
body {
	margin: 0;
  background-color: var(--color-white);
  color: var(--text-dark);
  overflow-x: hidden;
}

/* Global image styling */
.logo-img {
  width: 100%;
  height: auto;
  display: block;
}

/* Header logo (top) */
.logo-header {
  max-width: 200px;
  margin: 5px auto 0;
}

/* Footer logo (bottom) */
.logo-footer {
  max-width: 200px;
  margin: 20px auto 0;
}

/* Layout helpers */
.progress-steps {
  display: flex;
  justify-content: center;
  align-items: stretch;
  flex-wrap: nowrap;
  list-style: none;
  padding: 0;
  margin: 0 auto;
}

.progress-step {
  flex: 0 0 120px;
  text-align: center;
  padding: 0.75rem 0.5rem;
  background-color: var(--color-lilac);
  color: var(--text-dark);
  border-right: 1px solid rgba(0,0,0,0.1);
}

.progress-step:last-child {
  border-right: none;
}

.progress-step:first-child {
  border-top-left-radius: 8px;
  border-bottom-left-radius: 8px;
}

.progress-step:last-child {
  border-top-right-radius: 8px;
  border-bottom-right-radius: 8px;
}

.progress-step.is-active {
  background-color: var(--color-purple);
  color: var(--text-light);
  font-weight: 600;
}

.progress-step.is-complete {
  background-color: var(--color-lilac);
  color: var(--text-dark);
  font-weight: 400;
}

.step-label {
  display: block;
  font-size: 0.7rem;
}

.step-number {
  display: block;
  font-size: 1.1rem;
  font-weight: 600;
}

.step-name {
  display: block;
  font-size: 0.75rem;
}

/* =========================
   GLOBAL UTILITIES
========================= */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}


/* ==============================================
    THIS SECTION IS ONLY FOR MOBILE VIEW STYLING
================================================= */
@media (max-width: 600px) {

  .progress-step {
    flex: 0 0 70px;
    padding: 0.5rem 0.25rem;
  }

  .step-label {
    font-size: 0.6rem;
  }

  .step-number {
    font-size: 0.9rem;
  }

  .step-name {
    font-size: 0.6rem;
  }
  
  body.step4 .form-row {
    grid-template-columns: 1fr;
  }

}

@media (max-width: 600px) {
  body.step2 .layout-container {
    padding-left: 10px;
    padding-right: 10px;
  }

  body.step2 .info-columns {
    grid-template-columns: 1fr !important;
  }

  body.step2 .button-row {
    flex-direction: column;
    gap: 10px;
  }

  body.step2 .button-row .btn {
    width: 100%;
  }
}

@media (max-width: 600px) {

  body.step3 .info-columns {
    grid-template-columns: 1fr !important;
  }

}

@media (max-width: 600px) {

  body.step4 .form-section .row {
    flex-direction: column;
  }

  body.step4 .form-section .col-md-6,
  body.step4 .form-section .col-md-9,
  body.step4 .form-section .col-md-3 {
    width: 100%;
  }

}


/* =========================
   INDEX PAGE SCOPED STYLES
========================= */

/* Headers / Cards */
body.index .card-header {
  background-color: var(--color-purple) !important;
  color: var(--text-light) !important;
}

/* Primary button */
body.index .btn-primary {
  background-color: var(--color-navy) !important;
  border-color: var(--color-navy) !important;
  color: var(--text-light) !important;
  font-weight: 600;
}

body.index .btn-primary:hover,
body.index .btn-primary:focus {
  background-color: var(--color-yellow) !important;
  border-color: var(--color-yellow) !important;
  color: var(--color-navy) !important;
}

body.index .btn-primary:focus {
  outline: 3px solid var(--color-yellow);
  outline-offset: 2px;
}

/* Secondary button */
body.index .btn-outline-secondary {
  border-color: var(--color-navy);
  color: var(--color-navy);
}

body.index .btn-outline-secondary:hover {
  background-color: var(--color-navy);
  color: var(--text-light);
}

/* Links */
body.index .text-primary {
  color: var(--color-purple) !important;
}

/* Backgrounds */
body.index .bg-light {
  background-color: var(--color-lilac) !important;
}

/* Muted text */
body.index .text-muted {
  color: #4a4a4a !important;
}

/* Layout */
body.index .layout-container {
  max-width: 650px;
  margin-left: auto;
  margin-right: auto;
}

/* Progress */
body.index .progress-nav {
  margin-top: 0.5rem;
  margin-bottom: 10px;
}

/* Form */
body.index .form-label {
  font-weight: 600;
  color: var(--color-navy);
  margin-bottom: 0.25rem;
}

body.index .form-control {
  background-color: #ffffff;
  color: var(--text-dark);
}

body.index .form-control::placeholder {
  color: #6c757d;
}

/* INDEX: Improved OR divider */
body.index .or-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 0.5rem 0; /* tightened spacing */
}

body.index .or-divider::before,
body.index .or-divider::after {
  content: "";
  flex: 1;
  border-bottom: 1px solid rgba(10, 17, 40, 0.25); /* navy toned line */
}

body.index .or-divider span {
  padding: 0 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-navy);
  background-color: #ffffff; /* ensures clean break over line */
}

/* Errors */
body.index .error-text {
  color: #b00020;
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

body.index .card-body {
  padding: 1.25rem;
}

body.index #search-button {
	margin-top: .5rem;
}

body.index .mb-3 {
  margin-bottom: 0.75rem !important;
}

body.index .mb-4 {
  margin-bottom: 0.25rem !important;
}

/* INDEX: tighten space above Search button ONLY */
body.index .card-body > .text-center {
  margin-top: 0.25rem;
}

body.index .progress-nav {
  margin-top: 0.25rem;
  margin-bottom: 6px;
}

body.index .card-body {
  padding: 1rem;
}

body.index .layout-container .card {
  margin-top: 0;
}

body.index .layout-container > * + * {
  margin-top: 10px;
}

body.index .text-strong {
  color: var(--color-navy) !important;
  font-weight: 600;
}

body.index .card-body {
  background-color: #ffffff;
}

body.index .form-control {
  border: 1px solid #6c757d;
}

body.index .form-control:focus {
  border: 2px solid var(--color-navy);
}

body.index .card-header h2 {
  font-size: 1.5rem;   /* ~24px */
  line-height: 1.2;
  margin: 0;
}

/* =========================
   STEP 2 PAGE STYLES
========================= */

/* Card header */
body.step2 .card-header {
  background-color: var(--color-purple) !important;
  color: var(--text-light) !important;
}

/* Layout width */
body.step2 .layout-container {
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

/* Spacing between sections */
body.step2 .layout-container > * + * {
  margin-top: 10px;
}

/* Table cleanup */
body.step2 .table {
  margin-bottom: 0;
}

/* Balance row alignment tweak */
body.step2 .card-body.d-flex {
  gap: 10px;
}

/* Button spacing */
body.step2 .d-flex.mt-2 {
  margin-top: 10px !important;
}

body.step2 .layout-container + .layout-container {
  margin-top: 10px;
}

body.step2 .info-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

body.step2 .info-col {
  display: flex;
  flex-direction: column;
}

body.step2 .info-section {
  background: rgba(0,0,0,0.03);
  padding: 12px;
  border-radius: 6px;
}

body.step2 .info-header {
  font-weight: 600;
  margin-bottom: 8px;
  padding-bottom: 4px;
  border-bottom: 2px solid var(--color-purple);
  text-transform: uppercase;
  font-size: 0.8rem;
}

body.step2 .balance-row {
  display: flex;
  justify-content: center;
}

body.step2 .balance-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

body.step2 .balance-label {
  font-weight: 600;
  text-transform: uppercase;
}

body.step2 .balance-amount {
  font-size: 1.25rem;
  font-weight: 700;
}

body.step2 .button-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
}

body.step2 .button-row .btn {
  min-width: 140px;
  height: 42px;
}

body.step2 .btn-start {
  background-color: var(--color-yellow);
  color: var(--color-navy);
  border: none;
  font-weight: 600;
}

body.step2 .btn-start:hover,
body.step2 .btn-start:focus {
  background-color: var(--color-purple);
  color: var(--text-light);
}

body.step2 .btn-next {
  background-color: var(--color-navy);
  color: var(--text-light);
  border: none;
  font-weight: 600;
}

body.step2 .btn-next:hover,
body.step2 .btn-next:focus {
  background-color: var(--color-purple);
  color: var(--text-light);
}

body.step2 dl {
  margin: 0;
}

body.step2 dt {
  font-weight: 600;
}

body.step2 dd {
  margin: 0 0 8px 0;
}

body.step2 button:focus,
body.step2 .btn:focus,
body.step2 a:focus {
  outline: 3px solid var(--color-yellow);
  outline-offset: 2px;
}

/* =========================
   STEP 3 PAGE STYLES
========================= */

body.step3 .layout-container {
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

/* =========================
   STEP 3 PAGE STYLES
========================= */

body.step3 .layout-container {
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

body.step3 .layout-container > * + * {
  margin-top: 10px;
}

/* Card header */
body.step3 .card-header {
  background-color: var(--color-purple) !important;
  color: var(--text-light) !important;
}

/* Section styling (matches step2) */
body.step3 .info-section {
  background: #ffffff;
  padding: 12px;
  border-radius: 6px;
  border: 1px solid rgba(0,0,0,0.08);
}

/* Optional: add section headers if desired later */
body.step3 .info-header {
  font-weight: 600;
  margin-bottom: 8px;
  padding-bottom: 4px;
  border-bottom: 2px solid var(--color-purple);
  text-transform: uppercase;
  font-size: 0.8rem;
}

/* Buttons (align with design system) */
body.step3 .btn-success {
  background-color: var(--color-navy);
  border-color: var(--color-navy);
  color: var(--text-light);
  font-weight: 600;
}

body.step3 .btn-success:hover,
body.step3 .btn-success:focus {
  background-color: var(--color-purple);
  border-color: var(--color-purple);
}

body.step3 .btn-outline-primary {
  border-color: var(--color-navy);
  color: var(--color-navy);
}

body.step3 .btn-outline-primary:hover,
body.step3 .btn-outline-primary:focus {
  background-color: var(--color-purple);
  border-color: var(--color-purple);
  color: var(--text-light);
}

body.step3 .btn-outline-primary {
  margin-bottom: 10px;
  background-color: var(--color-yellow);
  border-color: var(--color-yellow);
  color: var(--color-navy);
  font-weight: 600;
}

body.step3 #productFees {
  font-size: 1.2rem;
  font-weight: 700;
}

body.step3 .info-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}

body.step3 .btn-success {
  min-width: 200px;
}

body.step3 form {
  display: flex;
  flex-direction: column;
}

body.step3 form .btn-success {
  align-self: flex-end;
}

body.step3 .info-col {
  display: flex;
  flex-direction: column;
}

body.step3 .layout-container .card {
  margin-top: 10px;
}

body.step3 .form-check-input {
  width: 18px;
  height: 18px;
  border: 2px solid var(--color-navy);
  cursor: pointer;
}

body.step3 .form-check-input:checked {
  background-color: var(--color-purple);
  border-color: var(--color-purple);
}

body.step3 .text-navy {
  color: var(--color-navy);
}

//* =========================
   STEP 4 – TIGHT FORM LAYOUT
========================= */

body.step4 .form-group-tight {
  display: flex;
  flex-direction: column;
  margin-bottom: 8px; /* tighter than default */
}

body.step4 .form-group-tight label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-navy);
  margin-bottom: 2px; /* key: keeps label "sitting" on input */
  line-height: 1.2;
}

body.step4 .form-group-tight .form-control {
  height: 38px; /* keeps consistency with CollectJS fields */
}

body.step4 #ccnumber,
body.step4 #ccexp,
body.step4 #cvv {
  height: 38px;
}

body.step4 .text-navy {
  color: var(--color-navy);
}

/* =========================
   STEP 4 – FOCUS STATES
========================= */

body.step4 input:focus,
body.step4 select:focus,
body.step4 textarea:focus,
body.step4 button:focus,
body.step4 .btn:focus,
body.step4 a:focus {
  outline: 3px solid var(--color-yellow);
  outline-offset: 2px;
  box-shadow: none !important;
}

/* =========================
   STEP 4 – CARD + SPACING
========================= */

/* A) Space above form card */
body.step4 .form-section {
  margin-top: 10px;
}

/* B) Improve card background contrast */
body.step4 .form-section {
  background-color: #ffffff; /* cleaner than current */
}

/* C) Add visible border radius */
body.step4 .form-section {
  border-radius: 8px;
}

/* F) Bottom padding inside card */
body.step4 .form-section {
  padding-bottom: 10px;
}

/* D) Add spacing above labels */
body.step4 .form-group-tight label {
  margin-top: 5px;
}

body.step4 .error-text {
  color: #b00020;
  font-size: 0.8rem;
  margin-top: 2px;
  min-height: 1em; /* prevents layout jump */
}

.skip-link {
  position: absolute;
  top: -40px;
  left: 10px;
  background: var(--color-navy);
  color: white;
  padding: 8px 12px;
  z-index: 1000;
  text-decoration: none;
}

.skip-link:focus {
  top: 10px;
  outline: 3px solid var(--color-yellow);
}

/* =========================
   STEP 4 – BUTTONS (FINAL)
========================= */

/* Primary (Submit) */
body.step4 .btn-primary {
  background-color: var(--color-navy);
  border-color: var(--color-navy);
  color: var(--text-light);
  font-weight: 600;
}

/* HOVER = PURPLE */
body.step4 .btn-primary:hover {
  background-color: var(--color-purple);
  border-color: var(--color-purple);
  color: var(--text-light);
}

/* FOCUS = YELLOW OUTLINE ONLY */
body.step4 .btn-primary:focus {
  outline: 3px solid var(--color-yellow);
  outline-offset: 2px;
  box-shadow: none;
}


/* Secondary (Clear Form) */
body.step4 .btn-secondary {
  background-color: var(--color-yellow);
  border-color: var(--color-yellow);
  color: var(--color-navy);
  font-weight: 600;
}

/* HOVER = PURPLE */
body.step4 .btn-secondary:hover {
  background-color: var(--color-purple);
  border-color: var(--color-purple);
  color: var(--text-light);
}

/* FOCUS = YELLOW OUTLINE */
body.step4 .btn-secondary:focus {
  outline: 3px solid var(--color-yellow);
  outline-offset: 2px;
  box-shadow: none;
}