/* ============================================================
   Apply page — 4-step wizard with summary sidebar
   ============================================================ */


/* ============================================================
   Progress bar — 4 steps with connecting line
   ============================================================ */

.apply-progress {
  background: var(--white);
  padding: 16px 0 40px;
  position: sticky;
  top: var(--header-h, 64px);
  z-index: 90;
  border-bottom: 1px solid var(--border);
}

@media (max-width: 767.98px) {
  .apply-progress { padding: 12px 0 20px; }
}

.apply-progress__steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  position: relative;
  max-width: 720px;
  margin: 0 auto;
}

/* Connecting line behind the circles */
.apply-progress__steps::before {
  content: "";
  position: absolute;
  top: 16px;
  left: 12.5%;
  right: 12.5%;
  height: 2px;
  background: var(--border);
  z-index: 0;
}

.apply-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  position: relative;
  z-index: 1;
}

.apply-step__circle {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: 50%;
  color: var(--text-muted);
  font-size: var(--fs-13);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  transition: background var(--dur) var(--ease),
              border-color var(--dur) var(--ease),
              color var(--dur) var(--ease);
}

.apply-step__num,
.apply-step__check { display: inline-block; }
.apply-step__check { width: 14px; height: 14px; display: none; }

.apply-step__label {
  font-size: var(--fs-12);
  font-weight: 600;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.3;
  transition: color var(--dur) var(--ease);
}

@media (max-width: 575.98px) {
  .apply-step__label { font-size: 11px; }
}

/* Active step */
.apply-step.is-active .apply-step__circle {
  background: var(--red);
  border-color: var(--red);
  color: var(--white);
}

.apply-step.is-active .apply-step__label {
  color: var(--ink);
}

/* Completed step */
.apply-step.is-done .apply-step__circle {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--white);
}

.apply-step.is-done .apply-step__num { display: none; }
.apply-step.is-done .apply-step__check { display: inline-block; }

.apply-step.is-done .apply-step__label { color: var(--ink); }


/* ============================================================
   Layout — form + aside sidebar
   ============================================================ */

.apply-section {
  background: var(--white);
  padding: 40px 0 64px;
}

@media (max-width: 767.98px) {
  .apply-section { padding: 24px 0 48px; }
}

.apply-section__inner {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 40px;
  align-items: start;
}

@media (max-width: 1023.98px) {
  .apply-section__inner { grid-template-columns: 1fr; gap: 32px; }
}


/* ============================================================
   Form panes — one visible at a time
   ============================================================ */

.apply-form { min-width: 0; }

.apply-pane {
  display: none;
  border: 0;
  padding: 0;
  margin: 0;
}

.apply-pane.is-active {
  display: block;
  animation: pane-in 280ms var(--ease);
}

@keyframes pane-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .apply-pane.is-active { animation: none; }
}


/* Pane header */
.apply-pane__legend {
  display: block;
  margin-bottom: 28px;
  width: 100%;
}

.apply-pane__eyebrow {
  display: block;
  font-size: var(--fs-11);
  font-weight: 600;
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 10px;
}

.apply-pane__title {
  font-size: clamp(22px, 2.4vw, 28px);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.25;
  color: var(--ink);
  margin-bottom: 8px;
}

.apply-pane__lede {
  font-size: var(--fs-14);
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 60ch;
}


/* ============================================================
   Form fields — inputs, labels, selects, textareas
   ============================================================ */

.apply-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

@media (max-width: 575.98px) {
  .apply-row { grid-template-columns: 1fr; gap: 14px; }
}

.apply-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.apply-label {
  font-size: var(--fs-12);
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.01em;
}

.apply-label__req { color: var(--red); }

.apply-input {
  width: 100%;
  padding: 11px 14px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-2);
  font-size: var(--fs-14);
  color: var(--ink);
  font-family: inherit;
  transition: border-color var(--dur-fast) var(--ease),
              box-shadow var(--dur-fast) var(--ease);
}

.apply-input:focus {
  outline: 0;
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(10, 10, 11, 0.06);
}

