/* Contact Us wizard — built entirely from style.css's existing
   tokens/components. Only loaded by contact.html. */

.lct-wrap { max-width: 760px; }

/* Progress indicator */
.lct-progress {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0 0 var(--space-8);
  counter-reset: none;
}
.lct-progress-step {
  flex: 1;
  text-align: center;
  position: relative;
  font-size: 0.8rem;
  color: var(--muted);
}
.lct-progress-step::before {
  content: "";
  display: block;
  height: 3px;
  background: var(--card-border);
  margin-bottom: var(--space-4);
  transition: background 0.25s ease;
}
.lct-progress-step:first-child::before { border-top-left-radius: 3px; border-bottom-left-radius: 3px; }
.lct-progress-step:last-child::before { border-top-right-radius: 3px; border-bottom-right-radius: 3px; }
.lct-progress-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--card-bg);
  border: 1.5px solid var(--card-border);
  color: var(--navy-dark);
  font-weight: 700;
  font-size: 0.8rem;
  margin-top: -17px;
  margin-bottom: 6px;
  transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease, transform 0.2s ease;
}
.lct-progress-label { display: block; }
.lct-progress-current { display: none; }
.lct-progress-step.is-active,
.lct-progress-step.is-done { color: var(--navy); font-weight: 600; }
.lct-progress-step.is-active::before,
.lct-progress-step.is-done::before { background: var(--accent); }
.lct-progress-step.is-active .lct-progress-num {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
  transform: scale(1.12);
  box-shadow: 0 4px 10px rgba(3, 50, 56, 0.25);
}
.lct-progress-step.is-done .lct-progress-num {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-size: 0;
}
.lct-progress-step.is-done .lct-progress-num::after {
  content: "\2713";
  font-size: 0.75rem;
}

/* Steps */
.lct-step h2 { color: var(--navy); font-size: var(--font-h3); margin: 0 0 8px; }
.lct-step-intro { color: var(--muted); margin: 0 0 var(--space-5); }
.lct-mt { margin-top: var(--space-5); }
.lct-helper { color: var(--muted); font-size: 0.85rem; margin: 6px 0 0; }

/* Requirement option tiles (Step 1) — a 2-column grid on tablet/desktop,
   genuinely multi-selectable (checkboxes, not radios). Left-aligned with a
   check badge rather than centred text, so a long label like "Property
   Refinance" reads clearly and the selection state is unambiguous even
   before the whole tile's colour registers. */
.lct-option-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
  margin-top: var(--space-4);
}
.lct-option { position: relative; }
.lct-option input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.lct-option label {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  height: 100%;
  min-height: 60px;
  border: 1.5px solid var(--card-border);
  border-radius: var(--radius);
  background: var(--card-bg);
  padding: 14px 16px;
  font-weight: 600;
  color: var(--navy-dark);
  font-size: 0.95rem;
  line-height: 1.25;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(16, 35, 63, 0.08), 0 4px 10px rgba(16, 35, 63, 0.06);
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease, color 0.15s ease;
}

/* The selection badge -- an empty ring when unselected, a filled check
   when selected. Sits to the left of every tile's label text. */
.lct-option-check {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--card-border);
  background: #fff;
  position: relative;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.lct-option-check::after {
  content: "\2713";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  color: #fff;
  opacity: 0;
  transition: opacity 0.15s ease;
}
.lct-option input:checked + label .lct-option-check {
  background: var(--accent);
  border-color: var(--accent);
  transform: scale(1.08);
}
.lct-option input:checked + label .lct-option-check::after { opacity: 1; }

