/* US Map — Interactive Coverage Map */
/* Prefixed with usmap- to avoid collisions with existing styles */

/* ── Full-viewport hero with map ── */
.usmap-hero-full {
    position: relative;
    overflow: visible;
}

/* ── Title bar (below nav, above map) ── */
.usmap-title-bar {
    position: relative;
    z-index: 10;
    text-align: center;
    padding: 100px 24px 12px;
}
.usmap-page-title {
    font-family: var(--font-headline, 'Hanken Grotesk', system-ui, sans-serif);
    font-size: clamp(1.6rem, 3.5vw, 2.5rem);
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
    margin: 0 0 16px;
}
.usmap-page-sub {
    font-size: clamp(0.82rem, 1.4vw, 0.9rem);
    color: #A8B2BB;
    max-width: 520px;
    margin: 0 auto;
    line-height: 1.7;
}
/* ── Scroll hint (between map and legend) ── */
.usmap-scroll-hint {
    position: absolute;
    bottom: 130px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: #555;
    font-size: 0.78rem;
    pointer-events: none;
}
.usmap-scroll-hint svg {
    animation: usmap-bounce 2s ease-in-out infinite;
}
@keyframes usmap-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(4px); }
}

/* ── Immediate mode — map always visible ── */
.usmap-immediate .usmap-map-bg {
    pointer-events: auto;
}
.usmap-immediate .usmap-map-bg svg {
    opacity: 1;
}

/* ── Explore button ── */
.usmap-explore-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 32px;
    padding: 14px 32px;
    border-radius: 10px;
    border: 1px solid rgba(0, 255, 65, 0.35);
    background: rgba(0, 255, 65, 0.08);
    color: #00FF41;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.25s ease;
    text-shadow: 0 0 10px rgba(0, 255, 65, 0.3);
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.08);
}
.usmap-explore-btn:hover {
    background: rgba(0, 255, 65, 0.14);
    border-color: rgba(0, 255, 65, 0.5);
    box-shadow: 0 0 30px rgba(0, 255, 65, 0.15);
    transform: translateY(-1px);
}

/* ── Back button (explore mode) ── */
.usmap-back-btn {
    position: absolute;
    top: 100px;
    left: 24px;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    border-radius: 40px;
    background: rgba(30, 30, 30, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #A8B2BB;
    font-size: 0.82rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    transition: opacity 0.4s ease 0.3s, transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.3s,
                color 0.2s, border-color 0.2s;
}
.usmap-hero-full.explore .usmap-back-btn {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
.usmap-back-btn:hover {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.2);
}

/* ── Map layer ── */
.usmap-map-bg {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    pointer-events: none;
}
.usmap-map-bg svg {
    width: 90%;
    max-width: 1200px;
    height: auto;
    opacity: 0.25;
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}
/* hero-glow bleeds naturally past the hero (overflow: visible above) */

/* ── Back button — hidden (user scrolls instead) ── */
.usmap-back-btn {
    display: none;
}

/* ── Pulse ripple ── */
.usmap-pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 0;
    height: 0;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 255, 65, 0.12) 0%, transparent 70%);
    z-index: 5;
    pointer-events: none;
    opacity: 0;
}
.usmap-pulse.animate {
    animation: usmap-ripple 1s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
@keyframes usmap-ripple {
    0% { width: 0; height: 0; opacity: 0.8; }
    100% { width: 200vmax; height: 200vmax; opacity: 0; }
}

/* ── State Paths ── */
.usmap-state {
    cursor: pointer;
    transition: fill 0.25s, stroke 0.25s, filter 0.3s;
}
.usmap-active {
    fill: rgba(0, 255, 65, 0.08);
    stroke: rgba(0, 255, 65, 0.30);
    stroke-width: 0.9;
}
.usmap-active:hover {
    fill: rgba(0, 255, 65, 0.22);
    stroke: #00FF41;
    stroke-width: 1.3;
    filter: url(#usmap-glow);
}
.usmap-active.usmap-selected {
    fill: rgba(0, 255, 65, 0.30);
    stroke: #00FF41;
    stroke-width: 1.4;
    filter: url(#usmap-glow);
}
.usmap-inactive {
    fill: #131313;
    stroke: #1C1C1C;
    stroke-width: 0.5;
    cursor: pointer;
}
.usmap-inactive:hover {
    fill: #1A1A1A;
    stroke: #2A2A2A;
}

/* ── Labels ── */
.usmap-label {
    font-size: 8px;
    fill: rgba(255, 255, 255, 0.18);
    text-anchor: middle;
    pointer-events: none;
    font-weight: 600;
    font-family: 'Hanken Grotesk', 'Inter', system-ui, sans-serif;
}

/* ── LED Dots ── */
.usmap-led {
    fill: #38BDF8;
    pointer-events: none;
    filter: drop-shadow(0 0 3px rgba(56, 189, 248, 0.5));
}

/* ── Legend ── */
.usmap-legend {
    position: absolute;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%) translateY(16px);
    z-index: 20;
    display: flex;
    gap: 24px;
    padding: 10px 24px;
    border-radius: 40px;
    background: rgba(15, 15, 15, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}
.usmap-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.55);
    white-space: nowrap;
    font-family: 'Inter', system-ui, sans-serif;
}
.usmap-legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.usmap-legend-dot.active {
    background: #00FF41;
    box-shadow: 0 0 6px rgba(0, 255, 65, 0.5);
}
.usmap-legend-dot.live {
    background: #38BDF8;
    box-shadow: 0 0 6px rgba(56, 189, 248, 0.5);
}
.usmap-legend-dot.soon {
    background: #333;
    border: 1px solid #555;
}

/* ── Tooltip ── */
.usmap-tooltip {
    position: fixed;
    z-index: 9999;
    padding: 8px 14px;
    border-radius: 8px;
    background: rgba(15, 15, 15, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    font-family: 'Inter', system-ui, sans-serif;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease;
    white-space: nowrap;
}
.usmap-tooltip.usmap-visible {
    opacity: 1;
}
.usmap-tooltip-sub {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.45);
    margin-top: 2px;
}

/* ── Overlay ── */
.usmap-overlay {
    position: fixed;
    inset: 0;
    z-index: 998;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.usmap-overlay.usmap-visible {
    opacity: 1;
    pointer-events: auto;
}

/* ── Detail Panel ── */
.usmap-panel {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 999;
    width: 360px;
    max-width: 100vw;
    background: rgba(12, 12, 12, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-left: 1px solid rgba(255, 255, 255, 0.06);
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    overscroll-behavior: contain;
    display: flex;
    flex-direction: column;
    font-family: 'Inter', system-ui, sans-serif;
}
.usmap-panel.usmap-visible {
    transform: translateX(0);
}

/* Panel Header */
.usmap-p-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.usmap-p-name {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    font-family: 'Hanken Grotesk', 'Inter', system-ui, sans-serif;
}
.usmap-p-tag {
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.usmap-p-tag.usmap-tag-active {
    background: rgba(0, 255, 65, 0.12);
    color: #00FF41;
    border: 1px solid rgba(0, 255, 65, 0.2);
}
.usmap-p-tag.usmap-tag-soon {
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.08);
}
.usmap-p-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    font-size: 24px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    line-height: 1;
    transition: color 0.15s, background 0.15s;
}
.usmap-p-close:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
}

/* Panel Sections */
.usmap-p-section {
    padding: 16px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.usmap-p-section-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.35);
    margin-bottom: 12px;
}

