/**
 * All of the CSS for your public-facing functionality should be
 * included in this file.
 */

/* Переопределение ширины контента WordPress для увеличения ширины сайта */
:root {
    --wp--style--global--content-size: 1280px !important;
}

/* Дополнительное переопределение для блок-тем WordPress */
body,
.wp-site-blocks,
.wp-block-group__inner-container {
    max-width: 100% !important;
}

/* Убираем ограничение ширины для контента */
.wp-block-group__inner-container,
.wp-block-post-content {
	max-width: 1280px !important;
	margin-left: auto !important;
	margin-right: auto !important;
}

/* ============================================
   ВАШИ БРОНИ (yasa_cancel_order / My Account)
   ============================================ */
.yasa-my-bookings {
    max-width: 900px;
    margin: 0 auto 2rem;
    padding: 1.5rem 0;
}

.yasa-my-bookings__title {
    margin: 0 0 1rem;
    font-size: 1.5rem;
    font-weight: 600;
    color: #1d2327;
    border-bottom: 2px solid #2271b1;
    padding-bottom: 0.5rem;
}

.yasa-my-bookings__subtitle {
    margin: 1.5rem 0 0.75rem;
    font-size: 1.2rem;
    font-weight: 600;
    color: #1d2327;
}

.yasa-my-bookings__content {
    min-height: 2rem;
}

.yasa-my-bookings__empty {
    margin: 0.5rem 0;
    color: #646970;
    font-size: 0.95rem;
}

.yasa-my-bookings__fines {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e0e0e0;
}

.yasa-loading {
    color: #646970;
    font-size: 0.95rem;
}

.yasa-bookings-table-wrap {
    overflow-x: auto;
    margin: 0.5rem 0 1rem;
    border: 1px solid #c3c4c7;
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.yasa-bookings-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.yasa-bookings-table thead {
    background: #f0f0f1;
}

.yasa-bookings-table th {
    padding: 0.65rem 0.75rem;
    text-align: left;
    font-weight: 600;
    color: #1d2327;
    border-bottom: 1px solid #c3c4c7;
}

.yasa-bookings-table td {
    padding: 0.65rem 0.75rem;
    border-bottom: 1px solid #e0e0e0;
}

.yasa-bookings-table tbody tr:hover {
    background: #f9f9f9;
}

.yasa-bookings-table__cancel {
    color: #b32d2e;
    text-decoration: none;
}

.yasa-bookings-table__cancel:hover {
    text-decoration: underline;
}

.yasa-bookings-table__total td {
    font-weight: 600;
    background: #f6f7f7;
    border-bottom: none;
}

.yasa-bookings-table--fines thead {
    background: #fcf0f1;
}

/* ============================================
   СТИЛИ КАЛЕНДАРЯ БРОНИРОВАНИЙ (yasa_v3_schedule)
   ============================================ */


/* Заголовок с навигацией */
.yasa-v3-schedule-header {
    background: #fff;
    border-radius: 8px 8px 0 0;
    padding: 20px;
    border-bottom: 1px solid #e9ecef;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.schedule-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.schedule-prev, .schedule-next {
    background: #007cba;
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 18px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.schedule-prev:hover:not(:disabled), 
.schedule-next:hover:not(:disabled) {
    background: #005a87;
}

.schedule-prev:disabled, 
.schedule-next:disabled {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.5;
}

.schedule-week-info {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    min-width: 200px;
    text-align: center;
}


/* Блок комнаты */
.room0 {
    margin-bottom: 40px;
}

.room0 h2 {
    margin: 0 0 10px 0;
    font-size: 24px;
    font-weight: 600;
}

.room0 p {
    margin: 0 0 8px 0;
    color: #666;
    line-height: 1.5;
    font-size: 13px;
}

/* Описание комнаты */
.discript_room {
    margin-top: 8px;
    margin-bottom: 5px;
}

.butons {
    color: #007cba;
    text-decoration: none;
    font-weight: 500;
    font-size: 13px;
    margin-bottom: 10px;
    display: inline-block;
}

.butons:hover {
    text-decoration: underline;
}

/* Навигация "следующая неделя" */
.nav_next {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 14px;
    color: #666;
}

.nav_next span {
    cursor: pointer;
}

.nav_next span:hover {
    color: #333;
    text-decoration: underline;
}

.nav_next .nav-prev-week {
    color: #666;
}

.nav_next .nav-prev-week.disabled {
    color: #999;
    cursor: not-allowed;
    opacity: 0.5;
}

.nav_next .nav-next-week {
    color: #666;
    margin-left: auto;
}

.nav_next .nav-next-week.disabled {
    color: #999;
    cursor: not-allowed;
    opacity: 0.5;
}

/* Обертка для таблицы с горизонтальной прокруткой на мобильных */
.schedule-table-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-top: 5px;
}

/* Таблица расписания */
.schedule-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
    min-width: 600px; /* Минимальная ширина для корректного отображения */
    table-layout: fixed; /* Фиксированная ширина колонок для узких ячеек */
}

