/* ==========================================================================
   Pilot Coverage Map — page styles

   Section order mirrors the approved landing-page design:
   hero -> map widget -> stats bar -> closing CTA -> FAQ teaser -> SEO copy.
   New sections below use a `pilot-map-` prefix (not the design's own bare
   class names) to avoid collisions with the rest of the theme's CSS, but
   port its layout/values 1:1. The map canvas itself and Mapbox's own UI
   chrome stay flat (border-radius:0) regardless of the rounded-corner
   styling used elsewhere on the page — see .pilot-map-canvas below.
   ========================================================================== */

.pilot-map-wrap {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ---- Hero ---- */
.pilot-map-hero {
    padding: 90px 0 100px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: #fff;
    text-align: center;
}

.pilot-map-hero-inner h1 {
    font-size: 42px;
    font-weight: 800;
    color: #fff;
    margin: 0 0 18px;
    line-height: 1.15;
}

.pilot-map-sub {
    max-width: 640px;
    margin: 0 auto 36px;
    font-size: 18px;
    line-height: 1.5;
    color: #e7ecf2;
}

.pilot-map-hero-badges {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 36px;
}

.pilot-map-app-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    border-radius: 10px;
    text-decoration: none;
    line-height: 1.1;
}

.pilot-map-app-badge-web {
    background: #1e6871;
}

.pilot-map-app-badge-dark {
    background: #000;
    color: #fff;
}

.pilot-map-hero-cta {
    display: flex;
    justify-content: center;
}

.pilot-map-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.pilot-map-btn-primary {
    padding: 16px 34px;
    border-radius: 999px;
    background: #1e6871;
    border: 2px solid #31c7e0;
    color: #fff;
    font-weight: 700;
    font-size: 16px;
}

.pilot-map-btn-primary:hover {
    background: #174f56;
    color: #fff;
}

/* ---- Map widget section ---- */
.pilot-map-widget-sec {
    padding: 70px 0 0;
    background: #e8f4f8;
    text-align: center;
}

.pilot-map-widget-heading {
    padding-bottom: 34px;
}

.pilot-map-widget-sec h2 {
    font-size: 30px;
    font-weight: 800;
    color: #0a2b3e;
    margin: 0 0 10px;
}

.pilot-map-callout {
    display: block;
    max-width: 640px;
    margin: 0 auto;
    background: #fff;
    border: 1px solid #bfe3ec;
    border-left: 5px solid #31c7e0;
    border-radius: 10px;
    padding: 15px 22px;
    color: #0a2b3e;
    font-weight: 600;
    font-size: 16px;
}

/* App shell: sidebar + map, no page-wrap padding and no rounded frame
   (matches the approved full-width reference layout — the sidebar sits
   flush against the map with no gap between them). Capped at 1600px and
   centered rather than spanning the full browser width: edge-to-edge on
   very wide/ultrawide monitors stretched the map awkwardly. On most
   desktop widths this still reads as full-bleed.

   Height is a comfortable fixed-ish band (not 85vh) on purpose: at 85vh
   the section visually read as an always-on "fullscreen" takeover of the
   page. A true fullscreen view is still available via the custom
   Fullscreen button (top-right) — see the :fullscreen rule below, which
   is the only time this should occupy the whole viewport. */
.pilot-map-app {
    display: flex;
    align-items: stretch;
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    height: clamp(560px, 78vh, 820px);
    overflow: hidden;
    text-align: left;
}

.pilot-map-sidebar {
    flex: 0 0 360px;
    max-width: 360px;
    display: flex;
    flex-direction: column;
    padding: 24px;
    background: linear-gradient(180deg, #ffffff 0%, #f4f7fb 100%);
    border-right: 1px solid #e3e8ed;
    overflow-y: auto;
    z-index: 2;
}

.pilot-map-sidebar-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.pilot-map-sidebar-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    border-radius: 10px;
    background: #eaf1f8;
    color: #5e7a99;
}

.pilot-map-sidebar-title {
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.25;
    margin: 0;
}

.pilot-map-sidebar-subtitle {
    font-size: 0.85rem;
    color: #6b7684;
    margin: 0;
}

