/* Shared dashboard heading style */
.dashboard-heading {
    text-align: center;
    margin-top: 0px;
    margin-bottom: 12px;
    color: #fff;
    font-weight: bold;
    font-size: 2rem;
}

/* ========================================
   GLOBAL STYLES
   ======================================== */

/* General body and container styles */
body {
    background-color: #041D38;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    color: #fff;
    line-height: 1.6;
}

/* Text shadow for title */
.display-3 {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

/* ========================================
   NAVIGATION STYLES
   ======================================== */

/* Navbar custom styling - override Bootstrap */
.navbar-custom,
.navbar-custom.navbar,
.navbar-custom.navbar-expand-lg,
.navbar.bg-primary {
    background-color: #041D38 !important;
    background: #041D38 !important;
    border: none !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar-custom .navbar-nav .nav-link {
    color: white !important;
    font-weight: 500;
    transition: color 0.3s ease;
}

.navbar-custom .navbar-nav .nav-link:hover {
    color: #cccccc !important;
}

.navbar-custom .navbar-brand {
    font-weight: bold;
    font-size: 1.3rem;
    color: #ffffff !important;
}

.navbar-custom .navbar-toggler {
    border-color: white !important;
}

.navbar-custom .dropdown-menu {
    background-color: #041D38 !important;
    border: 1px solid #ffffff20 !important;
}

.navbar-custom .dropdown-item {
    color: white !important;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.navbar-custom .dropdown-item:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
    color: white !important;
}

/* ========================================
   CARD STYLES
   ======================================== */

/* Card styles */
.card {
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2) !important;
}

/* ========================================
   BUTTON STYLES
   ======================================== */

/* Button hover effects */
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(13, 110, 253, 0.4);
}

.btn-outline-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(13, 110, 253, 0.2);
}

.reset-dashboard-btn {
    width: 100%;
}

/* ========================================
   ICON ANIMATIONS
   ======================================== */

/* Icon animations */
.fas {
    transition: transform 0.3s ease;
}

.card:hover .fas {
    transform: scale(1.1);
}

/* ========================================
   DASHBOARD STYLES
   ======================================== */

/* Main dashboard container */
.dashboard-box {
    background: #041d38;
    border-radius: 18px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
    padding: 32px;
    margin-top: 32px;
    margin-bottom: 32px;
    color: #fff;
}

/* Header styles */
.dashboard-logo {
    height: 100px;
    margin-right: 36px;
    /* Make logo white */
    filter: brightness(0) invert(1);
}

.h2-white {
    color: #fff !important;
    font-weight: bold !important;
    font-size: 2rem;
}

/* Page container styling */
.page-container {
    min-height: calc(100vh - 56px);
    background: #041D38;
}

/* ========================================
   SIDEBAR STYLES
   ======================================== */

/* Sidebar styles */
.sidebar-content {
    background-color: #ffffff;
    padding: 20px;
    border-radius: 10px;
    color: #000;
    /* Black text for sidebar content */
}

/* Style for Dropdowns and Checklists inside the sidebar */
.sidebar-content .dcc-dropdown,
.sidebar-content .dcc-checklist {
    color: #000;
    /* Ensure text inside components is black */
}

.sidebar-content .sidebar-checklist label {
    color: #000 !important;
    /* Ensure checklist labels are black */
    font-weight: 500;
    display: block;
    padding: 2px 0;
}

.sidebar-content .sidebar-checklist input[type="checkbox"] {
    margin-right: 8px;
}

/* ========================================
   TABS AND CONTENT STYLES
   ======================================== */

/* Main content and Tabs */
.main-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.tab {
    padding: 12px 20px;
    font-weight: 500;
    color: #000;
    background-color: #e9ecef;
    border: 1px solid #dee2e6;
    border-bottom: none;
    cursor: pointer;
    margin-right: 2px;
    border-radius: 4px 4px 0 0;
}

.tab--selected {
    background-color: #fff !important;
    border-color: #dee2e6 #dee2e6 #fff;
    border-bottom: 2px solid #4e79a7 !important;
    color: #4e79a7;
}

/* ========================================
   GRAPH AND DATA VISUALIZATION
   ======================================== */

/* Graph and No-Data Message */
.dashboard-graph {
    /* Let the graph's container and the 'autosize' property handle the size */
    width: 100% !important;
    height: 100% !important;
    min-height: 450px;
    /* Provide a minimum height for smaller viewports */
}

