/* Layout-specific styles */
.main-content-container {
    margin-top: 76px;
}

/* Bootstrap navbar fix - ensure navbar has highest z-index */
.navbar.fixed-top {
    z-index: 1070 !important; /* Updated to 1070 as requested */
}

/* Navbar dropdowns should be just below navbar but above everything else */
.navbar .dropdown-menu {
    z-index: 1065 !important; /* Updated to 1065 as requested */
}

/* Reports page specific styles - container should be below navbar */
.reports-filter-panel {
    position: relative;
    z-index: 1020; /* Below navbar but above content */
}

.reports-content-area {
    position: relative;
    z-index: 1; /* Normal content layer */
}

/* Filter panel dropdowns - below navbar but above content */
.filter-panel .dropdown-menu {
    z-index: 1040 !important; /* Below navbar and navbar dropdowns */
}

    .filter-panel .dropdown-menu.show {
        z-index: 1040 !important;
    }

.filter-panel .dropdown.show {
    z-index: 1035 !important; /* Container z-index when dropdown is shown */
}

/* Ensure filter panel containers allow dropdown overflow */
.filter-panel {
    overflow: visible !important;
}

    .filter-panel .card-body {
        overflow: visible !important;
    }

/* General dropdown z-index - below navbar */
.dropdown-menu {
    z-index: 1030 !important;
    background: white !important;
    border: 1px solid #dee2e6 !important;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.25) !important;
}

    .dropdown-menu.show {
        z-index: 1030 !important;
        opacity: 1 !important;
        visibility: visible !important;
    }

/* Fix for any modal or overlay conflicts */
.modal {
    z-index: 1055; /* Above navbar for modals */
}

.modal-backdrop {
    z-index: 1050; /* Same level as navbar */
}

/* Loading overlay should be highest */
#loadingOverlay {
    z-index: 9999 !important;
}

/* Specific fix for cards and panels - should not override navbar */
.card {
    z-index: auto; /* Let normal stacking work */
}

    .card.filter-panel {
        z-index: 1020; /* Specific override only for filter panel cards */
    }

/* Fix for filter panel card specifically */
#filtersPanel .card {
    z-index: 1020 !important; /* Below navbar */
}

/* Ensure all tables and content areas are below dropdowns */
.table-responsive {
    z-index: 1;
}

.report-results {
    z-index: 1;
}

/* Fix for dropdown menu content bleeding through */
.dropdown-menu .form-check {
    background: white !important;
    z-index: inherit;
}

.dropdown-menu hr {
    background: white !important;
    z-index: inherit;
}

.dropdown-menu .btn-link {
    background: white !important;
    z-index: inherit;
}
