/**
 * Mobile Responsiveness Overrides
 * Only active on screens < 1024px
 */

@media (max-width: 1024px) {
    /* Base Layout Reset */
    body { 
        overflow-y: auto !important; 
        height: auto !important; 
        flex-direction: column !important; 
    }

    /* Header Control */
    header {
        flex-direction: row !important;
        padding: 0.75rem 1.25rem !important;
        height: auto !important;
        min-height: 70px !important;
        gap: 0.5rem !important;
        justify-content: space-between !important;
    }

    header > div {
        width: auto !important;
        justify-content: flex-start !important;
    }

    header > div:last-child {
        justify-content: flex-end !important;
    }

    #user-nav {
        gap: 0.5rem !important;
    }

    #btn-mobile-menu {
        display: flex !important;
        align-items: center;
        justify-content: center;
    }

    /* Sidebar Mobile */
    #main-sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        transform: translateX(-100%);
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 100;
        display: flex !important;
    }

    body.menu-open #main-sidebar {
        transform: translateX(0);
    }

    /* Main Container Padding Adjustment */
    main {
        padding-bottom: 5rem !important;
        height: auto !important;
        min-height: 100vh;
        width: 100% !important;
    }

    section {
        padding: 1.5rem !important;
    }

    /* Action Bar (Slim) */
    #action-bar {
        left: 0 !important; 
        right: 0 !important; 
        bottom: 0 !important;
        transform: translate(0, 100%) !important;
        width: 100% !important;
        border-radius: 2rem 2rem 0 0 !important;
        padding: 1.25rem 1.5rem !important;
        gap: 1rem !important;
        flex-direction: row !important;
        box-shadow: 0 -10px 30px rgba(0,0,0,0.5) !important;
    }
    #action-bar.translate-y-0 { transform: translate(0, 0) !important; }

    /* Planning Grid */
    #planning-container:not(.global-view) {
        max-width: 100% !important;
    }

    .slot-compact {
        padding: 0 1.25rem !important;
        gap: 1rem !important;
        height: 60px !important;
    }
}