:root {
    --primary-color: #31a9e0;
    --secondary-color: #a0d4ee;
    --shadow: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-hover: 0 4px 8px rgba(0,0,0,0.15);
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: #f5f5f5;
}

/* === MODIFIED: Header styles for accessibility and new logo === */
.header {
    background: var(--primary-color);
    box-shadow: var(--shadow);
    padding: 0;
    margin-bottom: 2rem;
}

.logo-img {
    max-height: 70px;
    height: auto;
    width: auto;
}

.navbar-brand {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.navbar .nav-link {
    font-weight: 500;
    color: #fff;
    /* Added for accessibility */
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.dropdown-menu {
    border-radius: 8px;
    box-shadow: var(--shadow-hover);
}
/* === END MODIFICATION === */


.footer {
    background: #000;
    color: white;
    padding: 2rem 0;
    margin-top: 3rem;
}

.footer a {
    color: var(--secondary-color);
    text-decoration: none;
}

.footer a:hover {
    color: white;
    text-decoration: underline;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    display: inline-block;
    margin-right: 1.5rem;
    margin-bottom: 0.5rem;
}

.card {
    border: none;
    border-radius: 8px;
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
    transition: box-shadow 0.3s ease;
}

.card:hover {
    box-shadow: var(--shadow-hover);
}

.card-header {
    background-color: var(--primary-color);
    color: white;
    border-radius: 8px 8px 0 0 !important;
    padding: 1rem 1.5rem;
    font-weight: 500;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    border-radius: 4px;
    text-transform: uppercase;
    font-weight: 500;
    letter-spacing: 0.5px;
    padding: 0.5rem 1.5rem;
}

.btn-primary:hover, .btn-primary:focus {
    background-color: #2891c5;
    border-color: #2891c5;
}

.btn-secondary {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    color: #333;
    border-radius: 4px;
    text-transform: uppercase;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.form-control, .form-select {
    border-radius: 4px;
    border: 1px solid #ddd;
    padding: 0.6rem 0.75rem;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(49, 169, 224, 0.25);
}

.form-label {
    font-weight: 500;
    color: #555;
    margin-bottom: 0.5rem;
}

table.dataTable {
    border-collapse: separate !important;
    border-spacing: 0;
}

table.dataTable thead th {
    background-color: var(--primary-color);
    color: white;
    border: none;
    font-weight: 500;
    padding: 1rem 0.75rem;
}

table.dataTable tbody td {
    padding: 0.75rem;
    vertical-align: middle;
}

table.dataTable tbody tr {
    background-color: white;
    transition: background-color 0.2s ease;
    cursor: pointer; /* For row click */
}

table.dataTable tbody tr:hover {
    background-color: #f8f9fa;
}

/* === ADDED: Meeting pattern separator style === */
.meeting-separator {
    border: 0;
    border-top: 2px solid #dee2e6;
    margin: 0.75rem 0;
    position: relative;
}

/* Make meeting patterns more distinct on mobile */
@media (max-width: 768px) {
    .meeting-separator {
        border-top: 2px dashed var(--primary-color);
        margin: 1rem 0;
        opacity: 0.6;
    }
}

.badge {
    padding: 0.4rem 0.8rem;
    border-radius: 12px;
    font-weight: 500;
}

.badge-open {
    background-color: #28a745;
}

.badge-closed {
    background-color: #dc3545;
}

.badge-waitlist {
    background-color: #ffc107;
    color: #333;
}

/* Class Number Button - District Color */
.btn-class-nbr {
    background: linear-gradient(135deg, #31a9e0 0%, #2891c4 100%);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    font-weight: 600;
    font-size: 1rem;
    border-radius: 6px;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(49, 169, 224, 0.3);
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-class-nbr:hover {
    background: linear-gradient(135deg, #2891c4 0%, #2079a8 100%);
    box-shadow: 0 3px 6px rgba(49, 169, 224, 0.4);
    transform: translateY(-1px);
}

.btn-class-nbr:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(49, 169, 224, 0.3);
}

/* Ensure Class Meeting Criteria displays horizontally on tablet/desktop */
@media (min-width: 769px) {
    #classMeetingCriteria {
        display: flex !important;
    }
}

.date-tooltip {
    cursor: help;
    border-bottom: 1px dotted var(--primary-color);
}

.date-icon {
    font-size: 1rem;
    vertical-align: middle;
    margin-right: 4px;
    color: var(--primary-color);
}

.popover {
    border-radius: 8px;
    box-shadow: var(--shadow-hover);
}

.popover-header {
    background-color: var(--primary-color);
    color: white;
    border-radius: 8px 8px 0 0;
}

.link-class-info {
    background-color: #f8f9fa;
    padding: 1rem;
    margin-top: 0.5rem;
    border-radius: 4px;
    border-left: 4px solid var(--secondary-color);
}

.material-icons {
    vertical-align: middle;
    font-size: 1.2rem;
}

.search-section {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 1rem;
    background-color: var(--secondary-color);
    border-radius: 16px;
    margin: 0.25rem;
    font-size: 0.9rem;
}

.btn-close-chip {
    background: none;
    border: none;
    font-size: 1.2rem;
    font-weight: bold;
    color: #555;
    margin-left: 0.5rem;
    padding: 0;
    line-height: 1;
    opacity: 0.7;
    cursor: pointer;
}

.btn-close-chip:hover {
    color: #000;
    opacity: 1;
}

#classTable_wrapper .dataTables_filter input {
    border-radius: 4px;
    border: 1px solid #ddd;
    padding: 0.5rem;
    margin-left: 0.5rem;
}

.dataTables_length select {
    border-radius: 4px;
    border: 1px solid #ddd;
    padding: 0.5rem;
    margin: 0 0.5rem;
    width: 50% !important;
}

#refreshTimer .badge {
    font-size: 0.9rem;
    padding: 0.5rem 0.75rem;
}

#refreshTimer .material-icons {
    font-size: 1rem;
    vertical-align: middle;
}

.card-header.bg-secondary {
    background-color: var(--secondary-color) !important;
    color: #333;
}

#advancedSearch .card {
    border: 2px solid var(--secondary-color);
    margin-bottom: 0;
}

