/* Mobile (<768px) */
@media (max-width: 768px) {
    :root {
        --panel-width: 0px;
        --topbar-height: 48px;
    }

    /* Top bar compact */
    .topbar { padding: 0 8px; gap: 8px; }
    .topbar-logo span { display: none; }
    .topbar-search { max-width: none; }

    .topbar-conditions {
        gap: 8px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .topbar-conditions::-webkit-scrollbar { display: none; }

    .condition-chip .label-text { display: none; }

    /* Map full width */
    #map { left: 0 !important; }

    /* Left panel as bottom sheet */
    .left-panel {
        top: auto;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        height: auto;
        max-height: 75vh;
        border-right: none;
        border-top: 1px solid var(--border-color);
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
        transform: translateY(calc(100% - 56px));
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .left-panel.collapsed { transform: translateY(100%); }
    .left-panel.expanded { transform: translateY(0); }

    .bottom-sheet-handle {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 10px 0 6px;
        cursor: grab;
        touch-action: none;
    }

    .bottom-sheet-handle::after {
        content: '';
        width: 36px;
        height: 4px;
        background: rgba(255,255,255,0.2);
        border-radius: 2px;
    }

    .bottom-sheet-tabs {
        display: flex;
        gap: 4px;
        padding: 0 10px 10px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .bottom-sheet-tabs::-webkit-scrollbar { display: none; }

    .bottom-sheet-tab {
        padding: 8px 14px;
        font-size: 12px;
        font-weight: 600;
        color: var(--text-secondary);
        background: rgba(255,255,255,0.04);
        border: 1px solid var(--border-color);
        border-radius: 16px;
        white-space: nowrap;
        cursor: pointer;
        transition: all var(--transition);
        -webkit-tap-highlight-color: transparent;
    }

    .bottom-sheet-tab.active {
        background: rgba(255,255,255,0.1);
        color: var(--text-primary);
        border-color: var(--border-light);
    }

    .panel-toggle {
        display: flex;
        bottom: 64px;
        left: 10px;
        top: auto;
    }

    /* Right panel full-width on mobile */
    .right-panel {
        width: 100%;
        top: var(--topbar-height);
    }

    .right-panel-header { padding: 10px 14px; }
    .right-panel-title { font-size: 15px; }
    .right-panel-content { padding: 12px; }

    /* Filter pills scroll */
    .filter-pills {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding: 8px 10px;
    }

    .filter-pills::-webkit-scrollbar { display: none; }

    .filter-pill {
        padding: 6px 12px;
        font-size: 12px;
        -webkit-tap-highlight-color: transparent;
    }

    /* Bigger touch targets for action buttons */
    .panel-action-btn {
        padding: 12px 14px;
        font-size: 14px;
        min-height: 44px;
    }

    /* Section items bigger on mobile */
    .section-item {
        padding: 12px 14px !important;
    }

    /* Cards more compact */
    .card-body { padding: 10px 12px; }
    .card-stat { padding: 5px 0; }

    /* Float plan dropdowns bigger */
    .right-panel-content select {
        min-height: 44px;
        font-size: 14px;
    }

    /* Map controls */
    .map-style-control { bottom: 70px; }
    .locate-btn { bottom: 70px; left: 10px; }

    /* Safety banner */
    .safety-banner {
        font-size: 11px;
        padding: 8px 12px;
    }
}

/* Small phones (<375px) */
@media (max-width: 375px) {
    .topbar-conditions { display: none; }
    .topbar-search input { font-size: 14px; }

    .filter-pill { padding: 5px 8px; font-size: 11px; }
    .filter-pill .count { display: none; }
}

/* Tablet (769-1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    :root { --panel-width: 300px; }
    .right-panel { width: 360px; }
    .bottom-sheet-handle { display: none; }
    .bottom-sheet-tabs { display: none; }
    .panel-toggle { display: flex; }
}

/* Desktop (>1024px) */
@media (min-width: 1025px) {
    .bottom-sheet-handle { display: none; }
    .bottom-sheet-tabs { display: none; }
    .panel-toggle { display: none; }
}
