/*
 * НОВЫЕ СТИЛИ ДЛЯ CALENDAR.PHP
 * Эти стили воссоздают макет с вашего скриншота
 */

/* Обертка-ограничитель для страницы календаря */
.calendar-wrapper {
    max-width: 1236px;
    margin: 40px auto;
    padding: 0 15px;
    font-family: "Raleway", sans-serif;
    color: #333;
}

/* Заголовок страницы "Select your dates" */
.calendar-page-header {
    text-align: left;
    margin-bottom: 20px;
}
.calendar-page-header h1 {
    font-family: "Raleway", sans-serif;
    font-size: 32px;
    font-weight: 600;
    margin: 0 0 6px 0;
    text-transform: none;
    color: #333;
}
.calendar-page-header p {
    font-family: "EB Garamond", serif;
    font-size: 17px;
    margin: 0;
}

/* Легенда "Lowest Available Rate" */
.calendar-legend {
    text-align: right;
    margin-bottom: 10px;
}
.legend-item {
    font-family: "Raleway", sans-serif;
    font-size: 14px;
}
.legend-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    background-color: #00498D;
    border-radius: 50%;
    margin-right: 8px;
    vertical-align: middle;
}

/* * ОСНОВНОЙ БЛОК КАЛЕНДАРЯ
 * (включает стрелки и два месяца)
 */
.calendar-body {
    display: flex;
    align-items: flex-start; /* Выравниваем по верху */
    justify-content: center;
    position: relative; /* Для позиционирования стрелок */
    
    border: 1px solid #ddd;
    padding: 20px;
}

/* Обертка для ДВУХ месяцев */
.calendar-months-container {
    display: flex; /* <-- СТАВИМ МЕСЯЦЫ РЯДОМ */
    gap: 20px;     /* <-- Даем отступ между ними */
    width: 100%;   /* <-- Занимаем все доступное место */
    
    /* Выравниваем по верху, чтобы заголовки были на 1 уровне */
    align-items: flex-start; 
}

/* Контейнер одного месяца */
.month-view {
    width: 50%; /* <-- Занимает 50% ширина (РЕШАЕТ ПУСТОЕ ПРОСТРАНСТВО) */
    display: flex;
    flex-direction: column;
}

/* Заголовок месяца (November 2025) */
.month-header {
    /* Выравниваем по центру и задаем мин. высоту для ровности */
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 50px; /* <-- Гарантирует, что оба заголовка на 1 линии */
    margin-bottom: 10px;
}
.month-header strong {
    font-family: "Raleway", sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: #333;
    text-transform: uppercase;
}

/* СТРЕЛКИ НАВИГАЦИИ */
.month-nav-arrow {
    width: 30px;
    height: 30px;
    border: 1px solid #ccc;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
    
    /* Позиционируем стрелки */
    position: absolute;
    top: 50%;
    z-index: 10;
    
    /* --- ИСПРАВЛЕНИЕ ПОЛОЖЕНИЯ --- */
    /* Смещаем на всю ширину кнопки, чтобы "прицепиться" к рамке */
    transform: translateY(-50%);
}
.month-nav-arrow.prev {
    left: -30px; /* <-- ИСПРАВЛЕНО */
}
.month-nav-arrow.next {
    right: -30px; /* <-- ИСПРАВЛЕНО */
}
.month-nav-arrow svg {
    width: 8px;
    height: 14px;
    fill: none;
    stroke: #333;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    /* Центрируем иконку внутри кружка */
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}
.month-nav-arrow.prev svg {
    /* --- ИСПРАВЛЕНИЕ ПОВОРОТА --- */
    /* (пусто) - стрелка <L> уже смотрит влево */
}
.month-nav-arrow.next svg {
    /* (пусто) - стрелка <R> уже смотрит вправо */
}

/* СТИЛЬ ДЛЯ ВЫКЛЮЧЕННОЙ КНОПКИ */
.month-nav-arrow.disabled {
    opacity: 0.3;
    cursor: not-allowed;
}


/* Заголовки дней (MON, TUE...) */
.day-headers {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    margin-bottom: 10px;
}
.day-headers span {
    font-family: "Raleway", sans-serif;
    font-size: 12px;
    font-weight: 700;
    color: #888;
}

/* Сетка дней */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background-color: #ddd; /* Это создает "рамки" */
    border: 1px solid #ddd;
}

/* Ячейка дня */
.day-cell {
    background-color: #f9f9f9;
    padding: 8px;
    min-height: 100px;
    font-family: "Raleway", sans-serif;
}
.day-cell .day-number {
    font-size: 14px;
    font-weight: 600;
    color: #888;
    display: block;
    text-align: left;
}
.day-cell.disabled {
    background-color: #f0f0f0;
}
.day-cell.disabled .day-number {
    opacity: 0.5;
}

/* Доступный день (с ценой) */
.day-cell.available {
    background-color: #fff;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 2px;
}
.day-cell.available .day-number {
    color: #333;
}
.day-cell.available .day-price-strike {
    font-size: 13px;
    color: #888;
    text-decoration: line-through;
}
.day-cell.available .day-price {
    font-size: 15px;
    font-weight: 700;
    color: #333;
}

/* * СТИЛИ ВЫДЕЛЕНИЯ ПЕРИОДА
 */