.apply-input.is-invalid {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(225, 25, 50, 0.10);
}

.apply-textarea {
  resize: vertical;
  min-height: 90px;
  line-height: 1.55;
}

select.apply-input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 16 16' xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%2356595E' stroke-width='1.6' stroke-linecap='round'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 14px;
  padding-right: 40px;
  cursor: pointer;
}


/* ============================================================
   Radio cards — for category + payment selection
   ============================================================ */

.apply-radio-grid {
  display: grid;
  gap: 12px;
  margin-bottom: 24px;
}

.apply-radio-grid--3 { grid-template-columns: repeat(3, 1fr); }
.apply-radio-grid--2 { grid-template-columns: repeat(2, 1fr); }

@media (max-width: 767.98px) {
  .apply-radio-grid--3 { grid-template-columns: 1fr; }
}

@media (max-width: 575.98px) {
  .apply-radio-grid--2 { grid-template-columns: 1fr; }
}

.apply-radio-card {
  position: relative;
  cursor: pointer;
}

.apply-radio-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  inset: 0;
  cursor: pointer;
}

.apply-radio-card__inner {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px 22px;
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: var(--r-3);
  transition: border-color var(--dur-fast) var(--ease),
              background var(--dur-fast) var(--ease),
              transform var(--dur) var(--ease);
}

.apply-radio-card:hover .apply-radio-card__inner {
  border-color: var(--ink-3);
}

.apply-radio-card input:checked ~ .apply-radio-card__inner {
  border-color: var(--red);
  background: rgba(225, 25, 50, 0.04);
}

.apply-radio-card input:focus-visible ~ .apply-radio-card__inner {
  box-shadow: 0 0 0 3px rgba(225, 25, 50, 0.15);
}

.apply-radio-card__icon {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--paper);
  border-radius: var(--r-2);
  color: var(--ink);
  margin-bottom: 4px;
  transition: background var(--dur-fast) var(--ease),
              color var(--dur-fast) var(--ease);
}

.apply-radio-card input:checked ~ .apply-radio-card__inner .apply-radio-card__icon {
  background: var(--red);
  color: var(--white);
}

.apply-radio-card__icon svg { width: 20px; height: 20px; }

.apply-radio-card__title {
  font-size: var(--fs-16);
  font-weight: 600;
  letter-spacing: -0.005em;
  color: var(--ink);
}

.apply-radio-card__desc {
  font-size: var(--fs-13);
  line-height: 1.5;
  color: var(--text-muted);
}

.apply-radio-card__meta {
  font-size: var(--fs-11);
  font-weight: 600;
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--red);
  margin-top: auto;
}

.apply-radio-card--small .apply-radio-card__inner {
  padding: 16px 18px;
}


/* Sub-section (revealed after category) */
.apply-subsection {
  margin-top: 16px;
}


/* Pill group (radio buttons as pills) */
.apply-pill-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.apply-pill {
  position: relative;
  cursor: pointer;
}

.apply-pill input[type="radio"] {
  position: absolute;
  opacity: 0;
  inset: 0;
  cursor: pointer;
}

.apply-pill span {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  font-size: var(--fs-13);
  font-weight: 500;
  color: var(--text-muted);
  transition: background var(--dur-fast) var(--ease),
              border-color var(--dur-fast) var(--ease),
              color var(--dur-fast) var(--ease);
}

.apply-pill:hover span { color: var(--ink); }

.apply-pill input:checked + span {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--white);
}


/* ============================================================
   Checkboxes (privacy / newsletter) — custom checkmark
   ============================================================ */

.apply-checks {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 24px 0 20px;
  padding: 18px 20px;
  background: var(--paper);
  border-radius: var(--r-3);
}

.apply-check {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  font-size: var(--fs-13);
  line-height: 1.5;
  color: var(--text-muted);
}

.apply-check input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.apply-check__mark {
  width: 20px;
  height: 20px;
  border: 1.5px solid var(--ink-3);
  border-radius: 5px;
  flex-shrink: 0;
  background: var(--white);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background var(--dur-fast) var(--ease),
              border-color var(--dur-fast) var(--ease);
  margin-top: 1px;
}

