/* static/css/responsive.css */

/* Apply styles for screens up to 768px wide (standard mobile/tablet break) */
@media (max-width: 768px) {

    /* --- Sidebar in Mobile: Off-Canvas by Default --- */
    #sidebar {
        /* Remove desktop margin/shift */
        width: 250px; 
        
        /* Slide it completely off-screen to the left */
        transform: translateX(-100%); 
        
        /* Ensure it covers everything else when open */
        box-shadow: 2px 0 5px rgba(0,0,0,0.5); 
    }

    /* When the 'active' class is toggled by JS, slide it into view */
    #sidebar.active {
        transform: translateX(0);
    }
    
    /* --- Main Content in Mobile --- */
    .content {
        /* Reset margin, content takes full width */
        margin-left: 0; 
        padding-top: 60px; /* Account for navbar */
    }

    /* --- Toggle Button in Mobile: Show It! --- */
    .sidebar-toggle-btn {
        display: block; /* Show the button on mobile */
        background: none;
        border: none;
        color: white;
        font-size: 24px;
        cursor: pointer;
        padding: 0 10px;
    }

    /* Overlay effect when sidebar is open */
    body.sidebar-open::after {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 49; /* Below the sidebar (50) but above content */
    }

    /* --- FIX: Lock background scroll when sidebar is open --- */
    body.sidebar-open {
        overflow: hidden;
    }
}
