/* Lead form component (Phase G) — shared by service pages, contact, estimate.
   Single source of truth; linked after the page's main stylesheet. */

/* =========================================================================
   LEAD FORM (Phase G) — multi-step, progressive-enhancement, category-accented
   Base (no JS): all steps + Submit visible. JS hides non-active steps and
   reveals the progress bar + Next/Back. Picks up each page's --accent.
   ========================================================================= */
.lead-form-section { padding-top: 1.75rem; padding-bottom: 1.75rem; }
.lead-form {
  background: var(--c-surface, #fff);
  border: 1px solid var(--c-line, rgba(33,37,41,.12));
  border-top: 3px solid var(--accent, #495057);
  border-radius: var(--radius-sm, 2px); /* M-8: square the form panel */
  box-shadow: var(--shadow-card, 0 4px 20px rgba(0,0,0,.08));
  padding: 1.25rem 1.25rem 1.1rem;
}
@media (min-width: 720px) {
  .lead-form { padding: 1.6rem 1.75rem 1.4rem; }
}
/* honeypot + time-trap: visually + AT hidden, still posted */
.lf-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* progress */
.lead-form__progress { margin: 0 0 1.1rem; }
.lead-form__progress-label {
  display: block; font-size: .82rem; font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase;
  color: var(--c-text-weak, #495057); margin-bottom: .45rem;
}
.lead-form__progress-bar {
  display: block; height: 6px; border-radius: 99px;
  background: var(--c-line, rgba(33,37,41,.12)); overflow: hidden;
}
.lead-form__progress-fill {
  display: block; height: 100%; width: 33%;
  border-radius: 99px; background: var(--accent, #495057);
  transition: width .28s ease;
}

/* step heading */
.lead-form__step { border: 0; margin: 0; padding: 0; min-width: 0; }
.lead-form__step + .lead-form__step { margin-top: 1.1rem; } /* spacing in no-JS stacked mode */
.lead-form__q {
  font-size: clamp(1.12rem, 2.4vw, 1.35rem);
  font-weight: 800; line-height: 1.25; margin: 0 0 .9rem; padding: 0;
  color: var(--c-text, #212529);
}

/* radio cards */
.lf-radios { display: grid; gap: .55rem; margin: 0 0 1rem; }
.lf-radio {
  display: flex; align-items: center; gap: .7rem;
  min-height: 48px; padding: .55rem .85rem;
  border: 1px solid var(--c-line, rgba(33,37,41,.16));
  border-radius: var(--radius-sm, 2px); cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.lf-radio:hover { border-color: var(--accent, #495057); }
.lf-radio input { width: 20px; height: 20px; accent-color: var(--accent, #495057); flex: 0 0 auto; }
.lf-radio span { font-weight: 600; color: var(--c-text, #212529); }
.lf-radio:has(input:checked) {
  border-color: var(--accent, #495057);
  background: color-mix(in srgb, var(--accent, #495057) 7%, #fff);
}
.lf-radio:has(input:focus-visible) { outline: 2px solid var(--accent, #495057); outline-offset: 2px; }

/* fields */
.lf-field { display: block; margin: 0 0 .85rem; }
.lf-label { display: block; font-weight: 700; font-size: .92rem; margin-bottom: .35rem; color: var(--c-text, #212529); }
.lf-label em { font-style: normal; font-weight: 500; color: var(--c-text-weak, #6c757d); }
.lf-field input,
.lf-field select,
.lf-field textarea {
  width: 100%; min-height: 48px; padding: .6rem .8rem;
  font: inherit; color: var(--c-text, #212529);
  background: #fff; border: 1px solid var(--c-line, rgba(33,37,41,.22));
  border-radius: var(--radius-sm, 2px); appearance: none; /* M-7: inputs max 2px */
}
.lf-field textarea { min-height: 88px; resize: vertical; line-height: 1.5; }
.lf-field select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23495057' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .8rem center; padding-right: 2.2rem; }
.lf-field input:focus-visible,
.lf-field select:focus-visible,
.lf-field textarea:focus-visible { outline: 2px solid var(--accent, #495057); outline-offset: 1px; border-color: var(--accent, #495057); }
.lf-field input.is-valid { border-color: #2a7a52; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%232a7a52' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .8rem center; padding-right: 2.2rem; }
.lf-field input.is-invalid { border-color: var(--pinnacle-red); }
.lf-error { display: block; color: var(--pinnacle-red); font-size: .82rem; font-weight: 600; margin-top: .35rem; }
.lf-error:empty { display: none; }

/* nav bar */
.lead-form__bar {
  display: flex; flex-wrap: wrap; gap: .6rem; align-items: center;
  margin-top: 1.1rem; padding-top: 1rem;
  border-top: 1px solid var(--c-line, rgba(33,37,41,.1));
}
.lf-btn {
  font: inherit; font-weight: 800; cursor: pointer;
  min-height: 48px; padding: .7rem 1.4rem; border-radius: var(--radius-sm, 2px); /* M-7: no pill buttons */
  border: 1px solid transparent; transition: filter .15s ease, background .15s ease;
}
.lf-btn--next, .lf-btn--submit {
  background: var(--accent, #495057); color: #fff; margin-left: auto;
}
.lf-btn--next:hover, .lf-btn--submit:hover { filter: brightness(1.06); }
.lf-btn--ghost {
  background: transparent; color: var(--c-text-weak, #495057);
  border-color: var(--c-line, rgba(33,37,41,.22));
}
.lf-btn--ghost:hover { background: var(--c-line, rgba(33,37,41,.06)); }
.lead-form__hint { width: 100%; margin: .6rem 0 0; font-size: .82rem; color: var(--c-text-weak, #6c757d); }

/* thank-you panel (JS in-place fallback) */
.lead-form__done { text-align: center; padding: 1.5rem .5rem; }
.lead-form__done h2 { margin: 0 0 .5rem; }
.lead-form__done .cta-phone { display: inline-block; margin-top: .5rem; }

@media (prefers-reduced-motion: reduce) {
  .lead-form__progress-fill { transition: none; }
}
