/* Mobile Sidebar Overlay Fix - Override mobile.css */
/* This fixes the overlay to actually cover the screen and be clickable */

@media (max-width: 768px) {
    /* FORCE sidebar to start closed on mobile */
    .sidebar {
        transform: translateX(-100%) !important;
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    }
    
    /* Only show sidebar when explicitly opened */
    .sidebar.mobile-open,
    .sidebar.active {
        transform: translateX(0) !important;
    }
    
    /* Override the broken overlay from mobile.css */
    .mobile-sidebar-overlay {
        display: block !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100% !important;
        height: 100% !important;
        background: rgba(0, 0, 0, 0.85) !important;
        z-index: 1099 !important;
        opacity: 0 !important;
        visibility: hidden !important;
        transition: opacity 0.3s ease, visibility 0s linear 0.3s !important;
        pointer-events: none !important;
        cursor: pointer !important;
        -webkit-tap-highlight-color: transparent !important;
    }

    .mobile-sidebar-overlay.active {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
        transition: opacity 0.3s ease, visibility 0s linear 0s !important;
    }
    
    /* Ensure sidebar is above overlay */
    .sidebar {
        z-index: 1100 !important;
    }
    
    .sidebar.mobile-open {
        z-index: 1100 !important;
    }
}