.form-check-inline {
    margin-right: 0.75rem;
}

.form-check-inline .form-check-label {
    font-weight: 500;
}

.manual-control {
    cursor: pointer;
    text-align: center;
    color: var(--primary-color);
}

.manual-control:before {
    content: '+';
    font-size: 1.5rem;
    font-weight: bold;
    display: inline-block;
    width: 20px;
}

tr.shown .manual-control:before {
    content: '-';
}


.child-row-content {
    background-color: #f8f9fa;
    padding: 1.5rem;
    border-left: 4px solid var(--primary-color);
}

.child-row-content h5 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.child-row-content.campus-city { border-left-color: #be1e2d; }
.child-row-content.campus-city h5 { color: #be1e2d; }

.child-row-content.campus-mesa { border-left-color: #0054a4; }
.child-row-content.campus-mesa h5 { color: #0054a4; }

.child-row-content.campus-mira { border-left-color: #1e9097; }
.child-row-content.campus-mira h5 { color: #1e9097; }

.child-row-content .info-label {
    font-weight: 600;
    color: #555;
    display: inline-block;
    min-width: 150px;
}

.chain-icon {
    color: var(--primary-color);
    font-size: 1rem;
    vertical-align: middle;
    margin-left: 0.5rem;
}

/* === ADDED: Styles for Help Slide Drawer === */
.slide-drawer {
    position: fixed;
    top: 0;
    right: -450px; /* Start off-screen */
    width: 400px;
    max-width: 90%;
    height: 100%;
    background-color: white;
    box-shadow: -4px 0 15px rgba(0,0,0,0.15);
    z-index: 1056; /* Above modal backdrop */
    transition: right 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
}

.slide-drawer.is-open {
    right: 0;
}

.slide-drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #dee2e6;
    background-color: #f8f9fa;
}

.slide-drawer-header h5 {
    margin: 0;
}

.slide-drawer-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex-grow: 1;
}

.slide-drawer-body h6 {
    font-weight: bold;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

.slide-drawer-body p {
    margin-bottom: 1rem;
}

.slide-drawer-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 1055;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-in-out, visibility 0.3s;
}

.slide-drawer-backdrop.is-visible {
    opacity: 1;
    visibility: visible;
}

/* === ADDED: Floating Help Button styles === */
#floating-help-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

#floating-help-btn .material-icons {
    font-size: 2rem;
}


@media (max-width: 991px) {
    .navbar-collapse {
        background-color: var(--primary-color);
        padding: 1rem;
        border-top: 1px solid rgba(255,255,255,0.2);
        margin-top: 0.5rem;
    }
}

/* Collapse indicator rotation for Class Meeting Criteria */
.collapse-indicator {
    transition: transform 0.3s ease;
}

[aria-expanded="false"] .collapse-indicator {
    transform: rotate(0deg);
}

[aria-expanded="true"] .collapse-indicator {
    transform: rotate(180deg);
}

@media (max-width: 768px) {
    /* Mobile-specific adjustments */
    #floating-help-btn {
        width: 50px;
        height: 50px;
        bottom: 15px;
        right: 15px;
    }
    #floating-help-btn .material-icons {
        font-size: 1.5rem;
    }
    .search-section {
        padding: 1rem;
    }
    .search-section h4 {
        font-size: 1.2rem;
    }
    .form-label {
        font-size: 0.9rem;
    }
    .form-control, .form-select, .btn {
        font-size: 0.9rem;
    }
    .header {
        margin-bottom: 1rem;
    }
    .card-header {
        font-size: 0.9rem;
    }
    table.dataTable {
        font-size: 0.85rem;
    }

    /* Make collapsible filter header more obvious on mobile */
    .collapsible-filter-header {
        background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
        padding: 0.75rem 1rem !important;
        border-radius: 8px;
        margin-bottom: 1rem;
        cursor: pointer;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        border: none !important;
    }

    .collapsible-filter-header:hover {
        background: linear-gradient(135deg, #dee2e6 0%, #ced4da 100%);
        box-shadow: 0 3px 6px rgba(0,0,0,0.15);
    }

    .collapsible-filter-header::before {
        content: "👇 Tap to expand filters";
        display: block;
        font-size: 0.7em;
        color: #6c757d;
        font-weight: normal;
        margin-bottom: 0.25rem;
        letter-spacing: 0.5px;
    }

    .collapsible-filter-header[aria-expanded="true"]::before {
        content: "👆 Tap to collapse filters";
    }
}

#classTable_wrapper {
    width: 100%;
}

/* === MODIFIED: Hide headers based on class === */
.th-none {
    display: none;
}

@media (max-width: 768px) {
    /* Mobile: Only show Class #, Course & Title, and Status */
    .th-desktop {
        display: none !important;
    }

    /* Hide the manual expand/collapse control on mobile */
    table.dataTable td.manual-control {
        display: none !important;
    }

    table.dataTable th.manual-control {
        display: none !important;
    }

    /* Make the entire row look more clickable with better visual styling */
    table.dataTable tbody tr,
    table.dataTable tbody tr:nth-child(odd),
    table.dataTable tbody tr:nth-child(even),
    table.dataTable tbody tr.odd,
    table.dataTable tbody tr.even,
    table.dataTable.stripe tbody tr.odd,
    table.dataTable.stripe tbody tr.even,
    table.dataTable.display tbody tr.odd,
    table.dataTable.display tbody tr.even {
        cursor: pointer;
        border: 2px solid #dee2e6;
        border-radius: 8px;
        margin-bottom: 0.5rem;
        display: block;
        padding: 0.75rem;
        background-color: white !important;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }

    table.dataTable tbody tr:hover {
        box-shadow: 0 4px 8px rgba(0,0,0,0.15);
        border-color: var(--primary-color);
    }

    /* Style table headers for mobile */
    table.dataTable thead {
        display: none; /* Hide headers on mobile for cleaner look */
    }

    /* Display table cells as blocks on mobile */
    table.dataTable tbody td {
        display: block;
        text-align: center; /* Center all text on mobile */
        padding: 0.5rem 0;
        border: none;
        background-color: transparent !important; /* Fix banded row issue */
    }

    /* Only show Class #, Course & Title, Status, Enrolled, Days, and Time on mobile */
    table.dataTable tbody td:nth-child(2), /* Class # */
    table.dataTable tbody td:nth-child(3), /* Course & Title */
    table.dataTable tbody td:nth-child(4), /* Status */
    table.dataTable tbody td:nth-child(5), /* Enrolled */
    table.dataTable tbody td:nth-child(8), /* Days */
    table.dataTable tbody td:nth-child(9)  /* Time */
    {
        display: block !important;
    }

    /* Hide all other columns on mobile */
    table.dataTable tbody td:nth-child(6),  /* Campus */
    table.dataTable tbody td:nth-child(7),  /* Class Type */
    table.dataTable tbody td:nth-child(10), /* Room */
    table.dataTable tbody td:nth-child(11), /* Instructor */
    table.dataTable tbody td:nth-child(12), /* Dates */
    table.dataTable tbody td:nth-child(13), /* Session */
    table.dataTable tbody td:nth-child(14)  /* Books */
    {
        display: none !important;
    }

    /* Style Class # to look like a prominent button on mobile - District Color */
    table.dataTable tbody td:nth-child(2) {
        font-size: 1.1em;
        font-weight: 700; /* Extra bold for better contrast */
        padding: 0.75rem;
        margin: -0.75rem -0.75rem 0.5rem -0.75rem;
        background: linear-gradient(135deg, #31a9e0 0%, #2891c4 100%);
        color: white;
        text-align: center;
        border-radius: 6px 6px 0 0;
        position: relative;
        box-shadow: 0 2px 4px rgba(49, 169, 224, 0.3);
        text-shadow: 0 1px 2px rgba(0,0,0,0.3); /* Text shadow for better readability */
    }

    table.dataTable tbody td:nth-child(2)::before {
        content: "📱 TAP FOR DETAILS • Class #";
        display: block;
        margin-bottom: 0.25rem;
        font-size: 0.7em;
        font-weight: 400;
        opacity: 0.95;
        letter-spacing: 0.5px;
    }

    /* Make the Class Nbr button full width on mobile */
    table.dataTable tbody td:nth-child(2) .btn-class-nbr {
        width: 100%;
        justify-content: center;
        border-radius: 0;
        padding: 0.75rem;
        font-size: 1.1em;
        background: transparent;
        box-shadow: none;
        text-shadow: inherit;
    }

    table.dataTable tbody td:nth-child(2) .btn-class-nbr:hover {
        background: transparent;
        transform: none;
    }

    /* Campus-specific colors for mobile header */
    table.dataTable tbody tr.campus-city td:nth-child(2) {
        background: linear-gradient(135deg, #be1e2d 0%, #9d1825 100%);
        box-shadow: 0 2px 4px rgba(190, 30, 45, 0.3);
    }

    table.dataTable tbody tr.campus-mesa td:nth-child(2) {
        background: linear-gradient(135deg, #0054a4 0%, #003d7a 100%);
        box-shadow: 0 2px 4px rgba(0, 84, 164, 0.3);
    }

    table.dataTable tbody tr.campus-mira td:nth-child(2) {
        background: linear-gradient(135deg, #1e9097 0%, #167278 100%);
        box-shadow: 0 2px 4px rgba(30, 144, 151, 0.3);
    }

    /* Style Course & Title prominently */
    table.dataTable tbody td:nth-child(3) {
        font-size: 1.05em;
        font-weight: 500;
        padding: 0.5rem 0;
        border-bottom: 1px solid #eee;
        margin-bottom: 0.5rem;
    }

    /* Add tap instruction at the bottom of mobile rows */
    table.dataTable tbody tr::after {
        content: "Tap anywhere to view full details";
        display: block;
        text-align: center;
        font-size: 0.75em;
        color: #999;
        font-style: italic;
        padding-top: 0.5rem;
        margin-top: 0.5rem;
        border-top: 1px dashed #ddd;
    }

    table.dataTable tbody tr.shown::after {
        content: "Tap to collapse details";
    }

    /* Style Status */
    table.dataTable tbody td:nth-child(4) {
        padding-top: 0.5rem;
        padding-bottom: 0.25rem;
    }

    /* Style Enrolled count */
    table.dataTable tbody td:nth-child(5) {
        font-size: 0.9em;
        color: #555;
        padding: 0.25rem 0 0.5rem 0;
    }

    table.dataTable tbody td:nth-child(5)::before {
        content: "👥 ";
        margin-right: 0.25rem;
    }

    /* Style Meeting Info (Days and Time) */
    table.dataTable tbody td:nth-child(8),
    table.dataTable tbody td:nth-child(9) {
        font-size: 0.95em;
        color: #555;
        padding: 0.25rem 0;
        display: inline-block !important;
        width: auto !important;
    }

    table.dataTable tbody td:nth-child(8)::before {
        content: "📅 ";
        margin-right: 0.25rem;
    }

    table.dataTable tbody td:nth-child(9)::before {
        content: "🕐 ";
        margin-right: 0.25rem;
        margin-left: 0.5rem;
    }

    /* Combine days and time on same line */
    table.dataTable tbody td:nth-child(8) {
        margin-right: 0;
    }

    /* Child row styling for mobile */
    table.dataTable tbody tr.child {
        display: block !important;
        padding: 1rem;
        background-color: #f8f9fa;
        border: 2px solid #dee2e6;
        border-radius: 8px;
        margin-top: 0.5rem;
        box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
    }

    table.dataTable tbody tr.child td {
        display: block !important;
        padding: 0 !important;
    }

    table.dataTable tbody tr.child ul {
        margin: 0;
        padding: 0;
        list-style: none;
    }

    /* Dark mode mobile adjustments */
    body.dark-mode table.dataTable tbody tr,
    body.dark-mode table.dataTable tbody tr:nth-child(odd),
    body.dark-mode table.dataTable tbody tr:nth-child(even) {
        background-color: #2a2a2a !important;
        border-color: #555;
    }

    body.dark-mode table.dataTable tbody tr.child {
        background-color: #333;
        border-color: #555;
    }

    body.dark-mode table.dataTable tbody tr::after {
        color: #999;
        border-top-color: #555;
    }

    body.dark-mode table.dataTable tbody td {
        background-color: transparent !important; /* Fix banded row issue in dark mode */
        color: #bbb;
    }

    body.dark-mode table.dataTable tbody td:nth-child(2) {
        color: white !important; /* Keep header text white */
    }

    body.dark-mode table.dataTable tbody td:nth-child(2)::before {
        color: rgba(255,255,255,0.9);
    }

    body.dark-mode table.dataTable tbody td:nth-child(5) {
        color: #bbb;
    }

    body.dark-mode table.dataTable tbody td:nth-child(8),
    body.dark-mode table.dataTable tbody td:nth-child(9) {
        color: #bbb;
    }

    /* High contrast mobile adjustments */
    body.high-contrast table.dataTable tbody tr,
    body.high-contrast table.dataTable tbody tr:nth-child(odd),
    body.high-contrast table.dataTable tbody tr:nth-child(even) {
        background-color: #000000 !important;
        border: 2px solid #ffffff;
    }

    body.high-contrast table.dataTable tbody tr.child {
        background-color: #000000;
        border: 2px solid #ffff00;
    }

    body.high-contrast table.dataTable tbody tr::after {
        color: #ffff00;
        border-top-color: #ffff00;
    }

    body.high-contrast table.dataTable tbody td {
        background-color: transparent !important; /* Fix banded row issue in high contrast */
        color: #ffffff;
    }

    body.high-contrast table.dataTable tbody td:nth-child(2) {
        color: #ffffff !important; /* Keep header text white */
    }

    body.high-contrast table.dataTable tbody td:nth-child(2)::before {
        color: #00ffff;
    }

    body.high-contrast table.dataTable tbody td:nth-child(5) {
        color: #ffffff;
    }

    body.high-contrast table.dataTable tbody td:nth-child(8),
    body.high-contrast table.dataTable tbody td:nth-child(9) {
        color: #ffffff;
    }

    /* Final catch-all: Ensure no banded rows on mobile - all white background */
    table.dataTable tbody tr,
    table.dataTable tbody tr.odd,
    table.dataTable tbody tr.even {
        background-color: white !important;
    }

    body.dark-mode table.dataTable tbody tr,
    body.dark-mode table.dataTable tbody tr.odd,
    body.dark-mode table.dataTable tbody tr.even {
        background-color: #2a2a2a !important;
    }

    body.high-contrast table.dataTable tbody tr,
    body.high-contrast table.dataTable tbody tr.odd,
    body.high-contrast table.dataTable tbody tr.even {
        background-color: #000000 !important;
    }
}

/* Sticky table header */
.sticky-header thead.sticky-top th {
    position: sticky;
    top: 0;
    z-index: 10;
    background-color: #31a9e0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Ensure table header has proper background */
.sticky-header thead th {
    background-color: #31a9e0;
    border-bottom: 2px solid #dee2e6;
}

/* === ADDED: Enrollment button styles === */
.class-nbr-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-enroll {
    padding: 0.25rem 0.5rem;
    background-color: #28a745;
    border: none;
    color: white;
    border-radius: 4px;
    transition: all 0.2s ease;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 28px;
}

.btn-enroll:hover {
    background-color: #218838;
    transform: scale(1.05);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.btn-enroll:active {
    transform: scale(0.98);
}

.btn-enroll .material-icons {
    margin: 0;
    padding: 0;
    vertical-align: middle;
}
/* === END ADDED === */

/* === ADDED: Dark Mode Styles === */
body.dark-mode {
    background-color: #1a1a1a;
    color: #e0e0e0;
}

body.dark-mode .search-section,
body.dark-mode .card {
    background-color: #2a2a2a;
    color: #e0e0e0;
}

body.dark-mode .card-header {
    background-color: #1a4d6d;
    color: #ffffff;
}

body.dark-mode table.dataTable tbody tr {
    background-color: #2a2a2a;
    color: #e0e0e0;
}

body.dark-mode table.dataTable tbody tr:hover {
    background-color: #3a3a3a;
}

body.dark-mode table.dataTable thead th {
    background-color: #1a4d6d;
    color: #ffffff;
}

body.dark-mode .sticky-header thead.sticky-top th,
body.dark-mode .sticky-header thead th {
    background-color: #1a4d6d;
}

body.dark-mode .form-control,
body.dark-mode .form-select {
    background-color: #3a3a3a;
    color: #e0e0e0;
    border-color: #555;
}

body.dark-mode .form-label {
    color: #c0c0c0;
}

body.dark-mode .child-row-content {
    background-color: #333;
    color: #e0e0e0;
}

body.dark-mode .alert-primary {
    background-color: #1a3a4d !important;
    border-color: #2a5a7d !important;
    color: #e0e0e0 !important;
}

body.dark-mode .modal-content {
    background-color: #2a2a2a;
    color: #e0e0e0;
}

body.dark-mode .modal-header {
    border-bottom-color: #555;
}

body.dark-mode .btn-secondary {
    background-color: #555;
    border-color: #555;
    color: #e0e0e0;
}

body.dark-mode .slide-drawer {
    background-color: #2a2a2a;
    color: #e0e0e0;
}

body.dark-mode .slide-drawer-header {
    background-color: #333;
    border-bottom-color: #555;
}
/* === END Dark Mode === */

/* === ADDED: High Contrast Mode Styles === */
body.high-contrast {
    background-color: #000000;
    color: #ffffff;
}

body.high-contrast .search-section,
body.high-contrast .card {
    background-color: #000000;
    color: #ffffff;
    border: 2px solid #ffffff;
}

body.high-contrast .card-header {
    background-color: #000000;
    color: #ffff00;
    border: 2px solid #ffff00;
}

body.high-contrast table.dataTable tbody tr {
    background-color: #000000;
    color: #ffffff;
    border: 1px solid #ffffff;
}

body.high-contrast table.dataTable tbody tr:hover {
    background-color: #333333;
}

body.high-contrast table.dataTable thead th {
    background-color: #000000;
    color: #ffff00;
    border: 2px solid #ffff00;
}

body.high-contrast .sticky-header thead.sticky-top th,
body.high-contrast .sticky-header thead th {
    background-color: #000000;
    border: 2px solid #ffff00;
}

body.high-contrast .form-control,
body.high-contrast .form-select {
    background-color: #000000;
    color: #ffffff;
    border: 2px solid #ffffff;
}

body.high-contrast .form-label {
    color: #ffffff;
    font-weight: bold;
}

body.high-contrast .badge-open {
    background-color: #00ff00;
    color: #000000;
}

body.high-contrast .badge-closed {
    background-color: #ff0000;
    color: #ffffff;
}

body.high-contrast .badge-waitlist {
    background-color: #ffff00;
    color: #000000;
}

body.high-contrast .btn-primary {
    background-color: #ffff00;
    border-color: #ffff00;
    color: #000000;
}

body.high-contrast .btn-enroll {
    background-color: #00ff00;
    border-color: #ffffff;
    color: #000000;
}

body.high-contrast .child-row-content {
    background-color: #000000;
    color: #ffffff;
    border: 2px solid #ffff00;
}

body.high-contrast .alert-primary {
    background-color: #000000 !important;
    border: 2px solid #ffff00 !important;
    color: #ffffff !important;
}

body.high-contrast a {
    color: #00ffff !important;
    text-decoration: underline;
    font-weight: bold;
}

body.high-contrast .btn {
    border: 2px solid #ffffff;
    font-weight: bold;
}

body.high-contrast .btn-outline-primary,
body.high-contrast .btn-outline-success {
    background-color: #ffff00 !important;
    color: #000000 !important;
    border: 2px solid #000000 !important;
}

body.high-contrast .btn-outline-primary:hover,
body.high-contrast .btn-outline-success:hover {
    background-color: #ffffff !important;
    color: #000000 !important;
}

body.high-contrast .modal-content {
    background-color: #000000;
    color: #ffffff;
    border: 2px solid #ffffff;
}

body.high-contrast .slide-drawer {
    background-color: #000000;
    color: #ffffff;
    border-left: 2px solid #ffffff;
}
/* === END High Contrast === */