/* Принудительные белые границы для всех ячеек */
.schedule-table td,
.schedule-table th {
    border: 1px solid #fff !important;
}

.schedule-table td.occupied,
.schedule-table td.expired {
    border: 1px solid #fff !important;
}

/* Стили заголовков таблицы */
.schedule-table th {
    color: white;
    font-weight: bold;
    text-align: center;
    padding: 6px 4px;
    border: 1px solid #fff !important;
}

.schedule-table th.corner {
    width: 50px;
    padding: 6px 2px;
}

.schedule-table th.toprow {
    padding: 6px 2px;
    text-align: center;
    font-size: 11px;
    line-height: 1.2;
}

/* Формат даты: десктоп - "13 декабря", мобильный - "13.12" */
.schedule-table th.toprow .date-desktop {
    display: inline;
}

.schedule-table th.toprow .date-mobile {
    display: none;
}

.schedule-table th.leftcol {
    color: white;
    font-weight: bold;
    text-align: center;
    width: 50px;
    padding: 4px 2px;
    font-size: 11px;
    line-height: 1.2;
}

/* Ячейки таблицы */
.schedule-table td {
    border: 1px solid #fff !important;
    padding: 0;
    text-align: center;
    vertical-align: middle;
    min-height: 40px;
    height: 40px;
    position: relative;
    width: auto; /* Автоматическая ширина для узких ячеек */
}

