/* =========================================================
   edu.quant-um — основные стили
   ========================================================= */

/* --- Шапка --- */
.navbar-brand {
    letter-spacing: 0.03em;
    font-size: 1.1rem;
}

/* --- Карточки уроков и ДЗ --- */
.lesson-card {
    transition: box-shadow 0.15s ease;
}
.lesson-card:hover {
    box-shadow: 0 2px 12px rgba(0,0,0,.12);
}

/* --- Статусные бейджи ДЗ --- */
.badge-status-new         { background-color: #0d6efd; }
.badge-status-in_progress { background-color: #0d6efd; }
.badge-status-checking    { background-color: #fd7e14; }
.badge-status-done        { background-color: #198754; }
.badge-status-failed      { background-color: #dc3545; }

/* --- Тред комментариев --- */
.comment-block {
    border-left: 3px solid #dee2e6;
    padding-left: 1rem;
    margin-bottom: 1rem;
}
.comment-block.comment-teacher {
    border-left-color: #0d6efd;
}
.comment-block.comment-student {
    border-left-color: #198754;
}

/* --- Форма логина — по центру --- */
.login-wrap {
    max-width: 400px;
    margin: 80px auto 0;
}

/* --- Поиск ученика в dropdown --- */
#studentSearchResult .student-item {
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 4px;
}
#studentSearchResult .student-item:hover {
    background: #f0f4ff;
}

/* --- Кубики занятий --- */
.lesson-cube {
    min-width: 52px;
    width: 52px;
    height: 60px;
    font-size: 0.7rem;
    line-height: 1.35;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0;
}
.lesson-cube.cube-today {
    background: rgb(250	,241,209);
    color: black;
}.lesson-cube.cube-skipped {
    background: rgb(222	,222,222);
    color: black;
}
.lesson-cube.cube-checked {
    background: rgb(187, 215, 171);
    color: black;
}
.lesson-cube.cube-new {
    background: rgb(168, 192, 242);
    color: black;
}
.lesson-cube.cube-empty {
    background: rgb(255 205 205);
    color: black;
}

/* --- Скрытые кубики занятий (Bootstrap d-flex перебивает display:none) --- */
.cube-future-hidden {
    display: none !important;
}

/* --- Оверлей загрузки --- */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}
.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

/* --- Заглушка при загрузке файлов (форма комментария к ДЗ) --- */
.upload-box {
    background: #fff;
    border-radius: 12px;
    padding: 24px 22px;
    max-width: 90vw;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-shadow: 0 8px 30px rgba(0, 0, 0, .3);
}

/* --- Кнопка файла (скачивание/просмотр) --- */
.btn-file {
    background-color: #198754;
    color: white;
    border-color: #198754;
}
.btn-file:hover {
    background-color: #157347;
    border-color: #157347;
    color: white;
}
.btn-file:focus {
    background-color: #157347;
    border-color: #157347;
    color: white;
    box-shadow: 0 0 0 0.25rem rgba(25, 135, 84, 0.5);
}

/* --- Колокольчик уведомлений --- */
.notif-bell-wrap {
    display: inline-flex;
}
.notif-badge {
    position: absolute !important;
    bottom: 2px !important;
    right: -2px;
    top: auto !important;
    font-size: 0.7rem;
    min-width: 1.3em;
    height: 1.3em;
    line-height: 1.3em;
    padding: 0 3px;
    pointer-events: none;
}

/* --- Список уведомлений --- */
.notif-list .notif-item {
    border-left: 3px solid transparent;
    transition: background 0.1s;
}
.notif-list .notif-unread {
    background: #f0f6ff;
    border-left-color: #0d6efd;
}
.notif-list .notif-item:hover {
    background: #e8f0fe;
}
.notif-icon {
    flex-shrink: 0;
    width: 1.6rem;
    text-align: center;
}

/* --- Кнопки фильтров шапки: сброс UA-стилей + явные цвета для мобильных ---
   На iOS/Android Safari UA stylesheet применяет -webkit-appearance: button,
   что перебивает цвет текста и фона у кнопок.
   Сбрасываем appearance и задаём цвета явно. */
.header-filter-btn {
    -webkit-appearance: none;
    appearance: none;
}
.header-filter-btn.btn-outline-primary {
    color: #0d6efd !important;
    background-color: transparent !important;
    border-color: #0d6efd !important;
}
.header-filter-btn.btn-outline-primary.show,
.header-filter-btn.btn-outline-primary:active,
.header-filter-btn.btn-outline-primary:hover {
    color: #fff !important;
    background-color: #0d6efd !important;
    border-color: #0d6efd !important;
}
.header-filter-btn.btn-outline-success {
    color: #198754 !important;
    background-color: transparent !important;
    border-color: #198754 !important;
}
.header-filter-btn.btn-outline-success.show,
.header-filter-btn.btn-outline-success:active,
.header-filter-btn.btn-outline-success:hover {
    color: #fff !important;
    background-color: #198754 !important;
    border-color: #198754 !important;
}
.header-filter-btn.btn-outline-secondary {
    color: #6c757d !important;
    background-color: transparent !important;
    border-color: #6c757d !important;
}
.header-filter-btn.btn-outline-secondary.show,
.header-filter-btn.btn-outline-secondary:active,
.header-filter-btn.btn-outline-secondary:hover {
    color: #fff !important;
    background-color: #6c757d !important;
    border-color: #6c757d !important;
}

/* --- Элементы поиска в dropdown (type=submit buttons) ---
   Сброс UA-стилей, которые на iOS делают текст невидимым */
.student-item {
    -webkit-appearance: none;
    appearance: none;
    color: inherit !important;
    background-color: transparent !important;
}
.student-item:hover,
.student-item:active {
    background-color: #f0f4ff !important;
    color: #212529 !important;
}

/* Глобальный сброс UA-стилей для button — iOS/Android UA stylesheet
   (-webkit-appearance: button) перебивает цвет текста и фона у любых кнопок */
button {
    -webkit-appearance: none;
    appearance: none;
}

/* На мобильных dropdown-menu открывается вниз и может перекрываться — z-index */
#headerFilters .dropdown-menu {
    z-index: 1050;
}

/* Кликабельные строки таблиц: <tr data-href="..."> — переход по клику на строку */
tr[data-href] {
    cursor: pointer;
}

/* --- Адаптив --- */
@media (max-width: 576px) {
    .login-wrap {
        margin-top: 30px;
        padding: 0 16px;
    }
}

/* --- Новости --- */
.mode-badge {
    background-color: #2487C7;
    color: #fff;
}
.news-card {
    transition: box-shadow 0.15s ease;
}
.news-card:hover {
    box-shadow: 0 2px 12px rgba(0, 0, 0, .12);
}
.news-card.news-unread {
    border-left: 4px solid #0d6efd;
}
.news-cover {
    width: 100%;
    min-height: 160px;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-top-left-radius: .375rem;
    border-top-right-radius: .375rem;
}
.news-cover-full {
    width: 100%;
    max-height: 420px;
    object-fit: cover;
}
.news-cover-preview {
    max-width: 280px;
    border-radius: .375rem;
}
.news-title {
    display: block;
    font-weight: 600;
    font-size: 1.05rem;
    color: #212529;
    text-decoration: none;
}
.news-title:hover {
    color: #0d6efd;
}
.news-announce {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.news-body {
    line-height: 1.6;
}
.news-body img {
    max-width: 100%;
    height: auto;
}
.news-meta {
    font-size: .8rem;
    color: #6c757d;
    line-height: 1.4;
}
/* Шрифт и высота строки редактора — как в режиме просмотра (quill.snow задаёт 13px) */
.ql-container.ql-snow {
    font-size: 1rem;
    font-family: inherit;
}
.ql-editor {
    min-height: 220px;
    line-height: 1.6;
}
/* Отступы между абзацами в редакторе — как в режиме просмотра (браузерные margin у <p>) */
.ql-editor p {
    margin: 1em 0 !important;
}
