﻿/* ================================================
   蝷曉?憭批飛隤脩?銵???Anthropic Design Style
   Background: #FAF9F6  繚  Text: #1C1917  繚  Accent: #D97757
   ================================================ */

/* ?? Page wrapper ?? */
.course-page {
    font-family: 'Taipei Sans TC', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
}

/* ?? Page header ?? */
.page-header {
    padding: 48px 0 36px;
    border-bottom: 1px solid #E8E5DF;
    margin-bottom: 36px;
}

.page-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1C1917;
    letter-spacing: -0.025em;
    margin: 0 0 8px;
    line-height: 1.2;
}

.page-subtitle {
    font-size: 1.1rem;
    color: #78716C;
    margin: 0;
    font-weight: 600;
    line-height: 1.6;
}

/* ?? Search bar ?? */
.search-bar {
    background: #FFFFFF;
    padding: 20px 24px;
    margin-bottom: 32px;
    border: 1px solid #E8E5DF;
    border-radius: 12px;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.04);
    flex-wrap: wrap;
    gap: 12px;
}

    .search-bar label {
        color: #78716C;
        font-size: 1.1rem;
        font-weight: 500;
        margin-bottom: 0;
        white-space: nowrap;
        letter-spacing: 0.01em;
    }

    .search-bar .form-control {
        height: 40px;
        border: 1.5px solid #E8E5DF;
        border-radius: 8px;
        background-color: #FAFAF8;
        color: #1C1917;
        font-size: 1.1rem;
        font-weight: 500;
        padding: 0 14px;
        transition: border-color 0.15s, box-shadow 0.15s, background-color 0.15s;
    }

        .search-bar .form-control:focus {
            border-color: #D97757;
            box-shadow: 0 0 0 3px rgba(217, 119, 87, 0.12);
            outline: none;
            background-color: #FFFFFF;
        }

        .search-bar .form-control::placeholder {
            color: #C2BAB4;
            font-weight: 500;
        }

/* ?? Search button ?? */
.btn-search {
    height: 40px;
    padding: 0 22px;
    background-color: #D97757;
    color: #FFFFFF;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.15s, box-shadow 0.15s;
    white-space: nowrap;
    letter-spacing: 0.01em;
}

    .btn-search:hover {
        background-color: #C46642;
        box-shadow: 0 4px 14px rgba(217, 119, 87, 0.32);
        color: #FFFFFF;
    }

    .btn-search:active {
        background-color: #B55A38;
        box-shadow: none;
    }

/* ?? Day section header ?? */
.day-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px 0 10px;
    margin-top: 8px;
    font-size: 1.1rem;
    font-weight: 00;
    color: #A8A29E;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

    .day-header::after {
        content: '';
        flex: 1;
        height: 1px;
        background-color: #F0EDE8;
    }

/* ?? Course list ?? */
.course-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.course-item {
    display: flex;
    align-items: center;
    padding: 1px 14px;
    border-radius: 6px;
    border: 1px solid transparent;
    transition: background-color 0.15s, border-color 0.15s;
    font-size: 1.1rem;
    gap: 4px;
}

    .course-item:hover {
        background-color: #F7F5F1;
        border-color: #EBE8E2;
    }

/* ?? Badges ?? */
.badge-time {
    background-color: #EEF2FB;
    color: #4A62B3;
    border-radius: 8px;
    padding: 2px 8px;
    font-size: 1.1rem;
    font-weight: 600;
    white-space: nowrap;
    letter-spacing: 0.01em;
    flex-shrink: 0;
    margin-right: -2px;
}

.badge-full {
    background-color: #FEE2E2;
    color: #B91C1C;
    border-radius: 8px;
    padding: 2px 8px;
    font-size: 1.1rem;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
    margin-right: -2px;
}

.badge-new {
    background-color: #FEF3C7;
    color: #92400E;
    border-radius: 8px;
    padding: 2px 8px;
    font-size: 1.1rem;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
    margin-right: -2px;
}

/* ?? Course link ?? */
.course-link {
    text-decoration: none;
    color: #1C1917;
    font-weight: 500;
    transition: color 0.15s;
    flex: 1;
    min-width: 0;
    line-height: 1.45;
    font-size: 1.1rem;
}

    .course-link:hover {
        color: #D97757;
        text-decoration: none;
    }

/* ?? Enrollment info ?? */
.enrollment-info {
    color: #B8B0AA;
    font-size: 1.1rem;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
    margin-left: auto;
}

.text-new {
    color: #D97757;
    font-weight: 600;
}

/* ?? Select2 ??Anthropic Style ?? */
.select2-container .select2-selection--single {
    height: 40px;
    border: 1.5px solid #E8E5DF;
    border-radius: 8px;
    background-color: #FAFAF8;
    box-shadow: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 38px;
    color: #1C1917;
    font-size: 1.1rem;
    font-weight: 500;
    padding-left: 14px;
    padding-right: 32px;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 38px;
    right: 10px;
}

    .select2-container--default .select2-selection--single .select2-selection__arrow b {
        border-color: #B0A9A4 transparent transparent transparent;
    }

.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b {
    border-color: transparent transparent #B0A9A4 transparent;
}