/* Single stat line — "Showing N pilots near your location."
   Replaces the old 3-tile Pilots/Cities/States row; that breakdown now
   lives in the page's dedicated stats bar (.pilot-map-stats-sec). */
.pilot-map-single-stat {
    margin: 0 0 20px;
    padding: 14px 16px;
    border-radius: 10px;
    border-left: 3px solid #5e7a99;
    background: linear-gradient(90deg, #eaf2ff, #ffffff);
    color: #1b3a5c;
    font-size: 0.92rem;
    min-height: 1.3em;
}

.pilot-map-single-stat:empty,
.pilot-map-single-stat.is-hidden {
    display: none;
}

.pilot-map-single-stat strong {
    color: #14171c;
}

.pilot-map-search-wrap {
    position: relative;
    margin-bottom: 16px;
}

.pilot-map-search-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d7dde3;
    border-radius: 8px;
    font-size: 1rem;
}

.pilot-map-search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 20;
    background: #fff;
    border: 1px solid #d7dde3;
    border-radius: 8px;
    margin-top: 4px;
    max-height: 260px;
    overflow-y: auto;
    list-style: none;
    padding: 0;
}

.pilot-map-search-suggestions li {
    padding: 10px 16px;
    cursor: pointer;
    color: #1c2129;
    font-size: 0.92rem;
}

.pilot-map-search-suggestions li:hover,
.pilot-map-search-suggestions li.is-active {
    background: #f1f5f9;
}

.pilot-map-radius-wrap {
    margin-bottom: 18px;
}

.pilot-map-radius-label {
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    color: #1c2129;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.pilot-map-radius-row {
    display: flex;
    gap: 6px;
}

.pilot-map-radius-btn {
    flex: 1;
    text-align: center;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 8px 4px;
    border: 1px solid #d7dde3;
    border-radius: 999px;
    background: #fff;
    color: #33455f;
    cursor: pointer;
}

.pilot-map-radius-btn:hover {
    border-color: #1a73e8;
}

.pilot-map-radius-btn.is-active {
    background: #1a73e8;
    border-color: #1a73e8;
    color: #fff;
}

/* City/state breakdown list — plain text counts here (never on the map
   itself, which must never show numbered cluster badges). */
.pilot-map-city-list {
    list-style: none;
    margin: 0;
    padding: 0;
    border-top: 1px solid #eef1f4;
}

.pilot-map-city-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 4px;
    border-bottom: 1px solid #eef1f4;
    cursor: pointer;
}

.pilot-map-city-list li:hover {
    background: #f8fafb;
}

.pilot-map-city-count {
    flex: 0 0 auto;
    min-width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #1c2129;
    color: #fff;
    font-weight: 800;
    font-size: 0.78rem;
    padding: 0 6px;
}

.pilot-map-city-name {
    font-weight: 600;
    font-size: 0.9rem;
}

.pilot-map-city-sub {
    display: block;
    font-size: 0.78rem;
    color: #6b7684;
    font-weight: 400;
}

/* Flat, borderless map container — no rounded corners anywhere,
   sized larger than the client's reference demo. */
.pilot-map-canvas-wrap {
    flex: 1 1 auto;
    position: relative;
}

/* "How It Works" / "Fullscreen" pill buttons overlaid top-right on the
   map, matching the reference screenshot. Sits above Mapbox's own
   controls (NavigationControl is moved to top-left in pilot-map.js to
   avoid colliding with these). */
.pilot-map-overlay-controls {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 5;
    display: flex;
    gap: 8px;
}

.pilot-map-overlay-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 14px;
    border: none;
    border-radius: 999px;
    background: #14171c;
    color: #fff;
    font-size: 0.82rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
}

.pilot-map-overlay-btn:hover,
.pilot-map-overlay-btn:focus {
    background: #272c35;
    color: #fff;
}

.pilot-map-overlay-btn.is-active {
    background: #1a73e8;
}

/* Fullscreen takeover: when the app shell itself goes fullscreen (via the
   custom Fullscreen button), let it fill the screen instead of staying at
   its normal clamped width/height. */
.pilot-map-app:fullscreen,
.pilot-map-app:-webkit-full-screen {
    max-width: none;
    height: 100vh;
}

