/* =========================
   GLOBAL / BASE
========================= */
body {
    font-family: Arial, sans-serif;
    padding: 20px;
    background-color: #0f1115;
    color: #e6e6e6;
}

/* Titles */
h1 {
    text-align: center;
    color: #ffffff;
}

/* =========================
   COURSE CONTAINERS
========================= */
.course,
.constraint,
.schedule {
    background: #1a1d23;
    border: 1px solid #2a2f3a;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.4);
}

/* =========================
   COURSE HEADERS
========================= */
.course-header {
    background: #1f2430;
    padding: 10px;
    font-size: 1.1em;
    display: flex;
    cursor: pointer;
    border-radius: 8px 8px 0 0;
}

.course-header-disabled {
    background: #181c24;
    color: #777;
    padding: 10px;
    display: flex;
}

/* Hover */
.course-header:hover,
button:hover,
.nav-btn:hover {
    background-color: #2a2f3a;
}

/* Right text */
.right-header-text {
    margin-left: auto;
    color: #aaa;
}

/* =========================
   TERM SELECTOR (ADD THIS TO dark.css)
========================= */

#term-selector,
select#term-selector,
select {
    background-color: #1f2430;
    color: #eeeeee;
    border: 1px solid #2a2f3a;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 1em;
    cursor: pointer;
    outline: none;
    transition: 0.1s;
}

/* hover */
#term-selector:hover,
select#term-selector:hover,
select:hover {
    background-color: #2a2f3a;
}

/* focus */
#term-selector:focus,
select#term-selector:focus,
select:focus {
    border-color: #4f8cff;
    box-shadow: 0 0 0 2px rgba(79,140,255,0.25);
}

/* dropdown options */
#term-selector option,
select option {
    background-color: #1a1d23;
    color: #eeeeee;
}

/* =========================
   FIX: CONTROL BUTTONS
========================= */

/* Main control buttons */
button#filters-toggle,
button#filters-reset,
button#expand-all,
button#collapse-all,
.wht {
    background-color: #1f2430 !important;
    color: #eee !important;
    border: 1px solid #2a2f3a !important;
}

/* Hover fix */
button#filters-toggle:hover,
button#filters-reset:hover,
button#expand-all:hover,
button#collapse-all:hover,
.wht:hover {
    background-color: #2a2f3a !important;
}

/* Fix specific states */
button.gry {
    background-color: #2a2f3a !important;
}

button.grn {
    background-color: #1f3d2b !important;
}

button.red {
    background-color: #3a1f24 !important;
}

/* =========================
   SECTIONS
========================= */
.sections {
    padding: 10px 16px;
}

.section {
    border-top: 1px solid #2a2f3a;
    padding: 8px 0;
}

.section b {
    color: #c792ea;
}

.meeting {
    color: #9aa4b2;
}

/* Enrollment */
.section-right-title {
    color: #8a93a3;
}

.section-right-fraction {
    color: #ffffff;
}

.section-full {
    color: #ff6b6b;
}

/* =========================
   INPUTS / SEARCH
========================= */
input,
input#main-search,
table#filters-menu input,
table#constraints-menu input {
    background-color: #1a1d23;
    color: #eee;
    border: 1px solid #2a2f3a;
    border-radius: 6px;
}

/* =========================
   BUTTON SYSTEM
========================= */
button {
    border-radius: 6px;
    border: 1px solid #2a2f3a;
    background-color: #1f2430;
    color: #eee;
    cursor: pointer;
    transition: 0.1s;           /* Cool transition for the buttons */
}

/* Neutral */
button.wht {
    background-color: #1f2430;
}

/* Gray */
button.gry {
    background-color: #2a2f3a;
}

/* Green (positive) */
button.grn {
    background-color: #1f3d2b;
    border-color: #2e7d5a;
}

/* Red (danger) */
button.red,
.red-btn {
    background-color: #3a1f24;
    border-color: #7a2e3a;
}

/* Danger hover */
.red-btn:hover {
    background-color: #5a2a30;
}

/* Disabled */
button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* =========================
   NAVIGATION / LAYOUT
========================= */
#basket-controls,
.page-controls,
#count-expand-collapse {
    display: flex;
    gap: 10px;
}

/* Basket layout */
#basket-container {
    display: flex;
    gap: 15px;
}

#basket-list {
    width: 30%;
}

#basket-timetable {
    flex: 1;
}

/* =========================
   NAV BUTTONS
========================= */
.nav-btn {
    background-color: #1f2430;
    border: 1px solid #2a2f3a;
}

/* =========================
   LOGO
========================= */
.title-logo {
    height: 60px;
    margin: 0 15px;
}

/*
Universal button hover - darkens button color on hover while preserving original colors
*/
button:hover:not(:disabled) {
    filter: brightness(1.2);
}

/*
References to:
index.html - weekday filter buttons (required state), and the "required" legend button
renderCourses.js - "add to basket" button
search.js - required attributes filter
filter.html - required constraints add buttons
*/
button.grn:hover {
    background-color: #1b571b;
}

/*
References to:
index.html - weekday filter buttons (exclude state), and the "excluded" legend button
basket.html - "clear basket" button
basket.js - remove button in basket
search.js - forbidden attributes filter
filter.html - forbidden constraints add buttons
scheduleFinder.js - added constraint remove button
*/
button.red:hover {
    background-color: #711616;
}

/*
References to:
ALL HTML - adds hover for the term dropdown box
*/
select:hover {
    background-color: #1f2430;
}