.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--open .select2-selection--single {
    border-color: #D97757;
    box-shadow: 0 0 0 3px rgba(217, 119, 87, 0.12);
    outline: none;
    background-color: #FFFFFF;
}

.select2-dropdown {
    border: 1.5px solid #E8E5DF;
    border-radius: 10px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    background-color: #FFFFFF;
}

.select2-results__option {
    padding: 9px 16px;
    font-size: 1.1rem;
    font-weight: 700;
    color: #1C1917;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: #FBF0EB;
    color: #C46642;
    font-weight: 700;
}

.select2-container--default .select2-results__option[aria-selected=true] {
    background-color: #FDF6F3;
    color: #D97757;
    font-weight: 700;
}

/* ?? Select2 icon wrapper ?? */
.select-icon-wrapper {
    position: relative;
    display: inline-block;
}

.select-icon-prefix {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
    color: #B0A9A4;
    font-size: 1.1rem;
    pointer-events: none;
}

.select-icon-wrapper .select2-container--default .select2-selection--single .select2-selection__rendered {
    padding-left: 34px;
}

/* ?? Select divider ?? */
.select-divider {
    width: 1px;
    height: 32px;
    background-color: #E8E5DF;
    align-self: center;
    margin-right: 12px;
}

/* ???? Semester select - Orange border ???? */
#semesterSelect.select2-hidden-accessible + .select2-container .select2-selection--single {
    border: 1.5px solid #D97757;
}

#semesterSelect.select2-hidden-accessible + .select2-container--focus .select2-selection--single,
#semesterSelect.select2-hidden-accessible + .select2-container--open .select2-selection--single {
    border: 1.5px solid #D97757;
    box-shadow: 0 0 0 3px rgba(217, 119, 87, 0.12);
}

/* ???? District and Keyword select - No color change on focus ???? */
#districtSelect.select2-hidden-accessible + .select2-container--focus .select2-selection--single,
#districtSelect.select2-hidden-accessible + .select2-container--open .select2-selection--single {
    border-color: #E8E5DF;
    box-shadow: none;
    background-color: #FAFAF8;
}

#keywordInput:focus {
    border-color: #E8E5DF;
    box-shadow: none;
    background-color: #FAFAF8;
}

/* ???? Select dropdown text bold ???? */
.select2-container--default .select2-selection--single .select2-selection__rendered {
    font-weight: 500;
}

/* ???? Spacing between semester and district select ???? */
#semesterSelect.select2-hidden-accessible + .select2-container {
    margin-right: 20px;
}

/* ?? Time slot filter ?? */
.time-slot-filter {
    display: flex;
    gap: 0;
    align-items: center;
    border-radius: 8px;
    overflow: hidden;
}

/* ?? District filter ?? */
.district-filter {
    display: flex;
    gap: 0;
    align-items: center;
    border-radius: 8px;
    overflow: hidden;
}

.time-slot-btn,
.district-slot-btn {
    height: 40px;
    padding: 0 12px;
    border: 1.5px solid #E8E5DF;
    border-radius: 0;
    background-color: #FAFAF8;
    color: #1C1917;
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.15s, border-color 0.15s, box-shadow 0.15s;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    flex-shrink: 0;
    margin-left: -1.5px;
}

.district-slot-btn {
    padding: 0 20px;
}

    .time-slot-btn:first-child {
        margin-left: 0;
        border-radius: 8px 0 0 8px;
    }

    .time-slot-btn:last-child {
        border-radius: 0 8px 8px 0;
    }

    .district-slot-btn:first-child {
        margin-left: 0;
        border-radius: 8px 0 0 8px;
    }

    .district-slot-btn:last-child {
        border-radius: 0 8px 8px 0;
    }

    .time-slot-btn:hover,
    .district-slot-btn:hover {
        border-color: #D97757;
        background-color: #FFFFFF;
        z-index: 1;
    }

    .time-slot-btn.active,
    .district-slot-btn.active {
        border-color: #D97757;
        background-color: #FDF6F3;
        color: #D97757;
        font-weight: 600;
        z-index: 2;
    }

    .time-slot-btn i {
        font-size: 1.1rem;
    }

/* ?? Filter controls - Even distribution ?? */
.filter-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    width: 100%;
    flex: 1;
}

    .filter-controls .time-slot-filter {
        flex: 1;
        justify-content: flex-start;
    }

    .filter-controls .select-icon-wrapper {
        flex: 1;
        max-width: 220px;
    }

/* ?? District buttons special styling - Active state and hover ?? */
.district-slot-btn[data-district="前鎮區"]:hover {
    border-color: #83C3D3 !important;
}

.district-slot-btn[data-district="前鎮區"].active {
    border-color: #83C3D3 !important;
    color: #83C3D3 !important;
    background-color: #F0F9FC !important;
}

.district-slot-btn[data-district="小港區"]:hover {
    border-color: #F6AD49 !important;
}

.district-slot-btn[data-district="小港區"].active {
    border-color: #F6AD49 !important;
    color: #F6AD49 !important;
    background-color: #FEF7F0 !important;
}

.district-slot-btn[data-district="林園區"]:hover {
    border-color: #B0CA71 !important;
}

.district-slot-btn[data-district="林園區"].active {
    border-color: #B0CA71 !important;
    color: #B0CA71 !important;
    background-color: #F6FAF1 !important;
}

