/* ══════════════════════════════════════
   QUOTE PAGE — Dedicated conversion page
   Loaded only on /quote.html. Extends the
   base styles.css with page-specific layout.
   ══════════════════════════════════════ */

/* Page base — override body padding from main styles.css so the dedicated
   page doesn't reserve 70px for the mobile CTA bar we don't use here.
   `.quote-page` (0,1,0) beats the base `body` selector (0,0,1) — no !important needed. */
body.quote-page {
  background: var(--bg-cream);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-bottom: 0;
}

/* ── Minimal navbar ── */
.qp-nav {
  background: var(--white);
  border-bottom: 1px solid var(--ink-100);
  position: sticky;
  top: 0;
  z-index: 100;
}
.qp-nav-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem 1.25rem;
}
.qp-nav .logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  min-width: 0; /* let the flex child shrink past intrinsic content width */
}
.qp-nav .logo-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.qp-nav .logo-icon img { width: 100%; height: 100%; object-fit: contain; }
.qp-nav .logo-text .name {
  font-size: 1rem;
  font-weight: 800;
  color: var(--ink-900);
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.qp-phone {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  text-decoration: none;
  color: var(--ink-900);
  font-weight: 700;
  font-size: 0.9rem;
  white-space: nowrap;
  transition: color 0.2s;
}
.qp-phone svg { color: var(--cta-600); flex-shrink: 0; }
.qp-phone:hover { color: var(--cta-600); }

/* ── Main layout ── */
/* `flex-direction: column` so .qp-container (form + sidebar) and the
   .service-areas block stack vertically — Phase 9.5.1 hotfix. Without this,
   the two siblings land as row flex items and sit side by side. Desktop
   appearance is unchanged because .qp-container still self-centers via
   its own max-width and `align-items: center` on the main column. */
.qp-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2.5rem 1.25rem 3rem;
}
.qp-container {
  max-width: 900px;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 2rem;
  align-items: start;
}

/* ── Form card ── */
.qp-form-card {
  background: var(--white);
  border-radius: 20px;
  padding: 2.25rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--ink-100);
}
.qp-form-card h1 {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--ink-900);
  margin-bottom: 0.35rem;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.qp-subtitle {
  color: var(--ink-500);
  font-size: 0.88rem;
  margin-bottom: 1.5rem;
}

/* ── Trust sidebar ── */
.qp-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding-top: 1rem;
}
.qp-trust-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}
.qp-trust-item svg {
  color: var(--brand-700);
  flex-shrink: 0;
  margin-top: 2px;
}
.qp-trust-item strong {
  display: block;
  font-size: 0.88rem;
  color: var(--ink-900);
  margin-bottom: 2px;
}
.qp-trust-item p {
  font-size: 0.8rem;
  color: var(--ink-500);
  line-height: 1.4;
  margin: 0;
}
.qp-trust-item a {
  color: var(--cta-600);
  text-decoration: none;
  font-weight: 700;
}
.qp-trust-item a:hover { text-decoration: underline; }

/* Success modal "Back to Home" anchor-styled-as-button */
.qp-home-link {
  display: inline-flex;
  margin-top: 1rem;
}

/* ── Minimal footer ── */
.qp-footer {
  background: var(--ink-900);
  color: rgba(255, 255, 255, 0.5);
  padding: 1.5rem 1.25rem;
  margin-top: auto;
  text-align: center;
}
.qp-footer-inner {
  max-width: 900px;
  margin: 0 auto;
}
.qp-footer p {
  font-size: 0.78rem;
  margin-bottom: 0.5rem;
}
.qp-footer-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.qp-footer-links a {
  color: rgba(255, 255, 255, 0.65);
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 500;
  transition: color 0.2s;
}
.qp-footer-links a:hover { color: var(--white); }
.qp-sep {
  color: rgba(255, 255, 255, 0.25);
  font-size: 0.7rem;
}

/* ── Responsive ── */
/* Bumped from 768 → 900 so tablet-portrait (iPad 820px) also collapses to a
   single column. The sidebar needs ~300px + gap + padding to look right, so
   anything under 900px is cramped. */
@media (max-width: 900px) {
  .qp-container {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .qp-main { padding: 1rem 1rem 1.5rem; }
  .qp-form-card { order: 0; padding: 1.5rem 1.25rem; }
  .qp-form-card h1 { font-size: 1.35rem; }

  /* Trust sidebar below form card: compact tiles in a white card */
  .qp-sidebar {
    order: 1;
    gap: 1rem;
    padding: 1.25rem;
    background: var(--white);
    border-radius: 16px;
    border: 1px solid var(--ink-100);
  }
  .qp-trust-item { min-width: 0; }
  .qp-trust-item svg { width: 20px; height: 20px; }
  .qp-trust-item strong { font-size: 0.85rem; }
  .qp-trust-item p { font-size: 0.75rem; }

  /* Service-area block — full-width under the trust grid on mobile */
  .service-areas {
    margin: 1.5rem auto 2rem;
    max-width: 100%;
    padding: 1rem;
    text-align: center;
  }
  .service-areas-label { font-size: 0.72rem; }
  .service-areas-list { font-size: 0.82rem; line-height: 1.7; }

  /* Full-width Continue/Submit with a tight gap below; Back becomes a text link */
  .wiz-actions {
    flex-direction: column;
    gap: 0.5rem;
  }
  .wiz-actions .btn,
  .wiz-actions [data-wiz-next],
  .wiz-actions .btn-submit { width: 100%; text-align: center; }
  /* Mobile: Back button centers below Continue (base style already brand-blue text link) */
  .wiz-actions .wiz-back {
    order: 1;
    width: auto;
    margin: 0 auto;
    min-height: 0;
  }

  /* Compact top-of-page navbar */
  .qp-nav .logo-text .name { font-size: 0.9rem; }
  .qp-nav .logo-icon { width: 30px; height: 30px; }
  .qp-nav-inner { padding: 0.5rem 1rem; gap: 0.5rem; }
}

/* Phone-size — stack trust tiles in a single column so each tile can breathe */
@media (max-width: 600px) {
  .qp-sidebar {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
  }
  .qp-trust-item { padding: 0.25rem 0; }
}

@media (max-width: 480px) {
  .qp-phone span { display: none; }
}

/* Narrow phones — tighten card padding so content isn't crushed against the edges */
@media (max-width: 420px) {
  .qp-form-card { padding: 1.25rem 1rem; }
  .qp-form-card h1 { font-size: 1.25rem; }
}

/* ══════════════════════════════════════
   PHASE 9.5 — Step 1 conversion rewrite
   ══════════════════════════════════════ */

/* Service-area list — fills the mobile dead-space above the footer
   and doubles as a local-SEO signal. */
.service-areas {
  max-width: 560px;
  margin: 1.5rem auto 0;
  padding: 1.5rem 1rem;
  text-align: center;
}
.service-areas-label {
  font-size: 0.78rem;
  color: var(--ink-500);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.service-areas-list {
  font-size: 0.85rem;
  color: var(--ink-700);
  line-height: 1.6;
  font-weight: 500;
  margin: 0;
}
