/* Shared layer for city and state pages (src/custom/<city>.html, src/custom/<state>.html and
 * LocationPage.astro). Loaded after each page's own <style>, so equal-specificity rules here win.
 * 1. Quick-quote sheet (all screen sizes), opened by city-page.js.
 * 2. Phone layout: CTAs above the fold, card grids as swipe rows, FAQ accordion, tighter spacing.
 */

/* 1. QUICK-QUOTE SHEET */
.qq { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 24px; }
.qq[hidden] { display: none; }
.qq-backdrop { position: absolute; inset: 0; background: rgba(14,14,16,0.55); }
.qq-panel { position: relative; background: #fff; width: 100%; max-width: 460px; max-height: calc(100vh - 48px); overflow-y: auto;
  border-radius: 16px; padding: 28px 26px 22px; box-shadow: 0 24px 60px rgba(0,0,0,0.3);
  font-family: 'Plus Jakarta Sans', sans-serif; color: #4a4a4f; }
.qq-x { position: absolute; top: 12px; right: 12px; width: 40px; height: 40px; border: 0; background: #f7f7f5; border-radius: 50%;
  font-size: 22px; line-height: 1; color: #1a1a1c; cursor: pointer; }
.qq-eyebrow { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--red, #D81F26); font-weight: 700; margin-bottom: 8px; }
.qq h2 { font-size: 24px; font-weight: 800; color: #0e0e10; letter-spacing: -0.02em; line-height: 1.15; margin: 0 40px 6px 0; }
.qq-sub { font-size: 14.5px; color: #6c6c72; margin: 0 0 18px; }
.qq-form { display: grid; gap: 12px; }
.qq-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.qq-field label, .qq-legend { display: block; font-size: 13px; font-weight: 700; color: #1a1a1c; margin-bottom: 5px; }
.qq-field input, .qq-field select { width: 100%; box-sizing: border-box; font: inherit; font-size: 16px; color: #1a1a1c; background: #fff;
  border: 1.5px solid #e6e6e3; border-radius: 8px; padding: 12px 12px; min-height: 48px; }
.qq-field input:focus, .qq-field select:focus { outline: none; border-color: var(--red, #D81F26); box-shadow: 0 0 0 3px rgba(216,31,38,0.12); }
.qq-fuels { border: 0; padding: 0; margin: 0; }
.qq-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.qq-chip { position: relative; }
.qq-chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.qq-chip span { display: inline-block; padding: 9px 14px; border: 1.5px solid #e6e6e3; border-radius: 30px; font-size: 14px; font-weight: 600; color: #1a1a1c; }
.qq-chip input:checked + span { border-color: var(--red, #D81F26); background: #fdf0f0; color: var(--red, #D81F26); }
.qq-chip input:focus-visible + span { box-shadow: 0 0 0 3px rgba(216,31,38,0.2); }
.qq-submit { margin-top: 4px; width: 100%; min-height: 52px; border: 0; border-radius: 8px; background: var(--red, #D81F26); color: #fff;
  font: inherit; font-size: 16px; font-weight: 800; cursor: pointer; }
.qq-submit:hover { background: var(--red-dark, #b51a20); }
.qq-submit:disabled { opacity: 0.6; }
.qq-form .fg-form-status { margin: 0; font-size: 14px; }
.qq-form .fg-form-status:empty { display: none; }
.qq-form .fg-form-status.err { color: var(--red, #D81F26); font-weight: 600; }
.qq-call { display: block; text-align: center; margin-top: 14px; font-size: 14.5px; font-weight: 700; color: #1a1a1c; text-decoration: none; }
.qq-call strong { color: var(--red, #D81F26); }
.qq-fine { text-align: center; font-size: 12px; color: #9a9a9f; margin: 8px 0 0; }
.qq-done { text-align: center; padding: 12px 0 4px; }
.qq-done-mark { width: 56px; height: 56px; border-radius: 50%; background: #e8f5ee; color: #1f7a4d; font-size: 28px; font-weight: 800;
  display: flex; align-items: center; justify-content: center; margin: 0 auto 14px; }
.qq-done h2 { margin: 0 0 8px; }
body.qq-open { overflow: hidden; }

@media (max-width: 767px) {
  .qq { align-items: flex-end; padding: 0; }
  .qq-panel { max-width: none; max-height: 92vh; border-radius: 18px 18px 0 0; padding: 24px 18px calc(18px + env(safe-area-inset-bottom)); }
  .qq h2 { font-size: 22px; }
}

/* CREDENTIALS: centre the row whatever the number of pills (template pages have 5 in a 6-column grid) */
.wrap .creds-strip { display: flex; flex-wrap: wrap; justify-content: center; }
.creds-strip > .cred-pill { flex: 0 1 calc((100% - 50px) / 6); box-sizing: border-box; }
@media (max-width: 1080px) { .creds-strip > .cred-pill { flex-basis: calc((100% - 20px) / 3); } }
@media (max-width: 560px) { .creds-strip > .cred-pill { flex-basis: calc((100% - 10px) / 2); } }

/* STATE DIESEL TAX BAND (state pages only; numbers from src/data/diesel-taxes.json) */
.section.tax-band { background: var(--black, #0e0e10); color: #fff; border-bottom: 0; }
.tax-band .section-header h2 { color: #fff; }
.tax-band .section-sub { color: rgba(255,255,255,0.72); }
.tax-band .tax-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 22px; }
.tax-band .tax-stat { background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); border-top: 3px solid var(--red, #D81F26); border-radius: 12px; padding: 20px 18px; }
.tax-band .tax-num { font-size: 28px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.05; color: #fff; font-variant-numeric: tabular-nums; }
.tax-band .tax-label { margin-top: 8px; font-size: 13px; font-weight: 600; color: rgba(255,255,255,0.6); line-height: 1.35; }
.tax-band .tax-note { font-size: 14.5px; line-height: 1.65; color: rgba(255,255,255,0.72); max-width: 900px; }
.tax-band .tax-note a { color: #fff; font-weight: 700; text-decoration: none; border-bottom: 1px solid var(--red, #D81F26); }
@media (max-width: 900px) { .tax-band .tax-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 420px) { .tax-band .tax-num { font-size: 23px; } }

/* 2. PHONE LAYOUT */
@media (max-width: 767px) {
  /* Hero: headline and buttons first, photo after */
  .hero { padding: 18px 0 32px; }
  .hero .wrap { display: flex; flex-direction: column; }
  .hero .hero-content { order: 1; gap: 22px; }
  .hero .hero-image { order: 2; height: 180px; margin: 24px 0 0; box-shadow: none; border-radius: 12px; }
  .hero .hero-image-badge { display: none; }
  .hero .hero-image-pulse { top: 12px; right: 12px; padding: 7px 12px; font-size: 11px; }
  .hero .hero-label { font-size: 10.5px; padding: 5px 11px; margin-bottom: 12px; }
  .hero h1 { font-size: 31px; margin-bottom: 12px; }
  .hero .hero-sub { font-size: 16px; line-height: 1.5; margin-bottom: 20px; }
  .hero .hero-ctas { display: grid; grid-template-columns: 1fr; gap: 10px; }
  .hero .hero-ctas .btn { justify-content: center; width: 100%; box-sizing: border-box; padding: 15px 20px; font-size: 16px; }
  .hero .hero-stats { gap: 10px; padding-top: 16px; }
  .hero .hero-stat-num { font-size: 21px; }
  .hero .hero-stat-label { font-size: 11.5px; }

  /* Texas-style hero (text + side image) */
  .hero .hero-image-side { display: none; }

  /* Tighter sections */
  .section, .products-section { padding: 40px 0; }
  .section .section-header, .section-header.centered { margin-bottom: 22px; }
  .section .section-sub { font-size: 15.5px; }
  .intro-grid .intro-image { display: none; }
  .intro-grid { gap: 0; }
  .stats-strip { margin-top: 24px; gap: 10px; }

  /* Card grids become one swipeable row, so each section is one card tall */
  .wrap .products-grid, .wrap .specs-grid, .wrap .compare-grid, .wrap .industries-grid,
  .wrap .services-grid, .wrap .steps-grid, .wrap .resource-grid {
    display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 12px;
    margin: 0 -24px; padding: 4px 24px 14px; scroll-padding: 0 24px; scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  .wrap .products-grid::-webkit-scrollbar, .wrap .specs-grid::-webkit-scrollbar, .wrap .compare-grid::-webkit-scrollbar,
  .wrap .industries-grid::-webkit-scrollbar, .wrap .services-grid::-webkit-scrollbar, .wrap .steps-grid::-webkit-scrollbar,
  .wrap .resource-grid::-webkit-scrollbar { display: none; }
  .products-grid > *, .specs-grid > *, .compare-grid > *, .industries-grid > *,
  .services-grid > *, .steps-grid > *, .resource-grid > * { flex: 0 0 80%; scroll-snap-align: start; transform: none !important; }
  .swipe-hint { font-size: 12.5px; font-weight: 700; color: var(--ink-3, #6c6c72); margin: -10px 0 12px; }

  /* FAQ: questions only until tapped (city-page.js adds .fq) */
  .faq-item.fq { padding: 0; }
  .faq-item.fq .faq-q { margin: 0; padding: 16px 44px 16px 18px; position: relative; cursor: pointer; font-size: 15.5px; line-height: 1.35; }
  .faq-item.fq .faq-q::after { content: '+'; position: absolute; right: 18px; top: 50%; transform: translateY(-50%);
    color: var(--red, #D81F26); font-weight: 800; font-size: 20px; }
  .faq-item.fq.open .faq-q::after { content: '\2212'; }
  .faq-item.fq .faq-a { display: none; padding: 0 18px 18px; }
  .faq-item.fq.open .faq-a { display: block; }

  /* Long prose: first paragraph, then "Read more" */
  .rm-clamped > p:first-of-type ~ :not(.rm-btn) { display: none; }
  .rm-btn { background: none; border: 0; padding: 0; font: inherit; font-size: 15px; font-weight: 700; color: var(--red, #D81F26); cursor: pointer; margin: 0 0 8px; }

  /* Climate/weather callout: title and two lines, rest behind "Read more" */
  .rm-callout .climate-text, .rm-callout .weather-text { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  .rm-callout .climate-list, .rm-callout .weather-list { display: none; }
  .climate-callout .rm-btn, .weather-callout .rm-btn { color: #fff; position: relative; margin-bottom: 18px; }

  /* Neighborhood pills: names only */
  .neighborhoods-grid .neighborhood-desc { display: none; }
  .neighborhoods-grid .neighborhood-pill { padding: 12px 14px; }

  /* Bottom CTA: full-width buttons */
  .bottom-cta { padding: 44px 20px; }
  .bottom-cta .bottom-cta-buttons { display: grid; width: 100%; }
  .bottom-cta .bottom-cta-buttons .btn { justify-content: center; }
}