.schedule-table td .wrapper {
    padding: 0;
    min-height: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

/* Занятые слоты */
.schedule-table td.occupied {
    background-color: transparent;
}

/* Пустые ячейки с кнопкой "забронировать" */
.schedule-table td:not(.occupied):not(.expired) {
    background-color: transparent;
}

.schedule-table td.occupied .wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

/* Стили для блоков забронированных слотов (как в старом плагине) */
.schedule-table td.occupied .wrapper .block {
    display: inline-block;
}

.schedule-table td.occupied .wrapper .block.disp_none_mob {
    display: inline-block;
}

.schedule-table td.occupied .wrapper .block.disp_none_md {
    /* Показываем на больших экранах, скрываем на мобильных */
    display: none;
}

/* Стили для забронированных слотов (как в старом плагине) */
.schedule-table td.occupied .wrapper div {
    width: 92%;
    height: 20px;
    text-align: center;
    color: #525252;
    font-size: 12px;
    padding-top: 1px;
    /* border: 1px solid #EEE; */
    line-height: 1.6;
    background-color: rgba(255, 255, 255, 0.5);
}

/* Стили для красного текста (Ваша бронь) */
.schedule-table td.occupied .wrapper div.red,
.schedule-table td.occupied .wrapper .red {
    color: #d32f2f !important;
}

/* Кнопка "забронировать" при наведении на пустую ячейку (текстовая версия для десктопа) */
.schedule-table td:not(.occupied):not(.expired) .new_event_button.disp_none_mob {
    width: 92%;
    height: 20px;
    text-align: center;
    color: #525252;
    font-size: 12px;
    padding-top: 1px;
    /* border: 1px solid #EEE; */
    line-height: 1.6;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background-color 0.2s ease;
    display: none; /* По умолчанию скрыта */
}

.schedule-table td:not(.occupied):not(.expired) .new_event_button.disp_none_mob:hover {
    background-color: rgba(255, 255, 255, 0.8);
    color: #333;
}

/* Адаптивность для блоков (мобильная версия) */
@media (max-width: 768px) {
    .schedule-table td.occupied .wrapper .block.disp_none_mob {
        display: none !important;
    }
    
    .schedule-table td.occupied .wrapper .block.disp_none_md {
        display: inline-block !important;
        width: 92%;
        height: 20px;
        text-align: center;
        line-height: 20px;
    }
    
    .schedule-table td.occupied .wrapper .block.disp_none_md i {
        display: inline-block !important;
        font-size: 14px;
        vertical-align: middle;
    }
    
    /* На мобильных всегда скрываем текстовую версию */
    .schedule-table td:not(.occupied):not(.expired) .new_event_button.disp_none_mob {
        display: none !important; /* Принудительно скрываем на мобильных */
    }
    
}

/* Стили для иконок в мобильной версии */
.schedule-table td.occupied .wrapper .block.disp_none_md {
    display: none; /* Скрыто на десктопе */
}

/* Базовые стили для мобильных иконок */
.mobile-icon {
    display: inline-block;
    width: 14px;
    height: 14px;
    vertical-align: middle;
}

/* Иконка для забронированного слота - квадрат */
.mobile-icon-booked {
    background-color: #525252;
    border-radius: 2px;
}

/* Иконка для своей брони - ромб */
.mobile-icon-my-booking {
    background-color: #d32f2f;
    transform: rotate(45deg);
    border-radius: 1px;
}


.schedule-table td.occupied .reservation-info {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.schedule-table td.occupied .reservation-name {
    font-size: 11px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

/* Прошедшие слоты */
.schedule-table td.expired {
    background-color: rgba(255, 255, 255, 0.35);
}

.schedule table .expired {
    background-color: rgba(255, 255, 255, 0.35);
}

/* Свободные слоты (кликабельные) */
.schedule-table td:not(.occupied):not(.expired) {
    cursor: pointer;
    transition: background-color 0.2s ease;
}


/* Модальное окно для бронирования */
.yasa-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.yasa-modal-content {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.yasa-modal-header {
    display: none;
}

.yasa-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 28px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    line-height: 1;
    z-index: 10;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.yasa-modal-close:hover {
    color: #333;
    background-color: #f5f5f5;
}

.yasa-modal-body {
    padding: 0;
}

.yasa-modal-body p {
    margin: 0 0 15px 0;
    color: #666;
}

/* Стили для формы бронирования */
#bookingModal .content {
    padding: 24px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

#bookingModal .content h3 {
    margin: 0 0 12px 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
    line-height: 1.4;
}

#bookingModal .content h3:first-child {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
}

#bookingModal .content h3:last-of-type {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
}

#bookingModal .content h3 span {
    font-weight: 400;
}

#bookingModal .content h3 .m_dig {
    font-size: 14px;
    color: #666;
}

/* Поля формы */
#bookingModal .content .field_name {
    margin: 8px 0;
    font-size: 14px;
    color: #333;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
}

#bookingModal .content .field_name span {
    white-space: nowrap;
    flex-shrink: 0;
}

#bookingModal .content .field_name input[type="text"],
#bookingModal .content .field_name input[type="email"] {
    flex: 1;
    min-width: 0;
    padding: 7px 10px;
    margin: 0;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    color: #333;
    background-color: #f9f9f9;
    box-sizing: border-box;
    transition: border-color 0.2s ease;
}

