/**
 * Mobile Responsiveness Overrides
 * Only active on screens < 1024px
 */

@media (max-width: 1024px) {
    /* Surgical Header Control - Only hide desktop-specific nav items if needed, 
       but preserve the header structure itself */
    /* .lg\:flex,
    .lg\:block { 
        display: none !important; 
    } */

    /* Ensure the header is visible and properly stacked on mobile */
    header {
        flex-direction: column !important;
        padding: 1.5rem !important;
        gap: 1.5rem !important;
        border-radius: 2rem !important;
    }

    header .flex {
        width: 100%;
        justify-content: center;
        gap: 1rem;
    }

    #main-sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 50;
        display: flex !important; /* Ensure it exists to be animated */
    }

    #main-sidebar.active {
        transform: translateX(0);
    }

    /* Base Layout Reset */
    body { 
        overflow-y: auto !important; 
        height: auto !important; 
        flex-direction: column !important; 
    }

    /* Main Container Padding Adjustment */
    main {
        padding-bottom: 5rem !important;
        height: auto !important;
        min-height: 100vh;
    }

    /* Section Overrides */
    .section-content {
        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: 1rem 1.5rem !important;
        gap: 1rem !important;
        flex-direction: row !important;
    }
    #action-bar.translate-y-0 { transform: translate(0, 0) !important; }

    /* Planning Grid (Vertical) */
    .timeline-grid { 
        display: flex !important;
        flex-direction: column !important;
        gap: 2rem !important;
    }
}