/* =========================================================
   TIMA Radar v3 — Responsive Overrides
   Mobile/tablet layouts for all three views.
   Include AFTER the view-specific CSS file.
   ========================================================= */

/* ── Shared Mobile Controls ──────────────────────────────── */
.mobile-toggle {
    display: none;
    position: fixed;
    z-index: 50;
    width: 36px; height: 36px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    transition: transform 0.2s;
}
.mobile-toggle:active { transform: scale(0.92); }

/* Tornado prediction toggle — always visible */
.tor-toggle {
    display: flex !important;
    position: fixed;
    bottom: 60px; right: 12px;
    z-index: 50;
    width: auto; height: auto;
    padding: 5px 10px;
    border-radius: 20px;
    border: 1px solid rgba(255,23,68,0.3);
    background: rgba(255,23,68,0.1);
    color: #FF1744;
    font-family: monospace;
    font-size: 10px;
    font-weight: 700;
    cursor: pointer;
    letter-spacing: 0.05em;
    backdrop-filter: blur(8px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    transition: all 0.2s;
}
.tor-toggle.off {
    background: rgba(100,100,100,0.1);
    border-color: rgba(100,100,100,0.3);
    color: #888;
}

/* Slide drawer base */
.drawer { transition: transform 0.3s ease, opacity 0.3s ease; }
.drawer.hidden { transform: translateX(-100%); opacity: 0; pointer-events: none; }
.drawer.hidden-right { transform: translateX(100%); opacity: 0; pointer-events: none; }

/* ══════════════════════════════════════════════════════════
   02 · MODERN MINIMAL — Responsive
   ══════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    /* Topnav */
    #topnav { padding: 0 12px; height: 48px; }
    .nav-links { display: none; }
    .nav-brand { font-size: 16px; }
    .nav-right .btn-signin { font-size: 11px; padding: 5px 12px; }
    .mode-switch { display: none !important; }

    /* Hamburger for Minimal */
    .min-hamburger {
        display: flex !important;
        align-items: center; justify-content: center;
        width: 32px; height: 32px;
        background: var(--bg-card); border: 1px solid var(--border); border-radius: 6px;
        font-size: 18px; cursor: pointer; color: var(--text-secondary);
    }

    /* Search bar */
    #search-bar { width: calc(100% - 24px); top: 56px; }
    #search-bar .shortcut { display: none; }

    /* Float cards — hidden by default on mobile */
    #alerts-card { display: none; position: fixed; top: 100px; left: 8px; right: 8px; width: auto; max-height: 50vh; overflow-y: auto; z-index: 60; }
    #alerts-card.show { display: block; }
    #layers-card { display: none; position: fixed; top: 100px; right: 8px; left: auto; width: 220px; z-index: 60; }
    #layers-card.show { display: block; }
    #radar-card { display: none; position: fixed; bottom: 60px; left: 8px; right: 8px; width: auto; z-index: 60; }
    #radar-card.show { display: block; }

    /* Mobile panel buttons */
    .mob-btn-alerts, .mob-btn-layers, .mob-btn-radar {
        display: flex !important;
        position: fixed; z-index: 55;
        padding: 6px 10px; border-radius: 8px;
        font-family: var(--font-mono, monospace); font-size: 10px; font-weight: 600;
        border: 1px solid var(--border, #E5E5E0);
        background: var(--bg-card, #fff);
        color: var(--text-secondary, #6B6B65);
        cursor: pointer; box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    }
    .mob-btn-alerts { top: 56px; left: 8px; }
    .mob-btn-layers { top: 56px; right: 8px; }
    .mob-btn-radar { bottom: 56px; left: 8px; }
    .mob-btn-alerts.active, .mob-btn-layers.active, .mob-btn-radar.active {
        background: var(--brand-blue, #3566D8); color: white; border-color: var(--brand-blue, #3566D8);
    }

    /* Bottom bar */
    #bottombar { padding: 0 8px; height: 44px; gap: 8px; }
    .speed-btns .speed-btn { padding: 3px 6px; font-size: 9px; }
    #live-btn { padding: 3px 8px; font-size: 9px; }
    .loop-label { font-size: 9px; }

    /* Tor toggle position */
    .tor-toggle { bottom: 52px; right: 8px; }
}

/* ══════════════════════════════════════════════════════════
   01 · PRO METEOROLOGIST — Responsive
   ══════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    /* Topbar */
    #topbar { padding: 0 8px; height: 32px; font-size: 9px; }
    #topbar .nav { display: none; }
    #topbar .brand { font-size: 12px; }
    #topbar .status-right { gap: 6px; }
    #topbar .status-right > span:not(.live-badge):not(#clock-utc) { display: none; }

    /* Station panel — drawer */
    #station-panel {
        position: fixed; top: 32px; right: 0; bottom: 0;
        width: 260px; z-index: 40;
        transform: translateX(100%);
        transition: transform 0.3s ease;
    }
    #station-panel.show { transform: translateX(0); }

    /* Pro hamburger */
    .pro-panel-toggle {
        display: flex !important;
        position: fixed; top: 40px; right: 8px; z-index: 45;
        padding: 5px 10px; border-radius: 6px;
        background: var(--bg-card, #121820); border: 1px solid var(--border, #1A2230);
        color: var(--cyan, #00E5FF); font-family: var(--font-mono, monospace);
        font-size: 10px; font-weight: 600; cursor: pointer;
    }

    /* Bottom bar */
    #bottombar { padding: 0 6px; height: 40px; gap: 4px; }
    #legend .legend-range { display: none; }
    #legend-bar { width: 100px; }
}

/* ══════════════════════════════════════════════════════════
   03 · CHASE MODE — Responsive
   ══════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    /* Topbar */
    #chase-topbar { padding: 0 6px; height: 28px; }
    .chase-brand .chase-badge { display: none; }
    .topbar-telemetry { gap: 6px; font-size: 9px; }
    .topbar-telemetry .telem-item:not(#telem-spd):not(#chase-clock) { display: none; }

    /* Panels — hidden by default */
    #targets-panel {
        position: fixed; top: 28px; left: 0; bottom: 0;
        width: 240px; z-index: 40;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    #targets-panel.show { transform: translateX(0); }

    #intel-panel {
        position: fixed; top: 28px; right: 0; bottom: 0;
        width: 280px; z-index: 40;
        transform: translateX(100%);
        transition: transform 0.3s ease;
    }
    #intel-panel.show { transform: translateX(0); }

    /* Map takes full width */
    #chase-map-wrap { width: 100%; }

    /* Chase panel toggles */
    .chase-toggle-targets, .chase-toggle-intel {
        display: flex !important;
        position: fixed; z-index: 45;
        padding: 5px 10px; border-radius: 4px;
        font-family: var(--font-mono, monospace); font-size: 9px; font-weight: 700;
        cursor: pointer; letter-spacing: 0.08em;
    }
    .chase-toggle-targets {
        top: 34px; left: 8px;
        background: rgba(10,12,16,0.85); border: 1px solid #1A1E28; color: #00E5FF;
    }
    .chase-toggle-intel {
        top: 34px; right: 8px;
        background: rgba(10,12,16,0.85); border: 1px solid #1A1E28; color: #FFB300;
    }

    /* Bottom bar */
    #chase-bottombar { padding: 0 6px; height: 32px; }
}

/* ── Desktop: hide mobile-only elements ──────────────────── */
@media (min-width: 769px) {
    .min-hamburger, .mob-btn-alerts, .mob-btn-layers, .mob-btn-radar,
    .pro-panel-toggle, .chase-toggle-targets, .chase-toggle-intel {
        display: none !important;
    }
}

/* Fix: hide long info text on mobile, just show coords */
@media (max-width: 768px) {
    #infobar { flex-direction: column; gap: 2px; padding: 4px 10px; }
    #infobar-context { display: none; }
    #infobar .coord { font-size: 10px; }
}

/* Fix: tornado banner below nav, not overlapping */
#tor-banner { top: auto !important; bottom: auto; position: fixed; top: 36px !important; }
@media (max-width: 768px) { #tor-banner { top: 48px !important; font-size: 10px; padding: 5px 10px; } }

/* Fix: tornado banner at bottom on mobile, above bottom bar */
@media (max-width: 768px) {
    #tor-banner { top: auto !important; bottom: 44px; font-size: 10px; padding: 4px 10px; }
    .tor-toggle { bottom: 90px; }
}