.no-data-message {
    text-align: center;
    color: #fff;
    font-size: 24px;
    margin-top: 50px;
    padding: 20px;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

/* For tablets and smaller (less than 992px) */
@media (max-width: 991.98px) {
    .main-content {
        margin-top: 25px;
    }

    .h2-white {
        font-size: 1.5rem;
        text-align: center;
    }

    .dashboard-logo {
        display: block;
        margin-left: auto;
        margin-right: auto;
        margin-bottom: 15px;
    }
}

/* For mobile phones (less than 576px) */
@media (max-width: 576px) {
    .dashboard-box {
        padding: 15px;
    }

    .h2-white {
        font-size: 1.2rem;
    }

    .tab {
        font-size: 12px;
        padding: 8px 10px !important;
    }
}

/* ========================================
   DROPDOWN IMPROVEMENTS
   ======================================== */

/* Improve dropdown option spacing and readability */
.Select-menu-outer {
    max-height: 300px !important;
}

.VirtualizedSelectOption {
    height: 40px !important;
    line-height: 40px !important;
    padding: 0 12px !important;
    font-size: 14px !important;
}

/* Dash dropdown specific styling */
.dash-dropdown .Select-menu-outer {
    max-height: 300px !important;
}

.dash-dropdown .Select-option {
    padding: 8px 12px !important;
    line-height: 1.4 !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    min-height: 35px !important;
}

.dash-dropdown .Select-option:hover {
    background-color: #f5f5f5 !important;
}

/* Dropdown arrow color styling */
.dash-dropdown .Select-arrow-zone .Select-arrow {
    border-color: #041D38 transparent transparent !important;
}

.dash-dropdown .Select-control .Select-arrow-zone .Select-arrow {
    border-color: #041D38 transparent transparent !important;
}

/* For focused dropdown arrow */
.dash-dropdown .is-focused .Select-arrow {
    border-color: transparent transparent #041D38 !important;
}

/* React-Select v2+ arrow styling */
.dash-dropdown .css-1okebmr-indicatorSeparator {
    background-color: #041D38 !important;
}

.dash-dropdown .css-tlfecz-indicatorContainer,
.dash-dropdown .css-1gtu0rj-indicatorContainer {
    color: #041D38 !important;
}

/* ========================================
   MAJOR SELECTION CHECKLIST STYLES
   ======================================== */

/* Major Search Input */
.major-search-input {
    background-color: white;
    color: #333;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 8px 12px;
    font-size: 14px;
}

.major-search-input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, .25);
}

/* ========================================
   MAJOR SELECTION MODAL STYLES
   ======================================== */

/* Modal trigger button */
#cca-major-open-modal-btn {
    background-color: white;
    color: #333;
    border: 1px solid #007bff;
    text-align: left;
    padding: 8px 12px;
}

#cca-major-open-modal-btn:hover {
    background-color: #f8f9fa;
    border-color: #0056b3;
}

#cca-major-open-modal-btn:focus {
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, .25);
}

/* Modal content styling */
.modal-xl {
    max-width: 1200px !important;
    width: 90% !important;
}

.modal-lg {
    max-width: 800px;
    width: 800px;
}

.modal-dialog {
    margin: 1.75rem auto !important;
    max-width: 1200px !important;
}

.modal-dialog-centered {
    display: flex !important;
    align-items: center !important;
    min-height: calc(100% - 1rem) !important;
}

.modal-body {
    padding: 1.5rem;
    max-height: 600px;
}

.modal-header {
    border-bottom: 1px solid #dee2e6;
    padding: 1rem 1.5rem;
}

.modal-footer {
    border-top: 1px solid #dee2e6;
    padding: 1rem 1.5rem;
}

/* Enhanced major checklist for two-column layout */
.major-checklist {
    background-color: white;
    color: #333;
    column-count: 2;
    column-gap: 30px;
    column-fill: balance;
}

.major-checklist .form-check {
    margin-bottom: 10px;
    padding-left: 1.25rem;
    break-inside: avoid;
    page-break-inside: avoid;
}

.major-checklist .form-check-input {
    margin-top: 0.125rem;
}

.major-checklist .form-check-label {
    font-size: 14px;
    line-height: 1.4;
    cursor: pointer;
    color: #333;
    display: block;
    word-wrap: break-word;
    padding-right: 15px;
}

.major-checklist .form-check-label:hover {
    color: #007bff;
    background-color: #f8f9fa;
    padding: 2px 4px;
    border-radius: 3px;
}

.major-checklist .form-check-input:checked {
    background-color: #007bff;
    border-color: #007bff;
}

.major-checklist .form-check-input:focus {
    border-color: #80bdff;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, .25);
}

/* Responsive adjustments for smaller screens */
@media (min-width: 1300px) {
    .modal-xl {
        width: 1200px !important;
    }
}

@media (max-width: 1300px) {
    .modal-xl {
        max-width: 90vw !important;
        width: 90vw !important;
    }
}

@media (max-width: 992px) {
    .modal-xl {
        max-width: 95vw !important;
        width: 95vw !important;
    }
}

@media (max-width: 768px) {
    .modal-xl {
        max-width: 95vw !important;
        width: 95vw !important;
    }

    .major-checklist {
        column-count: 1;
    }

    .modal-body {
        padding: 1rem;
        max-height: 500px;
    }
}