.eila-form {
  max-width: var(--container-width, 1140px);
  margin: 0 auto;
  font-family: var(--font-body, 'Inter', sans-serif);
  color: var(--text-dark, #2b2b2b);
}

.eila-form .row {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -12px;
}

.eila-form .col-md-12,
.eila-form .col-md-6,
.eila-form .col-md-4 {
  padding: 0 12px;
  box-sizing: border-box;
}

.eila-form .col-md-12 { width: 100%; }
.eila-form .col-md-6  { width: 50%; }
.eila-form .col-md-4  { width: 33.3333%; }

/* Flat sections. This used to be a bordered, cream-filled fieldset, which
   nested a box inside the .card, inside which the .checkbox-group drew a third
   box and the inputs a fourth — four stacked outlines fighting each other.
   The .card already frames the form, so sections are now separated by
   whitespace and a single hairline rule instead of their own container. */
.eila-form .form-section {
  border: 0;
  padding: 0;
  margin: 0 0 32px;
}

.eila-form .form-section + .form-section {
  border-top: 1px solid var(--border-soft, #e4d9c0);
  padding-top: 32px;
}

/* Now a plain section heading. The negative margin and side padding existed
   to notch the legend into the fieldset border, which no longer exists. */
.eila-form .form-section legend {
  font-family: var(--font-heading, 'Poppins', sans-serif);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--navy, #1b2a4a);
  padding: 0;
  margin: 0 0 4px;
}

.eila-form .form-section .section-note {
  font-family: var(--font-body, 'Inter', sans-serif);
  font-weight: 400;
  font-size: 1rem;
  color: var(--text-muted, #6b6459);
}

.eila-form .field-group {
  margin-bottom: 20px;
}

.eila-form .field-group label {
  display: block;
  width: 100%;
}

.eila-form .label-bg {
  display: block;
  font-weight: 600;
  font-size: 1rem;
  color: var(--navy, #1b2a4a);
  margin-bottom: 6px;
}

.eila-form .label-bg.group-label {
  margin-bottom: 10px;
}

.eila-form .red {
  color: var(--orange-dark, #b8661f);
}

.eila-form input.field-format,
.eila-form select.field-format,
.eila-form textarea.field-format {
  width: 100%;
  font-family: var(--font-body, 'Inter', sans-serif);
  font-size: 1rem;
  color: var(--text-dark, #2b2b2b);
  background: var(--white, #ffffff);
  border: 1px solid var(--border-soft, #e4d9c0);
  border-radius: 6px;
  padding: 11px 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.eila-form textarea.field-format {
  min-height: 60px !important;
  resize: vertical;
}

.eila-form input.field-format:focus,
.eila-form select.field-format:focus,
.eila-form textarea.field-format:focus {
  outline: none;
  border-color: var(--orange, #d47b2e);
  box-shadow: 0 0 0 3px rgba(212, 123, 46, 0.15);
}

.eila-form input.field-format::placeholder,
.eila-form textarea.field-format::placeholder {
  color: #a39c8d;
}

.eila-form input.field-format.wpcf7-not-valid,
.eila-form select.field-format.wpcf7-not-valid,
.eila-form textarea.field-format.wpcf7-not-valid {
  border-color: #c0392b;
}

/* Borderless — the options are already visually grouped by their label above
   and the surrounding whitespace; an outline here just added another box. */
.eila-form .checkbox-group {
  background: transparent;
  border: 0;
  padding: 0;
}

.eila-form span.wpcf7-list-item {
  display: block;
  margin: 0 0 10px !important;
}

.eila-form span.wpcf7-list-item:last-child {
  margin-bottom: 0 !important;
}

.eila-form span.wpcf7-list-item label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
}

.eila-form span.wpcf7-list-item input[type="checkbox"],
.eila-form span.wpcf7-list-item input[type="radio"] {
  width: 18px;
  height: 18px;
  accent-color: var(--orange, #d47b2e);
  flex-shrink: 0;
}

.eila-form .wizard-progress {
  margin-bottom: 32px;
}

.eila-form .wizard-progress-bar {
  position: relative;
  height: 6px;
  background: var(--border-soft, #e4d9c0);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 18px;
}

.eila-form .wizard-progress-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  background: var(--orange, #d47b2e);
  border-radius: 999px;
  transition: width 0.35s ease;
}

.eila-form .wizard-progress-steps {
  display: flex;
  justify-content: space-between;
  list-style: none;
  margin: 0;
  padding: 0;
}

.eila-form .wizard-progress-step {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body, 'Inter', sans-serif);
  font-size: 1rem;
  color: var(--text-muted, #6b6459);
}

.eila-form .wizard-progress-step .step-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border-radius: 50%;
  background: var(--border-soft, #e4d9c0);
  color: var(--text-muted, #6b6459);
  font-weight: 600;
  font-size: 1rem;
  transition: background 0.25s ease, color 0.25s ease;
}

.eila-form .wizard-progress-step .step-title {
  white-space: nowrap;
}

.eila-form .wizard-progress-step.is-active {
  color: var(--navy, #1b2a4a);
}

.eila-form .wizard-progress-step.is-active .step-number {
  background: var(--orange, #d47b2e);
  color: var(--white, #ffffff);
}

.eila-form .wizard-progress-step.is-complete .step-number {
  background: var(--navy, #1b2a4a);
  color: var(--white, #ffffff);
}

.eila-form .wizard-step {
  display: none;
}

.eila-form .wizard-step.is-active {
  display: block;
  animation: eila-wizard-fade-in 0.25s ease;
}

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

/* Kept as a callout — this one SHOULD stand out, since it carries the deposit
   amount. A solid cream panel with an orange accent edge reads as emphasis;
   the old dashed outline read as another nested container. */
.eila-form .fee-note {
  background: var(--cream-light, #f8f3e8);
  border: 0;
  border-left: 4px solid var(--orange, #d47b2e);
  border-radius: 0 var(--radius, 10px) var(--radius, 10px) 0;
  padding: 18px 20px;
}

.eila-form .fee-note p {
  margin: 0;
  font-size: 1rem;
  color: var(--text-dark, #2b2b2b);
}

.eila-form .wizard-nav {
  margin-top: 4px;
}

.eila-form .wizard-nav .center {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

.eila-form .btn-wizard-prev {
  background: var(--cream-light, #f8f3e8);
  color: var(--navy, #1b2a4a);
  border: 1px solid var(--border-soft, #e4d9c0);
}

.eila-form .btn-wizard-prev:hover {
  background: var(--border-soft, #e4d9c0);
}

@media (max-width: 720px) {
  .eila-form .col-md-6,
  .eila-form .col-md-4 {
    width: 100%;
  }

  .eila-form .wizard-progress-step .step-title {
    display: none;
  }

  /* iOS Safari auto-zooms the page whenever a focused field's text is
     under 16px, which then leaves the layout scrolled sideways. Bumping
     to exactly 16px on small screens keeps focus from triggering it. */
  .eila-form input.field-format,
  .eila-form select.field-format,
  .eila-form textarea.field-format {
    font-size: 16px;
  }

  /* Larger checkbox/radio boxes so options are comfortably tappable. */
  .eila-form span.wpcf7-list-item input[type="checkbox"],
  .eila-form span.wpcf7-list-item input[type="radio"] {
    width: 22px;
    height: 22px;
  }

  .eila-form span.wpcf7-list-item label {
    min-height: 44px;
  }
}

/* ── Validation errors ────────────────────────────────────────────────────
   Replaces the browser's native reportValidity() bubble, which cannot be
   styled and vanishes on the next click. script.js injects .eila-field-error
   into the field group and marks the group .has-error. #c0392b matches the
   error border colour already used for CF7's .wpcf7-not-valid state. */
.eila-form .eila-field-error,
.eila-form .wpcf7-not-valid-tip {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin: 8px 0 0;
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.4;
  color: #c0392b;
}

/* Leading warning glyph, drawn in CSS so no icon markup is needed. */
.eila-form .eila-field-error::before,
.eila-form .wpcf7-not-valid-tip::before {
  content: "!";
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  border-radius: 50%;
  background: #c0392b;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
}

.eila-form .has-error input.field-format,
.eila-form .has-error select.field-format,
.eila-form .has-error textarea.field-format {
  border-color: #c0392b;
  background: #fdf6f5;
}

.eila-form .has-error input.field-format:focus,
.eila-form .has-error select.field-format:focus,
.eila-form .has-error textarea.field-format:focus {
  border-color: #c0392b;
  box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.15);
}

/* ── Confirm & Submit preview ─────────────────────────────────────────────
   A plain read-back of what was entered — no panel background, no accent
   edge. Structure comes from the label/value rhythm and hairline rules
   alone, which keeps a 12-row summary scannable instead of turning it into
   a heavy block competing with the fee note beside it. */
.eila-form .enrolment-preview {
  background: none;
  border: 0;
  border-radius: 0;
  padding: 0;
}

.eila-form .enrolment-preview h4 {
  font-family: var(--font-heading, 'Poppins', sans-serif);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--navy, #1b2a4a);
  margin: 0 0 4px;
}

.eila-form .field-help {
  font-size: 1rem;
  color: var(--text-muted, #6b6459);
  margin: 0 0 18px;
}

.eila-form .enrolment-preview dl {
  display: grid;
  grid-template-columns: minmax(170px, 32%) 1fr;
  gap: 0;
  margin: 0;
  border-top: 1px solid var(--border-soft, #e4d9c0);
}

.eila-form .enrolment-preview dt,
.eila-form .enrolment-preview dd {
  margin: 0;
  padding: 13px 0;
  border-bottom: 1px solid var(--border-soft, #e4d9c0);
  line-height: 1.5;
}

/* Label: quieter and lighter than the value, so the eye lands on the data. */
.eila-form .enrolment-preview dt {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted, #6b6459);
  padding-right: 20px;
}

.eila-form .enrolment-preview dd {
  font-size: 1rem;
  font-weight: 600;
  color: var(--navy, #1b2a4a);
  overflow-wrap: anywhere;
}

/* Un-answered rows read as absent rather than as a bold navy value. */
.eila-form .enrolment-preview dd.is-empty {
  font-weight: 400;
  color: #a39c8d;
}

/* Stack label above value on small screens — a fixed label column leaves too
   little room for long values like an email address at 375px. */
@media (max-width: 600px) {
  .eila-form .enrolment-preview dl { grid-template-columns: 1fr; }
  .eila-form .enrolment-preview dt {
    padding: 12px 0 0;
    border-bottom: 0;
  }
  .eila-form .enrolment-preview dd {
    padding: 2px 0 12px;
  }
}