#bookingModal .content .field_name input[type="text"]:disabled,
#bookingModal .content .field_name input[type="email"]:disabled {
    background-color: #f5f5f5;
    color: #666;
    cursor: not-allowed;
}

#bookingModal .content .field_name input[type="text"]:focus,
#bookingModal .content .field_name input[type="email"]:focus {
    outline: none;
    border-color: #5dc7c1;
    background-color: #fff;
}

#bookingModal .content .field_name input[type="text"]:required:invalid,
#bookingModal .content .field_name input[type="text"]:required:invalid:focus {
    border-color: #d63638;
}

#bookingModal .content .atention {
    margin: 8px 0;
    padding: 8px 10px;
    background-color: #fff3cd;
    border-left: 4px solid #ffc107;
    color: #856404;
    font-size: 13px;
    line-height: 1.5;
    border-radius: 4px;
}

/* Select для типа занятий */
#bookingModal .content select#room_price {
    width: 100%;
    padding: 8px 10px;
    margin-top: 4px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    color: #333;
    background-color: #fff;
    box-sizing: border-box;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

#bookingModal .content select#room_price:focus {
    outline: none;
    border-color: #5dc7c1;
}

/* Предупреждения (красный текст) */
#bookingModal .content .atention {
    margin: 12px 0;
    padding: 10px 12px;
    background-color: #fff3cd;
    border-left: 4px solid #ffc107;
    color: #856404;
    font-size: 13px;
    line-height: 1.5;
    border-radius: 4px;
}

#bookingModal .content .atention b {
    color: #d32f2f;
    font-weight: 600;
}

#bookingModal .content .atention a {
    color: #1976d2;
    text-decoration: underline;
}

#bookingModal .content .atention a:hover {
    color: #1565c0;
}

/* Стоимость */
#bookingModal .content .field_name span {
    font-weight: 600;
    color: #333;
}

#bookingModal .content .field_name:last-of-type {
    font-size: 16px;
    font-weight: 600;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 2px solid #eee;
}

#bookingModal .content .field_name:last-of-type span {
    font-size: 18px;
    color: #1976d2;
}

/* Textarea для пожеланий */
#bookingModal .content textarea#app_misc {
    width: 100%;
    min-height: 60px;
    padding: 8px 10px;
    margin-top: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    color: #333;
    font-family: inherit;
    resize: vertical;
    box-sizing: border-box;
    transition: border-color 0.2s ease;
}

#bookingModal .content textarea#app_misc:focus {
    outline: none;
    border-color: #5dc7c1;
}

/* Правила */
#bookingModal .content .rule {
    margin: 16px 0;
    padding: 12px;
    background-color: #f9f9f9;
    border-radius: 4px;
    font-size: 13px;
    line-height: 1.6;
    color: #555;
}

#bookingModal .content .rule input[type="checkbox"] {
    margin-right: 8px;
    cursor: pointer;
    width: auto;
}

#bookingModal .content .rule a {
    color: #1976d2;
    text-decoration: underline;
    font-weight: 500;
}

#bookingModal .content .rule a:hover {
    color: #1565c0;
}

#bookingModal .content .rule .atention {
    display: block;
    margin-top: 8px;
    padding: 8px 10px;
    background-color: #ffebee;
    border-left: 4px solid #d32f2f;
    color: #c62828;
    font-weight: 500;
    border-radius: 4px;
}

/* Кнопка отправки */
#bookingModal .content button#submit {
    width: 100%;
    padding: 12px 18px;
    margin-top: 16px;
    background-color: #5dc7c1;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#bookingModal .content button#submit:hover {
    background-color: #4ab3ad;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

#bookingModal .content button#submit:active {
    transform: translateY(0);
}

#bookingModal .content button#submit:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* Ошибки */
#bookingModal .content .error_text {
    margin-top: 10px;
    padding: 10px;
    background-color: #ffebee;
    color: #c62828;
    border-radius: 4px;
    font-size: 13px;
    display: none;
}