.pilot-map-canvas {
    width: 100%;
    height: 100%;
    border-radius: 0 !important;
    overflow: hidden;
    position: relative;
    background: #e9edf1;
}

.pilot-map-canvas .mapboxgl-canvas,
.pilot-map-canvas .mapboxgl-map {
    border-radius: 0 !important;
}

/* Zero out Mapbox's own rounded UI chrome */
.pilot-map-canvas .mapboxgl-popup-content,
.pilot-map-canvas .mapboxgl-popup-tip,
.pilot-map-canvas .mapboxgl-ctrl-group {
    border-radius: 0 !important;
}

.pilot-map-fallback {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px;
    background: #e9edf1;
}

/* Drone marker icons — size shrinks as zoom increases per client spec */
.pilot-map-canvas .mapboxgl-marker {
    cursor: pointer;
}

/* ---- Stats bar (3-card aggregate: pilots / cities / states) ---- */
.pilot-map-stats-sec {
    padding: 60px 0;
    background: #041627;
}

.pilot-map-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.pilot-map-stat-card {
    border-radius: 14px;
    background: #0a2b3e;
    padding: 30px 20px;
    text-align: center;
}

.pilot-map-stat-card .num {
    display: block;
    font-size: 36px;
    font-weight: 800;
    color: #31c7e0;
    line-height: 1.1;
    margin-bottom: 8px;
}

.pilot-map-stat-card .lbl {
    display: block;
    font-size: 14px;
    color: #dfe4ea;
}

/* ---- Closing CTA (same dark bg treatment as the hero) ---- */
.pilot-map-cta-sec {
    padding: 90px 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: #fff;
    text-align: center;
}

.pilot-map-cta-sec h2 {
    font-size: 32px;
    font-weight: 800;
    color: #fff;
    margin: 0 0 14px;
}

.pilot-map-cta-sec p {
    max-width: 620px;
    margin: 0 auto 32px;
    font-size: 17px;
    color: #e7ecf2;
}

/* ---- FAQ teaser ---- */
.pilot-map-faq-teaser-sec {
    padding: 40px 0;
    background: #e8f4f8;
    text-align: center;
}

.pilot-map-faq-teaser-sec p {
    margin: 0;
    font-size: 16px;
    color: #0a2b3e;
}

.pilot-map-faq-teaser-sec a {
    color: #1e6871;
    font-weight: 700;
    text-decoration: underline;
}

/* ---- SEO copy ---- */
.pilot-map-seo-sec {
    padding: 70px 0;
    background: #e8f4f8;
    color: #2b4656;
}

.pilot-map-seo-wrap {
    max-width: 820px;
}

.pilot-map-seo-wrap h2 {
    font-size: 26px;
    font-weight: 800;
    color: #0a2b3e;
    margin: 40px 0 14px;
    padding-left: 14px;
    border-left: 4px solid #31c7e0;
}

.pilot-map-seo-wrap h2:first-of-type {
    margin-top: 10px;
}

.pilot-map-seo-wrap p {
    font-size: 16px;
    line-height: 1.75;
    color: #2b4656;
    margin: 0 0 16px;
}

.pilot-map-seo-lead {
    font-size: 18px !important;
    color: #2b4656 !important;
    line-height: 1.7;
}

.pilot-map-seo-wrap a {
    color: #1e6871;
    font-weight: 700;
}

.pilot-map-check-box {
    border-radius: 14px;
    background: #0a2b3e;
    padding: 24px 26px;
    margin: 20px 0 28px;
}

.pilot-map-check-row {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 16px;
}

.pilot-map-check-icon {
    flex: 0 0 22px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #31c7e0;
    color: #0a2b3e;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 800;
}

.pilot-map-check-text {
    color: #e7f4f8;
    font-size: 15.5px;
    line-height: 1.6;
}

/* ---- Find Drone Pilots in All 50 States ---- */
.pilot-map-states-sec {
    background: #e8f4f8;
    padding: 0 0 90px;
}

.pilot-map-states-box {
    background: #0a2b3e;
    border-radius: 16px;
    padding: 34px 28px 30px;
}

.pilot-map-states-box h2 {
    margin: 0 0 8px;
    font-size: 26px;
    text-align: center;
    color: #fff;
}