/* Начало и Конец периода (Квадраты) */
.day-cell.selected-start,
.day-cell.selected-end {
    background-color: #2a3b56; /* <-- Цвет футера */
    color: white;
    border-radius: 5px; 
}
/* Перекрашиваем цены в белый */
.day-cell.selected-start .day-number,
.day-cell.selected-start .day-price-strike,
.day-cell.selected-start .day-price,
.day-cell.selected-end .day-number,
.day-cell.selected-end .day-price-strike,
.day-cell.selected-end .day-price {
    color: white;
}

/* Дни ВНУТРИ диапазона */
.day-cell.in-range {
    background-color: #e9eef3; /* Светло-синий фон */
}

/* Корректируем углы, если начало и конец на одной неделе */
.day-cell.selected-start {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}
.day-cell.selected-end {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}
/* Если выбран 1 день (старт=конец) */
.day-cell.selected-start.selected-end {
    border-radius: 5px;
}


/* * --- НОВЫЙ СТИЛЬ ДЛЯ "СЕГОДНЯ" ---
 */
.day-cell.today .day-number {
    /* Обводим номер дня в кружок */
    background-color: #2a3b56; /* Цвет футера */
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.dates-selector {
    /* --- Позиционирование --- */
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 1000;

    /* --- Скрытие по умолчанию --- */
    display: none; 

    /* --- Внешний вид --- */
    background-color: #ffffff;
    border-top: 1px solid #e0e0e0;
    box-shadow: 0 -4px 12px rgba(0,0,0,0.08);
    
    /* --- Внутренние отступы и выравнивание --- */
    padding: 16px 30px;
    /* (Строка 'display: flex;' отсюда удалена) */
    align-items: center;
    justify-content: space-between;
    
    font-family: "Raleway", sans-serif;
}

/* Класс .visible добавляет JS, чтобы показать окно */
.dates-selector.visible {
    display: flex;
}

.dates-selector-dates-data {
    display: flex;
    align-items: center;
}

/* Иконка-галочка (из вашего SVG) */
.dates-selector .dates-data-SVG {
    margin-right: 20px;
}
.dates-selector .dates-data-SVG svg {
    width: 27px;
    height: 24px;
    fill: none;
    stroke: #00498D; /* Синий цвет из легенды */
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Текст "You have selected:" */
.dates-selector .dates-selector-label {
    font-size: 16px;
    color: #333;
    margin-right: 12px;
}

/* Текст "X Nights" */
.dates-selector .night-count {
    font-size: 20px;
    font-weight: 700;
    color: #111;
}

/* Кнопка "APPLY" */
.dates-selector .ibe-cn-cta-btn {
    /* --- Светло-зеленый цвет --- */
    background-color: #9FDDC7 ; /* <-- Светло-зеленый */
    color: #ffffff; /* Белый текст */
    
    padding: 14px 28px;
    text-decoration: none;
    font-family: "Raleway", sans-serif;
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    border: none; /* Убираем рамку, делаем "плоской" */
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.2s ease;
}

.dates-selector .ibe-cn-cta-btn:hover {
    background-color: #aee2d1; /* Чуть светлее */
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.dates-selector .ibe-cn-cta-btn svg {
    width: 7px;
    height: 12px;
    fill: none;
    stroke: white;
    stroke-width: 2;
}


/* Адаптация для мобильных (скрываем галочку и текст) */
@media (max-width: 767px) {
    .dates-selector {
        padding: 12px 15px;
    }
    .dates-selector .dates-data-SVG {
        display: none;
    }
    .dates-selector .dates-selector-label {
        /* Можно скрыть, если нужно больше места */
        /* display: none; */ 
        font-size: 14px;
        margin-right: 8px;
    }
    .dates-selector .night-count {
        font-size: 18px;
    }
    .dates-selector .ibe-cn-cta-btn {
        padding: 12px 20px;
        font-size: 13px;
    }
}


/* =====================================
 * (НОВЫЙ БЛОК) АДАПТАЦИЯ КАЛЕНДАРЯ
 * =====================================
 */

@media (max-width: 991px) {
    /* --- Планшеты --- */
    
    .calendar-body {
        padding: 20px 15px;
    }

    /* Перемещаем стрелки внутрь */
    .month-nav-arrow {
        transform: translateY(-50%);
        top: 50%;
    }
    .month-nav-arrow.prev {
        left: 10px;
    }
    .month-nav-arrow.next {
        right: 10px;
    }
    
    .calendar-months-container {
        gap: 10px;
    }
    
    .day-cell {
        min-height: 80px;
        padding: 6px;
    }
    .day-cell .day-price-strike {
        font-size: 12px;
    }
    .day-cell .day-price {
        font-size: 14px;
    }
}


@media (max-width: 767px) {
    /* --- Телефоны --- */

    .calendar-wrapper {
        margin-top: 20px;
    }

    .calendar-page-header h1 {
        font-size: 28px;
    }

    /* Ставим месяцы друг под друга */
    .calendar-months-container {
        flex-direction: column;
        gap: 30px;
    }
    .month-view {
        width: 100%;
    }

    /* Перемещаем стрелки наверх */
    .calendar-body {
        padding: 10px;
        padding-top: 60px; /* Место для стрелок */
    }
    .month-nav-arrow {
        top: 15px;
        transform: translateY(0);
    }
    .month-nav-arrow.prev {
        left: 10px;
    }
    .month-nav-arrow.next {
        right: 10px;
    }
    
    /* Уменьшаем ячейки */
    .day-cell {
        min-height: 65px;
        padding: 5px;
    }
    .day-cell .day-number {
        font-size: 13px;
    }
    .day-cell.today .day-number {
        width: 22px;
        height: 22px;
    }
}