/* Layout styles - header, table, modal */

/* Header */
header {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin: 24px auto 20px;
    width: 100%;
}

header h1,
header h2,
header p {
    text-align: center;
    width: 100%;
}

/* Table */
.table-wrapper {
    background: white;
    padding: 10px;
    border-radius: 14px;
    border: 1px solid var(--border-color);
    overflow-x: auto;
    text-align: center;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 6px;
    min-width: 1000px;
    table-layout: fixed;
    text-align: left;
}

thead th {
    color: #94a3b8;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    padding-bottom: 10px;
}

/* Day column fixed */
th:first-child,
td.day {
    width: 110px;
    text-align: center;
}

/* All time-slot columns equal width */
thead th:not(:first-child),
tbody td:not(.day) {
    width: calc((100% - 110px) / 7);
}

.time-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.time-sep {
    font-size: 14px;
    color: #cbd5e1;
}

td {
    border-radius: 12px;
    background: #F8FAFC;
    text-align: center;
    height: var(--cell-height);
    position: relative;
    transition: all 0.2s;
}

.day {
    background: var(--bg-tan) !important;
    font-weight: 800;
    font-size: 14px;
    width: 100px;
    text-align: center;
}

/* Cell Content */
.section-label-cell {
    font-size: 14px;
    font-weight: 900;
    color: var(--accent-orange);
    text-transform: uppercase;
    margin-bottom: 2px;
}

.subject-tag {
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    font-weight: 700;
    display: block;
    margin-bottom: 4px;
}

.subject-tag.empty-class {
    color: #94a3b8;
    font-style: italic;
    font-weight: 500;
}

.prof-id {
    font-size: 14px;
    font-weight: 700;
    background: rgba(0, 0, 0, 0.05);
    padding: 2px 6px;
    border-radius: 5px;
    color: #475569;
}

.lab-tag {
    font-size: 14px;
    font-weight: 700;
    color: #059669;
    background: rgba(5, 150, 105, 0.1);
    padding: 2px 6px;
    border-radius: 5px;
    margin-left: 4px;
}

.divider {
    border: 0;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    margin: 6px 0;
}

/* Status Cells */
.break {
    background: #F1F5F9 !important;
    color: #94A3B8;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.1em;
}

.holiday {
    background: #FEF2F2 !important;
    color: #EF4444;
    font-size: 16px;
    font-weight: 800;
}

.no-classes {
    background: #FAFAFA !important;
    color: #1d1d1d;
    font-size: 16px;
    font-weight: 700;
}

/* Filtering States */
.dimmed {
    opacity: 0.2;
    filter: grayscale(1);
}

.highlight-active {
    border: 2px solid var(--accent-orange) !important;
}

body.filter-active .current-class:not(.highlight-active)::before {
    display: none;
}

body.filter-active .current-class:not(.highlight-active) {
    border: 2px solid #F8FAFC !important;
}

.highlight-active.current-class::before {
    display: none;
}

/* LIVE Indicator */
.current-class {
    border: 2px solid var(--deep-charcoal) !important;
}

.current-class::before {
    content: "LIVE";
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--deep-charcoal);
    color: white;
    font-size: 9px;
    font-weight: 900;
    padding: 2px 8px;
    border-radius: 20px;
    z-index: 10;
    animation: pulse 2s infinite;
}

/* Modal */
.section-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

.modal-content {
    background: var(--bg-cream);
    border: 3px solid var(--border-color);
    border-radius: 16px;
    padding: 40px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-title {
    font-size: 24px;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 12px;
    color: var(--deep-charcoal);
}

.modal-subtitle {
    font-size: 15px;
    opacity: 0.6;
    margin-bottom: 30px;
}

.modal-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.modal-btn {
    padding: 16px 24px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    color: white;
    background: var(--accent-orange);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    letter-spacing: 0.5px;
}

.modal-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(217, 119, 6, 0.3);
}

.settings-hidden {
    display: none;
}

/* Responsive */
@media (max-width: 600px) {
    .faculty-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    h1 {
        font-size: 1.4rem;
    }
}