/* Global DatePicker Fixes */
.DateInput_portal {
    z-index: 10000 !important;
    position: fixed !important;
}

/* Container of the popup calendar - Force correct positioning */
.SingleDatePicker_picker {
    z-index: 10001 !important;
    background-color: white !important;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3) !important;
    left: 0 !important;
    top: 48px !important;
    /* Approximate height of input to push it down */
}

.CalendarDay {
    z-index: 10002 !important;
}

.DayPicker {
    background-color: white !important;
    z-index: 10002 !important;
}

.DayPicker_transitionContainer {
    background-color: white !important;
}

.DayPicker_weekHeader {
    z-index: 10002 !important;
}

/* for potential transparent background */
.SingleDatePicker_picker__portal {
    background-color: rgba(0, 0, 0, 0.5) !important;
    z-index: 9999 !important;
}

.CalendarMonth_caption {
    color: #484848 !important;
}

.Select-menu-outer {
    z-index: 10000 !important;
}

/* Wrapper alignment fix */
.SingleDatePicker {
    display: block !important;
}


.SingleDatePickerInput {
    display: block !important;
}

RESPONSIVE LAYOUT & SIDEBAR TRANSITIONS

/* 1. Sidebar Transitions */
#sidebar {
    transition: transform 0.3s ease-in-out;
    z-index: 2000 !important;
    /* Above content */
}

/* 2. Mobile & Tablet View (< 992px) */
@media (max-width: 992px) {

    /* Hide Sidebars by default */
    #sidebar {
        transform: translateX(-100%);
        width: 250px !important;
        /* Fixed width for better mobile detail */
        top: 80px !important;
        bottom: 0 !important;
        height: calc(100vh - 80px) !important;
        box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
    }

    #right_sidebar {
        display: none !important;
        /* Hide Right Sidebar on Mobile to save space */
    }

    /* Show Sidebar when active class is added via Callback */
    #sidebar.active {
        transform: translateX(0);
    }

    /* Content Area Adjustment - Full Width */
    #page-content {
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding: 1rem !important;
        width: 100% !important;
        height: auto !important;
        /* Allow content to dictate height */
        min-height: calc(100vh - 120px) !important;
    }
}

/* Ensure the main container doesn't restrict vertical scroll */
html,
body {
    height: auto !important;
    min-height: 100vh;
    overflow-y: visible !important;
}

#nav-container {
    z-index: 2000;
}


/* 3. Utilities */

/* 
   RESPONSIVE DATA TABLES
  */
.responsive-table-container {
    overflow-x: auto;
    width: 100%;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 20px;
    border: 1px solid #eee;
}

.Select-menu-outer {
    z-index: 10000 !important;
}

/* Fix Modal Z-Index to be above Sidebar (2000) */
.modal {
    z-index: 2100 !important;
}

.modal-backdrop {
    z-index: 2050 !important;
}

/* Production Plan Mobile Form Enhancements */
@media (max-width: 991px) {
    .border-bottom-mobile {
        border-bottom: 2px solid #f0f0f0 !important;
        padding-bottom: 15px !important;
        margin-bottom: 15px !important;
    }

    .shadow-sm-mobile {
        box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
        padding: 10px;
        border-radius: 8px;
        background-color: #fdfdfd;
    }
}