/*
 * mobile.css — RF HiRes Dash mobile sidebar drawer
 * Drop into assets/ — Dash auto-loads all CSS files in assets/.
 * v2026-05-14.1
 *
 * Desktop: no effect whatsoever (everything is inside @media max-width).
 * Mobile (≤ 768px):
 *   - Sidebar becomes a fixed off-screen drawer that slides in from the left.
 *   - A ☰ hamburger button floats over the map (top-left, below nav).
 *   - A semi-transparent overlay behind the drawer closes it on tap.
 */

/* ── Hamburger button ────────────────────────────────────────────────────── */

/* Hidden on desktop — shown only inside the media query below */
.sidebar-toggle-btn {
    display: none;
}

/* ── Tap-to-close overlay ────────────────────────────────────────────────── */

.sidebar-overlay {
    display: none;           /* shown/hidden by JS callback */
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 999;            /* above map, below sidebar */
    cursor: pointer;
}

/* ── Mobile breakpoint ───────────────────────────────────────────────────── */

@media (max-width: 768px) {

    /* Hamburger — fixed, floats over map below nav bar */
    .sidebar-toggle-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        position: fixed;
        top: 64px;            /* 56px nav + 8px gap */
        left: 10px;
        z-index: 1100;        /* above sidebar overlay */
        width: 40px;
        height: 40px;
        background: var(--primary-blue, #2E5090);
        color: #ffffff;
        border: none;
        border-radius: 8px;
        font-size: 20px;
        line-height: 1;
        cursor: pointer;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
        transition: background 0.2s;
    }

    .sidebar-toggle-btn:active {
        background: var(--accent-teal, #00BCD4);
    }

    /* Sidebar — taken out of flow, slides in from left */
    #sidebar-container {
        position: fixed !important;
        top: 56px;            /* flush under nav bar */
        left: 0;
        bottom: 0;
        width: 290px;
        max-width: 85vw;
        z-index: 1000;
        overflow-y: auto;
        transform: translateX(-100%);
        transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.3);
        /* Background comes from sidebar's own styles; ensure it's opaque */
        background: var(--sidebar-bg, #1E3A5F);
    }

    /* Open state — toggled by JS callback */
    #sidebar-container.sidebar-open {
        transform: translateX(0);
    }

    /* Map+results column fills full width since sidebar is out of flow */
    .coverage-layout > div:last-child {
        width: 100% !important;
        flex: 1 !important;
    }
}