/* Стили для multiselect оборудования (как в админке) */
#bookingModal #formEquipment {
    margin: 8px 0;
    width: 100%;
}

#bookingModal #formEquipment .ms-options-wrap {
    position: relative;
    display: inline-block;
    width: 100%;
    max-width: 100%;
}

#bookingModal #formEquipment .ms-options-wrap button {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #c3c4c7;
    background: white;
    color: #333;
    cursor: pointer;
    text-align: left;
    font-size: 14px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    transition: border-color 0.2s, box-shadow 0.2s;
    border-radius: 4px;
}

#bookingModal #formEquipment .ms-options-wrap button:focus {
    border-color: #5dc7c1;
    box-shadow: 0 0 0 1px #5dc7c1;
    outline: none;
}

#bookingModal #formEquipment .ms-options-wrap button:hover {
    background: #f8f9fa;
}

#bookingModal #formEquipment .ms-options {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    z-index: 10000;
    max-height: 400px;
    overflow-y: auto;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    margin-top: 5px;
    border-radius: 4px;
}

#bookingModal #formEquipment .ms-search {
    padding: 10px;
    border-bottom: 1px solid #e5e5e5;
    background: #f8f9fa;
}

#bookingModal #formEquipment .ms-search input {
    width: 100%;
    padding: 7px 10px;
    border: 1px solid #c3c4c7;
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
    border-radius: 4px;
    box-sizing: border-box;
}

#bookingModal #formEquipment .ms-search input:focus {
    border-color: #5dc7c1;
    box-shadow: 0 0 0 1px #5dc7c1;
    outline: none;
}

#bookingModal #formEquipment .ms-options ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

#bookingModal #formEquipment .ms-options li {
    padding: 6px 10px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
}

#bookingModal #formEquipment .ms-options li:hover {
    background: #f0f0f1;
}

#bookingModal #formEquipment .ms-options li label {
    cursor: pointer;
    display: block;
    margin: 0;
    font-weight: normal;
}

#bookingModal #formEquipment .ms-options li input[type="checkbox"] {
    margin-right: 6px;
    width: auto;
}

#bookingModal #formEquipment .ms-options li.optgroup {
    font-weight: bold;
    background: #f8f9fa;
    padding: 8px 10px;
    border-bottom: 1px solid #e5e5e5;
}

#bookingModal #formEquipment .ms-options li.optgroup .label {
    font-weight: 600;
    color: #333;
}

/* Парковка */
#bookingModal .content .disp_no_park {
    margin: 15px 0;
}

#bookingModal .content .disp_no_park input[type="checkbox"] {
    margin-right: 8px;
    cursor: pointer;
}

#bookingModal .content .redCod {
    margin-top: 10px;
}

#bookingModal .content .redCod input[type="text"] {
    width: calc(50% - 5px);
    padding: 10px 12px;
    margin-right: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

#bookingModal .content .redCod input[type="text"]:last-child {
    margin-right: 0;
}

#bookingModal .content .redCod input[type="text"]:focus {
    outline: none;
    border-color: #5dc7c1;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #333;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #5dc7c1;
    box-shadow: 0 0 0 2px rgba(93, 199, 193, 0.2);
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

.yasa-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.yasa-btn-primary {
    background-color: #5dc7c1;
    color: white;
}

.yasa-btn-primary:hover {
    background-color: #4ab3ad;
}

.yasa-btn-primary:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.yasa-btn-secondary {
    background-color: #f5f5f5;
    color: #333;
    border: 1px solid #ddd;
}

.yasa-btn-secondary:hover {
    background-color: #e0e0e0;
}

/* Сообщения */
.yasa-message {
    padding: 15px 20px;
    margin: 10px 0;
    border-radius: 4px;
    font-weight: 500;
    animation: slideIn 0.3s ease-out;
}

