body {
    font-family: 'Vazirmatn', sans-serif;
    background-color: #f0f2f5;
    font-size: 14px;
}

.sub-telegram-container {
    transition: 0.1s;
}

.sub-telegram-container:hover {
    scale: 1.025;
}

.social-media-icon {
    height: 32px;
    margin-left: 4px;
}

.sub-telegram {
    text-decoration: none;
    color: #212529;
    font-size: large;
}

#loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1056;
}

#loader-overlay .spinner-border {
    width: 3rem;
    height: 3rem;
}

/* ------------------------ */

/* --- Navbar & University Selector --- */
.navbar-brand {
    font-weight: bold;
}

#university-selector {
    max-width: 250px;
    /* border-color: #495057; */
    background-color: rgb(246, 250, 253);
}

@media (max-width: 768px) {
    .signature {
        display: none;
    }

    .navbar>.container-fluid {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

/* --- Layout & Panels --- */
.main-container {
    padding: 1rem;
    height: calc(100vh - 80px);
}

.main-container>.row,
.side-panel,
.schedule-panel {
    height: 100%;
}

.side-panel,
.schedule-panel {
    display: flex;
    flex-direction: column;
}

.card-grid {
    overflow-y: auto;
    flex-grow: 1;
    max-height: 42.5vh;
}

/* --- Base Card Styles --- */
.base-card {
    padding: 10px;
    margin-bottom: 8px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    background-color: #fff;
    transition: all 0.2s ease-in-out;
}

.course-name {
    font-weight: bold;
    font-size: 0.9rem;
    color: #212529;
}

.course-details {
    font-size: 0.8em;
    color: #6c757d;
}

.course-tags {
    margin-top: 8px;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.course-tags .badge {
    font-size: 0.7em;
}

/* --- All Courses Card --- */
.all-course-card {
    border-right: 5px solid #6c757d;
    cursor: pointer;
}

.all-course-card:hover {
    transform: translateX(-3px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06);
}

.all-course-card.preview {
    background-color: #e0f0ff;
    border-right-color: #0d6efd;
}

/* --- Selected Courses Card --- */
.selected-course-card {
    border-right: 5px solid #198754;
}

.selected-course-card.highlight {
    background-color: #d1e7dd;
    border-right-color: #198754;
    box-shadow: 0 0 10px rgba(25, 135, 84, 0.3);
}

.delete-btn {
    cursor: pointer;
    color: #dc3545;
    font-size: 1.2rem;
    transition: transform 0.2s;
}

.delete-btn:hover {
    transform: scale(1.2);
}

/* --- Schedule Display (Desktop) --- */
#schedule-display {
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
}

.day-row {
    display: flex;
    align-items: stretch;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 8px;
    min-height: 80px;
}

.day-header-desktop {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transform: rotate(180deg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    background-color: #e9ecef;
    padding: 10px;
    border-radius: 5px;
    color: #495057;
    flex-shrink: 0;
}

.sessions-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-content: flex-start;
    flex-grow: 1;
    margin-right: 10px;
}

.session-card {
    font-size: 0.75rem;
    padding: 6px 8px;
    border-radius: 5px;
    border-right: 4px solid;
    background-color: #fff;
    min-width: 150px;
}

/* --- Session & Day Colors --- */
.session-selected {
    border-color: #6c757d;
}

.session-highlight {
    background-color: #d1e7dd;
    border-color: #198754;
}

.session-preview-ok {
    background-color: #cff4fc;
    border-color: #0dcaf0;
}

.session-preview-conflict {
    background-color: #f8d7da;
    border-color: #dc3545;
    font-weight: bold;
}

/* --- Responsive for Mobile --- */
@media (max-width: 991.98px) {

    .main-container,
    .main-container>.row,
    .side-panel,
    .schedule-panel {
        height: auto;
    }

    .side-panel {
        margin-bottom: 1.5rem;
    }

    .card-grid {
        height: 50vh;
        min-height: 350px;
        max-height: unset;
    }

    .university-selector-container {
        margin: auto;
        margin-bottom: 8px;
    }

    .sub-telegram-container {
        margin: auto;
        margin-bottom: 8px;
    }

    .navbar-brand {
        margin: auto;
    }

    /* Mobile Schedule View */
    #schedule-display {
        flex-direction: column;
    }

    .day-row {
        flex-direction: column;
        align-items: initial;
    }

    .day-header-desktop {
        writing-mode: horizontal-tb;
        transform: none;
        text-align: center;
        width: 100%;
        margin-bottom: 10px;
    }

    .sessions-container {
        flex-direction: column;
        flex-wrap: nowrap;
        margin-right: 0;
    }

    .session-card {
        width: 100%;
    }
}