/* ====== SCHEDULE TABLE STYLES ====== */

/*Таблица расписания, скролл, hover, sticky header, печать*/

.schedule-scroll-wrapper {
    max-height: 600px;
    overflow-y: auto;
    border: 1px solid #dee2e6;
    border-radius: 5px;
}

.schedule-table {
    background-color: #f8f9fa;
    font-size: 0.90rem;
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 0;
}

.schedule-table th {
    background-color: #033ea8;
    color: #fff;
    font-weight: 600;
    padding: 0.75rem;
    text-align: center;
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 2;
}

.schedule-table td {
    background-color: rgba(242,244,244,0.25);
    color: #292828;
    padding: 0.6rem;
    text-align: center;
    vertical-align: middle;
    white-space: nowrap;
}

.schedule-table tr:nth-child(even) {
    background-color: #c9e6f6;
}

.schedule-table tr:hover {
    background-color: #4ac1f7;
}

/* Column widths */
.schedule-table th:first-child,
.schedule-table td:first-child {
    width: 12%;
    padding-left: 6mm;
    text-align: left;
}

.schedule-table th:nth-child(2),
.schedule-table td:nth-child(2) {
    width: 18%;
    padding-left: 8mm;
    text-align: left;
}

.schedule-table th:nth-child(3),
.schedule-table td:nth-child(3) {
    width: 10%;
}

/* Print */
@media print {
    .schedule-table {
        font-size: 10px;
        table-layout: fixed;
        width: 100%;
    }
    .schedule-table th,
    .schedule-table td {
        word-wrap: break-word;
        padding: 4px;
        white-space: normal !important;
    }
}

/* ============================
Дата и время (раздельно)
============================ */

/* Общий контейнер */
.datetime-block {
    text-align: right;
    margin-bottom: 0.5rem;
    font-family: 'Segoe UI', Tahoma, sans-serif;
    font-weight: bold;
}

/* Дата */
.schedule-page .date-text {
    font-size: 1.25rem;
    color: #495057;
    font-weight: 500;
}

/* Время */
.schedule-page .time-text {
    font-size: 2.50rem; /* Относительно корневого элемента (html) — размер в % (1.25rem = 125%)*/
    color: #5c5d5e;
    font-family: 'Digiface', Tahoma, sans-serif;
    font-weight: bold; /* font-style: italic; */
}

/* ============================
   View switcher
============================ */

.view-block {
    display: none;
}

.view-block.active {
    display: block !important;
}

/* =====================================================
   Schedule Print View — A4 Landscape
   Used by the Print button on /schedule/
   ===================================================== */

@media print {
    @page {
        size: A4 landscape;
        margin: 10mm;
    }

    html,
    body {
        background: #ffffff !important;
        color: #111 !important;
        font-family: Arial, "Roboto", sans-serif !important;
        font-size: 10px !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    /* Hide global UI */
    nav,
    header,
    footer,
    .navbar,
    .site-header,
    .site-footer,
    .sidebar,
    .alert,
    .messages,
    .btn,
    .dropdown,
    .pagination,
    .print-toolbar,
    .week-nav,
    #filtersForm,
    #applyFilters,
    #resetFilters,
    #tableViewBtn,
    #cardViewBtn,
    #schedulePagination {
        display: none !important;
    }

    /* Hide card view on print */
    #cardView {
        display: none !important;
    }

    /* Force table view */
    #tableView {
        display: block !important;
    }

    .schedule-page {
        width: 100% !important;
        max-width: 1123px !important;
        margin: 0 auto !important;
        padding: 0 !important;
        background: #ffffff !important;
    }

    .schedule-page > .d-flex:first-child {
        display: block !important;
        border-bottom: 1px solid #333 !important;
        padding-bottom: 8px !important;
        margin-bottom: 14px !important;
    }

    .schedule-page h2 {
        text-align: center !important;
        font-size: 17px !important;
        font-weight: 700 !important;
        margin: 12px 0 14px !important;
    }

    .schedule-page h2 small {
        display: inline !important;
        font-size: 12px !important;
        color: #333 !important;
        margin-left: 6px !important;
    }

    .schedule-scroll-wrapper {
        max-height: none !important;
        overflow: visible !important;
        border: none !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        margin: 0 !important;
    }

    .schedule-table {
        width: 100% !important;
        border-collapse: collapse !important;
        table-layout: fixed !important;
        font-size: 9.5px !important;
        background: #ffffff !important;
    }

    .schedule-table th,
    .schedule-table td {
        border: 1px solid #555 !important;
        padding: 5px 4px !important;
        text-align: center !important;
        vertical-align: middle !important;
        line-height: 1.25 !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        color: #111 !important;
        background: #ffffff !important;
    }

    .schedule-table th {
        background: #f1f3f5 !important;
        font-weight: 700 !important;
        position: static !important;
    }

    .schedule-table th:first-child,
    .schedule-table td:first-child {
        width: 25% !important;
        text-align: center !important;
        padding-left: 4px !important;
    }

    .schedule-table th:nth-child(2),
    .schedule-table td:nth-child(2) {
        width: 11% !important;
        text-align: center !important;
        padding-left: 4px !important;
    }

    .schedule-table th:nth-child(3),
    .schedule-table td:nth-child(3) {
        width: 7% !important;
    }

    .schedule-table th:nth-child(n+4),
    .schedule-table td:nth-child(n+4) {
        width: 8.14% !important;
    }

    .schedule-table a {
        color: #111 !important;
        text-decoration: none !important;
    }

    .vacation-text,
    .weekend-text {
        color: #111 !important;
        font-weight: 600 !important;
    }
}