.apply-check__mark svg {
  width: 12px;
  height: 12px;
  color: var(--white);
  opacity: 0;
  transition: opacity var(--dur-fast) var(--ease);
}

.apply-check input:checked + .apply-check__mark {
  background: var(--red);
  border-color: var(--red);
}

.apply-check input:checked + .apply-check__mark svg { opacity: 1; }

.apply-check__text a {
  color: var(--ink);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.apply-check__text a:hover { color: var(--red); }


/* ============================================================
   Step 4 review summary
   ============================================================ */

.apply-review {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 28px;
  background: var(--paper);
  border-radius: var(--r-3);
  overflow: hidden;
}

.apply-review__group {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 16px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  font-size: var(--fs-13);
}

.apply-review__group:last-child { border-bottom: 0; }

@media (max-width: 575.98px) {
  .apply-review__group { grid-template-columns: 1fr; gap: 4px; }
}

.apply-review__label {
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.01em;
}

.apply-review__value {
  font-weight: 500;
  color: var(--ink);
  word-break: break-word;
}


/* ============================================================
   Step actions row (prev + next buttons)
   ============================================================ */

.apply-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

.apply-btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--border);
  transition: background var(--dur-fast) var(--ease),
              border-color var(--dur-fast) var(--ease);
}

.apply-btn-ghost:hover {
  background: var(--paper);
  border-color: var(--ink-3);
}

.apply-btn-ghost svg { width: 14px; height: 14px; }


/* ============================================================
   Sidebar — sticky summary + helpers
   ============================================================ */

.apply-aside {
  position: sticky;
  top: calc(var(--header-h, 64px) + 80px);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

@media (max-width: 1023.98px) {
  .apply-aside { position: static; }
}

.apply-aside__card {
  padding: 20px 22px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-3);
}

.apply-aside__card--summary {
  background: var(--ink);
  color: var(--white);
  border-color: var(--ink);
}

.apply-aside__card--help {
  background: var(--paper);
}

.apply-aside__eyebrow {
  font-size: var(--fs-11);
  font-weight: 600;
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.apply-aside__card--summary .apply-aside__eyebrow {
  color: rgba(255, 255, 255, 0.5);
}

.apply-aside__title {
  font-size: var(--fs-16);
  font-weight: 600;
  letter-spacing: -0.005em;
  line-height: 1.3;
  color: var(--ink);
}

.apply-aside__card--summary .apply-aside__title {
  color: var(--white);
}

.apply-aside__placeholder {
  font-size: var(--fs-13);
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 10px;
}

.apply-aside__details {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 16px;
}

.apply-aside__row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: var(--fs-13);
}

.apply-aside__row-label {
  color: rgba(255, 255, 255, 0.6);
}

.apply-aside__row-value {
  color: var(--white);
  font-weight: 600;
  text-align: right;
}

.apply-aside__row--price {
  padding: 14px 0 4px;
  margin-top: 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.24);
}

.apply-aside__row--price .apply-aside__row-value {
  font-size: var(--fs-16);
  color: var(--white);
}


/* What's included list */
.apply-aside__list {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.apply-aside__list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: var(--fs-13);
  line-height: 1.45;
  color: var(--ink-2, #1C1D21);
}

.apply-aside__list svg {
  width: 14px;
  height: 14px;
  color: var(--red);
  flex-shrink: 0;
  margin-top: 2px;
}


/* Help block */
.apply-aside__help-text {
  font-size: var(--fs-13);
  line-height: 1.55;
  color: var(--text-muted);
  margin: 10px 0 12px;
}

.apply-aside__phone {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: var(--fs-15, 0.9375rem);
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  font-variant-numeric: tabular-nums;
  padding: 8px 0;
  transition: color var(--dur-fast) var(--ease);
}

.apply-aside__phone:hover { color: var(--red); }

.apply-aside__phone svg { width: 16px; height: 16px; }

.apply-aside__hours {
  display: block;
  font-size: var(--fs-12);
  color: var(--text-faint);
  margin-top: 2px;
}