/* Legal Framework Grid */
.usmap-p-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.usmap-p-cell {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.usmap-p-cell-label {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.35);
}
.usmap-p-cell-value {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
}

/* Crash Stats Rows */
.usmap-p-stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}
.usmap-p-stat-row:last-child {
    border-bottom: none;
}
.usmap-p-stat-label {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.55);
}
.usmap-p-stat-value {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
}
.usmap-p-stat-value.usmap-rank {
    color: #00FF41;
}

/* Pricing Rows */
.usmap-p-price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}
.usmap-p-price-row:last-child {
    border-bottom: none;
}
.usmap-p-price-type {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.65);
}
.usmap-p-price-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.usmap-p-price-dot.green {
    background: #00FF41;
    box-shadow: 0 0 4px rgba(0, 255, 65, 0.4);
}
.usmap-p-price-dot.silver {
    background: #94A3B8;
}
.usmap-p-price-dot.amber {
    background: #F59E0B;
    box-shadow: 0 0 4px rgba(245, 158, 11, 0.4);
}
.usmap-p-price-val {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
}

/* Panel Footer / CTAs */
.usmap-p-footer {
    padding: 16px 24px 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: auto;
}
.usmap-p-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
    text-align: center;
}
.usmap-p-btn:active {
    transform: scale(0.98);
}
.usmap-p-btn.primary {
    background: #00FF41;
    color: #000;
}
.usmap-p-btn.primary:hover {
    background: #00E63A;
}
.usmap-p-btn.secondary {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.08);
}
.usmap-p-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.10);
}

/* ── Mobile ── */
@media (max-width: 767px) {
    .usmap-legend {
        gap: 12px;
        padding: 8px 16px;
        bottom: 12px;
    }
    .usmap-legend-item {
        font-size: 10px;
        gap: 5px;
    }
    .usmap-legend-dot {
        width: 6px;
        height: 6px;
    }

    .usmap-panel {
        top: auto;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        max-height: 85vh;
        border-left: none;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        border-radius: 16px 16px 0 0;
        transform: translateY(100%);
    }
    .usmap-panel.usmap-visible {
        transform: translateY(0);
    }

    .usmap-p-header {
        padding: 16px 20px 12px;
    }
    .usmap-p-section {
        padding: 12px 20px;
    }
    .usmap-p-footer {
        padding: 12px 20px 20px;
    }
    .usmap-p-name {
        font-size: 18px;
    }

    .usmap-tooltip {
        display: none;
    }
}
