/* ===== MOBILE RESPONSIVE ===== */
@media (max-width: 768px) {

    .tab-pane {
        min-width: 500px;
        /* Adjust container to accommodate scaled content */
    }

    .filters-container {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .input-group {
        min-width: 100%;
    }

    .input-group-text {
        min-width: 80px;
        flex: 0 0 80px;
        font-size: 0.8rem;
    }

    .btn-group .btn {
        font-size: 0.8rem;
        padding: 0.3rem 0.2rem;
    }

    .bootstrap-select .dropdown-toggle {
        font-size: 0.8rem !important;
        padding: 0.3rem 0.5rem !important;
    }

    .filter-panel.expanded~.filter-panel-backdrop {
        opacity: 1;
        visibility: visible;
    }

    /* Mobile dropdown adjustments */
    .nav-tabs .dropdown-menu {
        font-size: 1rem !important;
        /* Smaller font on mobile */
        min-width: 100px !important;
        /* Smaller minimum width */
        max-width: calc(100vw - 40px) !important;
        /* Prevent overflow */
    }

    .nav-tabs .dropdown-item {
        padding: 0.3rem 0.6rem !important;
        /* Smaller padding on mobile */
        font-size: 1rem !important;
        /* Smaller font */
    }

}

/* Very narrow screens */
@media (max-width: 480px) {

    .tab-pane {
        min-width: 400px;
    }

    .nav-tabs .dropdown-menu {
        position: fixed !important;
        /* Use fixed positioning */
        z-index: 9999 !important;
        min-width: 90px !important;
        /* Even smaller minimum */
        max-width: calc(100vw - 20px) !important;
        /* Allow some margin */
        font-size: 0.9rem !important;
        /* Even smaller font */
        /* Remove left/right positioning - let JavaScript handle it */
    }

    .nav-tabs .dropdown-item {
        padding: 0.25rem 0.5rem !important;
    }

}