.pilot-map-states-box p {
    margin: 0 auto 24px;
    text-align: center;
    color: #cfe6ee;
    max-width: 620px;
    font-size: 16px;
    line-height: 1.6;
}

.pilot-map-state-grid {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 8px;
}

.pilot-map-state-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 46px;
    padding: 6px 4px;
    border-radius: 8px;
    background: #041627;
    border: 1px solid #14495c;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
    transition: 0.15s;
}

.pilot-map-state-btn:hover {
    background: #1e6871;
    border-color: #31c7e0;
}

@media (max-width: 1000px) {
    .pilot-map-state-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (max-width: 560px) {
    .pilot-map-state-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .pilot-map-states-box {
        padding: 26px 16px;
    }
}

/* ---- Need a Specialty Drone Pilot? ---- */
.pilot-map-specialty-sec {
    background: #e8f4f8;
    padding: 0 0 50px;
}

.pilot-map-specialty-sec h3 {
    margin: 0 0 14px;
    text-align: center;
    font-size: 20px;
    color: #0a2b3e;
}

.pilot-map-specialty-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    max-width: 900px;
    margin: 0 auto;
}

.pilot-map-specialty-grid a {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 54px;
    background: #0a2b3e;
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    line-height: 1.25;
    padding: 8px 18px;
    border-radius: 999px;
    border: 2px solid #31c7e0;
}

.pilot-map-specialty-grid a:hover {
    background: #1e6871;
}

@media (max-width: 720px) {
    .pilot-map-specialty-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 420px) {
    .pilot-map-specialty-grid {
        grid-template-columns: 1fr;
    }
}

/* ---- Pilot Locator Map FAQs ---- */
.pilot-map-faqs-sec {
    background: #e8f4f8;
    padding: 0 0 70px;
}

.pilot-map-faqs-wrap {
    max-width: 820px;
}

.pilot-map-faqs-sec h2 {
    font-size: 26px;
    color: #0a2b3e;
    text-align: center;
    margin: 0 0 20px;
}

.pilot-map-faqs-sec details {
    background: #0a2b3e;
    border-radius: 12px;
    margin-bottom: 10px;
    color: #e7f4f8;
}

.pilot-map-faqs-sec summary {
    cursor: pointer;
    list-style: none;
    padding: 16px 20px;
    font-weight: 700;
    font-size: 16px;
    display: flex;
    justify-content: space-between;
    gap: 14px;
}

.pilot-map-faqs-sec summary::-webkit-details-marker {
    display: none;
}

.pilot-map-faqs-sec summary::after {
    content: "+";
    color: #31c7e0;
    font-size: 22px;
    line-height: 1;
}

.pilot-map-faqs-sec details[open] summary::after {
    content: "\2212";
}

.pilot-map-faqs-sec details p {
    margin: 0;
    padding: 0 20px 18px;
    line-height: 1.7;
    font-size: 15.5px;
    color: #cfe6ee;
}

.pilot-map-faqs-more {
    text-align: center;
    margin: 20px 0 0;
    color: #0a2b3e;
    font-size: 16px;
}

.pilot-map-faqs-more a {
    color: #1e6871;
    font-weight: 700;
}

/* Stack sidebar above map on narrow viewports */
@media (max-width: 768px) {
    .pilot-map-app {
        flex-direction: column;
        height: auto;
    }

    .pilot-map-sidebar {
        flex: none;
        max-width: none;
        width: 100%;
        max-height: 420px;
        border-right: none;
        border-bottom: 1px solid #e3e8ed;
    }

    .pilot-map-canvas-wrap {
        height: min(70vh, 600px);
    }
}

/* Matches the approved design's own breakpoint for the marketing sections */
@media (max-width: 680px) {
    .pilot-map-hero {
        padding: 60px 0 70px;
    }

    .pilot-map-hero-inner h1 {
        font-size: 28px;
    }

    .pilot-map-sub {
        font-size: 16px;
    }

    .pilot-map-stats-grid {
        grid-template-columns: 1fr;
    }

    .pilot-map-cta-sec h2,
    .pilot-map-widget-sec h2 {
        font-size: 24px;
    }
}
