:root {
    --timetable-color-regular-rgb: var(--bs-secondary-rgb, 108, 117, 125);
    --timetable-color-regular: rgb(var(--timetable-color-regular-rgb));
    --timetable-color-eva-rgb: var(--bs-warning-rgb, 255, 193, 7);
    --timetable-color-eva: rgb(var(--timetable-color-eva-rgb));
    --timetable-color-substitution-rgb: var(--bs-info-rgb, 13, 202, 240);
    --timetable-color-substitution: rgb(var(--timetable-color-substitution-rgb));
    --timetable-color-exam-rgb: var(--bs-danger-rgb, 220, 53, 69);
    --timetable-color-exam: rgb(var(--timetable-color-exam-rgb));
    --timetable-color-cancelled-rgb: var(--bs-success-rgb, 25, 135, 84);
    --timetable-color-cancelled: rgb(var(--timetable-color-cancelled-rgb));
    --timetable-color-free-rgb: var(--bs-success-rgb, 25, 135, 84);
    --timetable-color-free: rgb(var(--timetable-color-free-rgb));
}

body {
    min-height: 100vh;
}

.navbar {
    --bs-navbar-padding-y: 0.75rem;
}

.card-header h3 {
    margin-bottom: 0;
}

#announcements-content .list-group-item {
    border: 0;
    border-bottom: 1px solid var(--bs-border-color-translucent, rgba(0, 0, 0, 0.08));
    padding-left: 0;
    padding-right: 0;
}

#announcements-content .list-group-item:last-child {
    border-bottom: 0;
}

#session-details code {
    color: inherit;
}

.timetable-input {
    min-width: 140px;
}

.timetable-wrapper {
    overflow-x: auto;
}

.timetable-table thead th {
    vertical-align: middle;
}

.timetable-table tbody th {
    width: 60px;
    vertical-align: middle;
    font-weight: 600;
}

.timetable-table td {
    min-width: 140px;
    vertical-align: top;
    text-align: center;
}

.timetable-cell {
    padding: 0.75rem 0.5rem;
    transition: background-color 0.2s ease-in-out;
}

.timetable-cell--interactive {
    cursor: pointer;
    outline: none;
}

.timetable-cell--interactive:focus-visible {
    outline: 2px solid var(--bs-primary);
    outline-offset: 2px;
}

.timetable-indicator {
    width: 100%;
    height: 0.35rem;
    border-radius: 999px;
    margin-bottom: 0.35rem;
    background-color: rgba(var(--timetable-color-regular-rgb), 0.85);
}

.timetable-indicator--regular {
    background-color: rgba(var(--timetable-color-regular-rgb), 0.85);
}

.timetable-indicator--eva {
    background-color: rgba(var(--timetable-color-eva-rgb), 0.85);
}

.timetable-indicator--substitution {
    background-color: rgba(var(--timetable-color-substitution-rgb), 0.85);
}

.timetable-indicator--exam {
    background-color: rgba(var(--timetable-color-exam-rgb), 0.85);
}

.timetable-indicator--cancelled {
    background-color: rgba(var(--timetable-color-cancelled-rgb), 0.85);
}

.timetable-indicator--free {
    background-color: rgba(var(--timetable-color-free-rgb), 0.35);
}

.timetable-popover {
    --timetable-popover-color: var(--timetable-color-regular);
    --bs-popover-border-color: var(--timetable-popover-color);
    --bs-popover-header-bg: var(--timetable-popover-color);
    --bs-popover-header-color: #fff;
    --bs-popover-body-color: inherit;
    --bs-popover-border-width: 1px;
}

.timetable-popover .popover-header {
    font-size: 0.9rem;
    font-weight: 600;
}

.timetable-popover--regular {
    --timetable-popover-color: var(--timetable-color-regular);
}

.timetable-popover--eva {
    --timetable-popover-color: var(--timetable-color-eva);
}

.timetable-popover--substitution {
    --timetable-popover-color: var(--timetable-color-substitution);
}

.timetable-popover--exam {
    --timetable-popover-color: var(--timetable-color-exam);
    --bs-popover-header-color: #000;
}

.timetable-popover--cancelled {
    --timetable-popover-color: var(--timetable-color-cancelled);
}

.timetable-popover--free {
    --timetable-popover-color: var(--timetable-color-free);
}

.timetable-cell__content {
    min-height: 96px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.25rem;
}