.yasa-message-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.yasa-message-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Адаптивность */
/* Мобильная версия */
@media (max-width: 768px) {
    .schedule-controls {
        flex-direction: column;
        gap: 10px;
    }
    
    .schedule-week-info {
        font-size: 16px;
        min-width: auto;
    }
    
    /* Обертка таблицы - горизонтальная прокрутка на мобильных */
    .schedule-table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin-left: -10px;
        margin-right: -10px;
        padding-left: 10px;
        padding-right: 10px;
    }
    
    .schedule-table {
        font-size: 10px;
        min-width: 330px; /* Еще более узкая таблица */
        table-layout: auto; /* Автоматическое распределение ширины */
    }
    
    .schedule-table th,
    .schedule-table td {
        padding: 2px 0.5px; /* Минимальные отступы */
    }
    
    .schedule-table th.corner {
        width: 32px; /* Уже колонка времени */
        padding: 2px 0.5px;
        font-size: 8px;
    }
    
    .schedule-table th.toprow {
        font-size: 8px;
        line-height: 1.1;
        padding: 2px 0.5px;
        width: auto; /* Автоматическая ширина, но узкая */
        min-width: 0; /* Позволяет сжиматься */
        max-width: 38px; /* Максимальная ширина колонки с датой */
    }
    
    /* На мобильных: показываем цифровой формат даты, скрываем текстовый и день недели */
    .schedule-table th.toprow .date-desktop {
        display: none;
    }
    
    .schedule-table th.toprow .date-mobile {
        display: inline;
    }
    
    .schedule-table th.toprow .day-name {
        display: none;
    }
    
    .schedule-table th.leftcol {
        width: 32px; /* Уже колонка времени */
        padding: 2px 0.5px;
        font-size: 8px;
    }
    
    .schedule-table td {
        padding: 0;
        min-width: 0; /* Позволяет сжиматься */
    }
    
    .schedule-table td {
        min-height: 30px;
        height: 30px;
    }
    
    .schedule-table td .wrapper {
        min-height: 30px;
        height: 30px;
    }
    
    .schedule-table td.occupied .wrapper div {
        font-size: 10px;
        height: 18px;
        padding-top: 0;
    }
    
    .schedule-table td:not(.occupied):not(.expired) .new_event_button {
        font-size: 10px;
        height: 18px;
        padding-top: 0;
    }
    
    .room0 h2 {
        font-size: 20px;
    }
    
    .nav_next {
        font-size: 12px;
        flex-wrap: wrap;
        gap: 5px;
    }
    
    .nav_next span {
        font-size: 12px;
    }
}

/* Мобильная версия (узкие экраны) */
@media (max-width: 768px) {
    .schedule-table {
        font-size: 9px;
        min-width: 290px; /* Еще более узкая таблица */
        table-layout: auto; /* Автоматическое распределение */
    }
    
    .schedule-table th,
    .schedule-table td {
        padding: 1px 0.5px; /* Минимальные отступы */
    }
    
    .schedule-table th.corner {
        width: 28px; /* Еще уже колонка времени */
        font-size: 7px;
        padding: 1px 0.5px;
    }
    
    .schedule-table th.toprow {
        font-size: 7px;
        padding: 2px 0.5px;
        width: auto;
        min-width: 0;
        max-width: 34px; /* Максимальная ширина колонки с датой */
    }
    
    .schedule-table th.leftcol {
        width: 28px; /* Еще уже колонка времени */
        font-size: 7px;
        padding: 1px 0.5px;
    }
    
    .schedule-table td {
        padding: 0;
        min-width: 0;
    }
    
    .schedule-table td {
        min-height: 25px;
        height: 25px;
    }
    
    .schedule-table td .wrapper {
        min-height: 25px;
        height: 25px;
    }
    
    .schedule-table td.occupied .wrapper div {
        font-size: 9px;
        height: 16px;
    }
    
    .room0 h2 {
        font-size: 18px;
    }
    
    .nav_next {
        font-size: 11px;
    }
    
    .nav_next span {
        font-size: 11px;
    }
}