/* Instant Roof Quote wizard — scoped under .quote-*. Reuses tokens.css / style.css. */

.quote-section { padding: clamp(2rem, 5vw, var(--section-rhythm)) 0; }
.quote-wrap { max-width: 720px; margin: 0 auto; }

.quote-card {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: clamp(20px, 4vw, var(--space-7));
}

/* Progress */
.quote-progress { margin-bottom: var(--space-6); }
.quote-progress-track { height: 8px; border-radius: var(--radius-full); background: var(--color-surface); overflow: hidden; }
.quote-progress-fill { height: 100%; background: var(--color-accent); border-radius: var(--radius-full); transition: width var(--motion-duration) var(--motion-easing); width: 20%; }
.quote-progress-label { font: var(--text-label); color: var(--color-muted); text-transform: uppercase; letter-spacing: .06em; margin: var(--space-2) 0 0; }

/* Steps */
.quote-step { display: none; }
.quote-step.is-active { display: block; animation: quote-fade-in var(--motion-duration) var(--motion-easing); }
@keyframes quote-fade-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) {
  .quote-step.is-active { animation: none; }
  .quote-progress-fill { transition: none; }
}

.quote-step h2 { margin-bottom: var(--space-2); }
.quote-helper { color: var(--color-muted); margin-bottom: var(--space-5); }

/* Option cards */
.quote-options { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-4); margin-bottom: var(--space-5); }
@media (min-width: 640px) { .quote-options { grid-template-columns: repeat(3, 1fr); } }

.quote-option {
  font-family: var(--font-body);
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: var(--space-2);
  background: #fff;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-3);
  cursor: pointer;
  min-height: 44px;
  transition: border-color var(--motion-duration), transform var(--motion-duration), box-shadow var(--motion-duration);
}
.quote-option:hover { border-color: var(--color-accent-2); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.quote-option:focus-visible { outline: 3px solid var(--color-accent); outline-offset: 2px; }
.quote-option[aria-pressed="true"] { border-color: var(--color-accent); background: #fff6f0; box-shadow: var(--shadow-sm); }
@media (prefers-reduced-motion: reduce) { .quote-option:hover { transform: none; } }

.quote-option-media { width: 100%; aspect-ratio: 4/3; border-radius: var(--radius-sm); overflow: hidden; background: var(--color-surface); }
.quote-option-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* Material step: crop in tight on each photo so the roofing material's texture
   (shingle grain, standing-seam ribs, cedar shake, EPDM membrane) actually reads at
   this small card size, instead of showing a whole roof with the material a speck.
   Each source photo frames its roof differently, so scale/origin are hand-picked
   per material rather than one shared rule — EPDM's own photo was already a
   roof-level close shot (client's reference point for "zoomed in right"); the
   other three needed a much bigger, off-center crop to match that same effect. */
/* All 4 material options now use dedicated close-up photos (client-supplied),
   so the CSS crop hacks that used to fake a close-up from whole-house shots
   are gone — no transform needed on any of them anymore. */
.quote-option-icon { width: 100%; aspect-ratio: 4/3; border-radius: var(--radius-sm); background: var(--color-surface); display: flex; align-items: center; justify-content: center; color: var(--color-primary); }
.quote-option-icon svg { width: 140%; height: 140%; }
/* Extra breathing room only on the size step — at this icon scale the SVG
   overflows its box enough to need more gap before the label than the other
   steps (material/pitch/timeline photo cards) use. */
.quote-options[data-question="size"] .quote-option { gap: 26px; }

.quote-option-label { font-weight: 700; color: var(--color-text); font-size: 15px; }
.quote-option-sub { font-size: 12.5px; color: var(--color-muted); }

.quote-option-plain { justify-content: center; border-style: dashed; padding: var(--space-5) var(--space-3); }
.quote-option-plain .quote-option-label { font-weight: 600; }

/* Nav row */
.quote-nav { display: flex; justify-content: space-between; align-items: center; gap: var(--space-4); margin-top: var(--space-6); }
.quote-nav-spacer { flex: 1; }

/* The fixed mobile call button (bottom-right) sits in the exact spot the wizard's
   own "Next" button lands on shorter steps (pitch, timeline) — confirmed via
   elementFromPoint() that a tap there hit the call button, not Next. Only the
   actual wizard page has #quote-wizard-form (the CTA banner reusing this
   stylesheet on other pages doesn't), so scope the fix to just that page: the
   wizard IS the call alternative, and this page already has the phone in the
   header and hero, so losing the floating button here costs nothing. */
body:has(#quote-wizard-form) .float-call { display: none; }
.quote-back { background: none; border: none; color: var(--color-muted); font-weight: 600; cursor: pointer; padding: 10px; }
.quote-back:hover { color: var(--color-text); }
.quote-back[hidden] { visibility: hidden; }
.quote-next-btn { min-height: 44px; }
.quote-start-over { text-align: center; margin-top: var(--space-4); }
.quote-start-over a { color: var(--color-muted); font-size: 14px; }

/* Contact gate form */
.quote-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); margin-bottom: var(--space-5); }
.quote-form-grid .form-field.full { grid-column: 1 / -1; }
@media (max-width: 520px) { .quote-form-grid { grid-template-columns: 1fr; } }

.quote-consent { display: flex; gap: 10px; align-items: flex-start; margin: var(--space-4) 0; font-size: 14px; color: var(--color-muted); }
.quote-consent input { margin-top: 4px; flex-shrink: 0; width: 18px; height: 18px; }

.quote-field-error { color: #b91c0f; font-size: 13px; display: none; }
.quote-field-error.is-visible { display: block; }
.form-field.has-error input, .form-field.has-error select { border-color: #b91c0f; }

/* Result screen */
.quote-result { display: none; }
.quote-result.is-active { display: block; animation: quote-fade-in var(--motion-duration) var(--motion-easing); }
.quote-result-headline { font: 900 clamp(32px,6vw,48px)/1.05 var(--font-display); font-style: italic; color: var(--color-primary); margin-bottom: var(--space-2); }
.quote-result-sub { color: var(--color-muted); margin-bottom: var(--space-6); }
.quote-result-cols { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-6); margin-bottom: var(--space-6); }
@media (max-width: 640px) { .quote-result-cols { grid-template-columns: 1fr; } }
.quote-result-cols h3 { font-size: 17px; }
.quote-included li, .quote-excluded li { position: relative; padding-left: 22px; margin-bottom: 8px; font-size: 14.5px; color: var(--color-muted); }
.quote-included li::before { content: '\2713'; position: absolute; left: 0; color: var(--color-accent); font-weight: 900; }
.quote-excluded li::before { content: '\2013'; position: absolute; left: 0; color: var(--color-muted); font-weight: 900; }

.quote-disclaimer { background: var(--color-surface); border-radius: var(--radius-sm); padding: var(--space-4); font-size: 14px; color: var(--color-muted); margin-bottom: var(--space-4); }
.quote-deposit-note { font-size: 14px; color: var(--color-muted); margin-bottom: var(--space-5); }

.quote-unpriced-icon { font-size: 40px; margin-bottom: var(--space-3); }

/* Loading state on the result step while server recompute is in flight */
.quote-result-loading { text-align: center; padding: var(--space-7) 0; color: var(--color-muted); }

.hp-field-quote { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Homepage / service-page promo banner linking to the wizard */
.quote-promo-banner { display: flex; align-items: center; justify-content: space-between; gap: var(--space-6); flex-wrap: wrap; }
.quote-promo-banner .eyebrow { color: var(--color-accent-2); }
.quote-promo-banner h2 { margin-bottom: var(--space-2); }