.timetable-teacher {
    font-weight: 600;
    text-transform: uppercase;
}

.timetable-course {
    font-size: 0.9rem;
    text-transform: uppercase;
}

.timetable-room {
    font-size: 0.85rem;
    color: var(--bs-secondary-color);
}

.timetable-meta {
    margin-top: 0.75rem;
}

.timetable-announcement__body {
    white-space: pre-wrap;
}

.timetable-announcement__body br {
    line-height: 1.1;
}

.timetable-cell--regular {
    background-color: rgba(var(--timetable-color-regular-rgb), 0.12);
    color: var(--timetable-color-regular);
}

.timetable-cell--substitution {
    background-color: rgba(var(--timetable-color-substitution-rgb), 0.12);
    color: var(--timetable-color-substitution);
}

.timetable-cell--exam {
    background-color: rgba(var(--timetable-color-exam-rgb), 0.12);
    color: var(--timetable-color-exam);
}

.timetable-cell--eva {
    background-color: rgba(var(--timetable-color-eva-rgb), 0.12);
    color: var(--timetable-color-eva);
}

.timetable-cell--cancelled {
    background-color: rgba(var(--timetable-color-cancelled-rgb), 0.12);
    color: var(--timetable-color-cancelled);
}

.timetable-cell--cancelled .timetable-teacher,
.timetable-cell--cancelled .timetable-course,
.timetable-cell--cancelled .timetable-room {
    text-decoration: line-through;
}

.timetable-cell--free {
    background-color: rgba(var(--timetable-color-free-rgb), 0.1);
    color: var(--timetable-color-free);
}



.timetable-table {
    width: 100%;
    table-layout: fixed;
}

.timetable-table--compact {
    font-size: 0.75rem;
}

.timetable-table--compact thead th,
.timetable-table--compact tbody th,
.timetable-table--compact td {
    padding: 0.35rem 0.25rem;
}

.timetable-table--compact thead th {
    font-size: 0.8rem;
}

.timetable-table--compact tbody th {
    width: 44px;
    font-size: 0.75rem;
}

.timetable-table--compact td {
    min-width: 0;
}

.timetable-table--compact .timetable-cell {
    padding: 0.45rem 0.35rem;
}

.timetable-table--compact .timetable-cell__content {
    min-height: 56px;
    gap: 0.2rem;
    overflow-wrap: anywhere;
}

.timetable-table--compact .timetable-teacher {
    font-size: 0.78rem;
}

.timetable-table--compact .timetable-course {
    font-size: 0.75rem;
}

.timetable-table--compact .timetable-room {
    font-size: 0.7rem;
}

.timetable-table--compact .timetable-info-list {
    gap: 0.2rem;
}

.timetable-table--compact .timetable-badge {
    font-size: 0.6rem;
    padding: 0.15rem 0.35rem;
}

.footer {
    background-color: var(--bs-primary);
    color: rgba(var(--bs-white-rgb), 0.9);
}

[data-bs-theme="dark"] .footer {
    background-color: var(--bs-primary);
    color: rgba(var(--bs-white-rgb), 0.92);
}

.footer-brand__container {
    display: flex;
    align-items: flex-end;
    gap: 1rem;
}

.footer-brand__logo {
    width: 48px;
    height: 48px;
    object-fit: contain;
    flex-shrink: 0;
}

.footer-brand__text {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.footer-brand__name {
    letter-spacing: 0.08em;
}

.footer-brand__meta {
    line-height: 1.2;
}

.footer-primary .btn {
    border-color: rgba(var(--bs-white-rgb), 0.5);
    color: rgba(var(--bs-white-rgb), 0.85);
}

.footer-primary .btn:hover,
.footer-primary .btn:focus-visible {
    color: #fff;
    background-color: rgba(var(--bs-white-rgb), 0.15);
    border-color: rgba(var(--bs-white-rgb), 0.75);
}

.footer-secondary {
    background-color: rgba(var(--bs-primary-rgb), 0.9);
    color: rgba(var(--bs-white-rgb), 0.75);
}

.footer-secondary-link {
    color: inherit;
    text-decoration: none;
}

.footer-secondary-link:hover {
    color: #fff;
    text-decoration: underline;
}

.footer-secondary-divider {
    color: rgba(var(--bs-white-rgb), 0.5);
}

#theme-toggle {
    min-width: 2.5rem;
}

#theme-toggle-icon {
    font-size: 1rem;
}