.lct-option label:hover {
  border-color: var(--navy);
  box-shadow: 0 10px 20px rgba(16, 35, 63, 0.16), 0 4px 8px rgba(16, 35, 63, 0.1);
  transform: translateY(-2px);
}
.lct-option input:checked + label {
  background: #eef4fb;
  border-color: var(--navy);
  color: var(--navy-dark);
  box-shadow: 0 6px 16px rgba(16, 35, 63, 0.14), 0 2px 6px rgba(16, 35, 63, 0.08);
}
.lct-option input:focus-visible + label {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.lct-option-text { display: block; }
.lct-option-hint {
  display: block;
  font-weight: 400;
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 2px;
}

/* Insurance sub-panel (revealed under the main grid when Insurance is
   selected) — same compact 2-column approach, lighter/secondary treatment
   since these are multi-select refinements, not the primary decision. */
.lct-insurance-panel {
  margin-top: var(--space-5);
  padding: var(--space-4) var(--space-4) 2px;
  background: var(--card-bg);
  border: 1px dashed var(--card-border);
  border-radius: var(--radius);
}
.lct-insurance-panel-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--navy);
  margin: 0 0 10px;
}
.lct-insurance-grid .lct-option label {
  min-height: 48px;
  font-size: 0.85rem;
  font-weight: 500;
  background: #fff;
  box-shadow: 0 1px 4px rgba(16, 35, 63, 0.06);
}
.lct-insurance-grid .lct-option label:hover { transform: translateY(-1px); }
.lct-insurance-grid .lct-option-check { width: 18px; height: 18px; }

@media (max-width: 560px) {
  .lct-option-grid { grid-template-columns: 1fr; }
  .lct-option label { font-size: 0.92rem; padding: 12px 14px; min-height: 52px; }
  .lct-insurance-grid .lct-option label { min-height: 44px; font-size: 0.85rem; }
}

/* The shared .enquiry-form input/textarea rule in style.css hardcodes a
   4px corner -- smaller than this wizard's 8px card/tile standard. Rather
   than touch that shared, site-wide rule, bring just the wizard's own
   fields in line with it here. Also gives <select> (unstyled by the
   shared rule) the same treatment, since Step 3 uses one. */
.lct-step input[type="text"],
.lct-step input[type="email"],
.lct-step input[type="tel"],
.lct-step input[type="number"],
.lct-step input[type="date"],
.lct-step textarea {
  border-radius: var(--radius);
}
.lct-step select {
  display: block;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--text);
  background: #fff;
}

/* Field validation */
.lct-field-error {
  border-color: #b3261e !important;
}
.lct-error-text {
  color: #b3261e;
  font-size: 0.85rem;
  margin: 4px 0 0;
}

/* API-level errors (Worker call failed) — a banner, not an inline field
   note, since these aren't tied to one input. */
.lct-api-error {
  color: #b3261e;
  background: #fdecea;
  border: 1px solid #f3c2bd;
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 0.9rem;
  margin: var(--space-5) 0 0;
}

/* Not-sure figure pairing */
.lct-figure-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.lct-figure-row input[type="text"],
.lct-figure-row input[type="number"] { flex: 1; }
.lct-not-sure-check {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--muted);
  white-space: nowrap;
  font-weight: 400;
}

/* Actions row */
.lct-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: var(--space-7);
  gap: var(--space-3);
}

/* Review screen */
.lct-review-card {
  border: 1px solid var(--card-border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  background: var(--card-bg);
  padding: var(--space-5);
  margin-bottom: var(--space-4);
}
.lct-review-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-3);
}
.lct-review-head h3 { margin: 0; color: var(--navy); font-size: 1.05rem; }
.lct-edit-link {
  background: none;
  border: none;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  padding: 4px 8px;
  text-decoration: underline;
}
.lct-review-list { margin: 0; display: grid; gap: 8px; }
.lct-review-list div.lct-row { display: grid; grid-template-columns: 200px 1fr; gap: 12px; font-size: 0.92rem; }
.lct-review-list dt { color: var(--muted); font-weight: 600; }
.lct-review-list dd { margin: 0; color: var(--text); }

/* Confirmation */
.lct-confirmation { text-align: center; padding: var(--space-6) 0; }
.lct-confirm-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin: 0 auto var(--space-5);
}
.lct-confirmation h2 { color: var(--navy); }

@media (max-width: 640px) {
  /* Five text labels no longer fit legibly next to five circles at phone
     widths — show only the numbered/checked dots there, plus one compact
     "Step X of 5 — Label" line below, instead of cramming or truncating
     five separate labels. */
  .lct-progress-label { display: none; }
  .lct-progress-current {
    display: block;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--navy);
    margin: -4px 0 var(--space-5);
  }
  .lct-review-list div.lct-row { grid-template-columns: 1fr; gap: 2px; }
  .lct-actions { flex-direction: column-reverse; align-items: stretch; }
  .lct-actions .btn { width: 100%; text-align: center; }
  .lct-figure-row { flex-direction: column; align-items: stretch; }
}

@media (prefers-reduced-motion: reduce) {
  .lct-option label { transition: none; }
}
