﻿/* === КАЛЕНДАРЬ БРОНИРОВАНИЯ === */
.booking-dates {
    position: relative;
}

.booking-calendar-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 20px 80px rgba(0,0,0,0.15), 0 0 1px rgba(0,0,0,0.05);
    padding: 0;
    z-index: 99999;
    width: 620px;
    max-width: calc(100vw - 40px);
    display: none;
    user-select: none;
    overflow: visible;
    font-family: 'Inter', -apple-system, system-ui, sans-serif;
    border: 1px solid rgba(0,0,0,0.04);
}

/* Позиционирование для дочерних absolute элементов */
.booking-calendar-popup > * {
    position: relative;
}

.booking-calendar-popup > .calendar-close-btn {
    position: absolute !important;
}

/* Кнопка закрытия календаря */
.calendar-close-btn {
    position: absolute !important;
    top: 10px !important;
    right: 10px !important;
    width: 36px !important;
    height: 36px !important;
    border-radius: 50% !important;
    border: 1px solid #ddd !important;
    background: #ffffff !important;
    color: #333 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: all 0.2s !important;
    z-index: 9999 !important;
    font-size: 16px !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
}

.calendar-close-btn:hover {
    background: #f0f0f0 !important;
    color: #000 !important;
    transform: scale(1.1) !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
}

/* Черная подложка для календаря */
.booking-calendar-popup::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: -1;
    pointer-events: none;
}

.calendar-navigation {
    position: absolute;
    top: 35px;
    left: 30px;
    right: 30px;
    display: flex;
    justify-content: space-between;
    pointer-events: none;
    z-index: 30;
}

.calendar-nav-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid #e0e0e0;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    pointer-events: auto;
    transition: all 0.2s;
    color: #222;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.calendar-nav-btn:hover {
    background: #ffffff;
    border-color: #000000;
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
}

.calendar-months-container {
    padding: 50px 20px 24px;
    background: #ffffff !important;
    position: relative;
}

/* Переопределение темной темы календаря */
.booking-calendar-popup .calendar-months-container,
.booking-calendar-popup .calendar-month,
.booking-calendar-popup .calendar-weekdays,
.booking-calendar-popup .calendar-days {
    background: #ffffff !important;
}

.booking-calendar-popup .calendar-month-title {
    color: #111111 !important;
}

.booking-calendar-popup .weekday {
    color: #9999aa !important;
}

.calendar-grid-wrapper {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    width: 100%;
}

.calendar-month {
    flex: 1;
    background: #ffffff;
}

.calendar-month-title {
    text-align: center;
    font-weight: 700;
    font-size: 18px;
    margin-bottom: 20px;
    color: #111111;
    text-transform: capitalize;
    letter-spacing: -0.3px;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    margin-bottom: 16px;
    background: #ffffff;
}

.weekday {
    font-size: 13px;
    color: #9999aa;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    background: #ffffff;
}

.day {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 500;
    color: #222222;
    background: #ffffff;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.15s;
    position: relative;
}

.day.is-start,
.day.is-end {
    background: #ff385c !important;
    color: #ffffff !important;
    font-weight: 700;
}

.day.is-in-range {
    background: rgba(255, 56, 92, 0.1) !important;
    color: #222222 !important;
    border-radius: 0;
}

.day.is-in-range.is-start {
    border-radius: 50% 0 0 50%;
}

.day.is-in-range.is-end {
    border-radius: 0 50% 50% 0;
}

.day:hover:not(.empty):not(.disabled) {
    background: #f4f4f9;
    color: #000000;
    transform: scale(1.02);
}

.day.empty {
    cursor: default;
}

.day.disabled {
    color: #999999;
    background: transparent !important;
    cursor: not-allowed;
    font-weight: 400;
}

/* Забронированные даты - серый фон */
.day.booked {
    background: #e5e5e5 !important;
    color: #999999 !important;
    cursor: not-allowed;
    position: relative;
}

.day.booked::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 3px,
        rgba(150, 150, 150, 0.15) 3px,
        rgba(150, 150, 150, 0.15) 6px
    );
    border-radius: 50%;
    pointer-events: none;
}

/* Сегодняшняя дата */
.day.today {
    border: 2px solid #d4a531 !important;
    font-weight: 700;
    position: relative;
}

.day .today-badge {
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    background: #d4a531;
    color: #000;
    font-size: 8px;
    font-weight: 600;
    padding: 1px 4px;
    border-radius: 3px;
    white-space: nowrap;
    line-height: 1.2;
}

.weekday.holiday,
.day.holiday {
    color: #ff3b30 !important;
    background: #ffffff;
}

.day.holiday.is-start,
.day.holiday.is-end {
    color: #ffffff !important;
    background: #ff385c !important;
}

.day.holiday.is-in-range {
    color: #ff3b30 !important;
    background: rgba(255, 56, 92, 0.1);
}

/* Тултип с количеством суток */
.calendar-tooltip {
    position: fixed;
    background: #111111;
    color: #ffffff;
    padding: 8px 16px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    pointer-events: none;
    z-index: 2000;
    white-space: nowrap;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    display: none;
    transform: translate(-50%, -130%);
}

.calendar-tooltip::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid #111111;
}

.calendar-nights-tooltip {
    position: fixed !important;
    background: linear-gradient(135deg, #d4af37 0%, #f4e4b5 100%) !important;
    color: #1a1a1a !important;
    padding: 10px 18px !important;
    border-radius: 8px !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    white-space: nowrap !important;
    z-index: 999999999 !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4) !important;
    pointer-events: none !important;
    border: 2px solid #d4af37 !important;
}

.calendar-footer {
    padding: 20px 30px;
    border-top: 1px solid #ebebeb;
    display: flex;
    justify-content: center;
    align-items: center;
}

.calendar-reset-btn {
    background: linear-gradient(135deg, #ff385c 0%, #ff8c00 100%);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(255, 56, 92, 0.2);
}

.calendar-reset-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 56, 92, 0.3);
}

.calendar-reset-btn i {
    font-size: 16px;
}

.date-display {
    padding: 12px;
    border: 1px solid #dddddd;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
    color: #222;
}

.date-display:hover {
    border-color: #222;
}

.date-field {
    cursor: pointer;
}

.date-field label {
    display: block;
    margin-bottom: 8px;
    font-size: 12px;
    font-weight: 600;
    color: #222;
}

/* === ПОПАП ГОСТЕЙ === */
.booking-guests-popup {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    padding: 24px;
    z-index: 5000;
    display: none;
    border: 1px solid rgba(0,0,0,0.08);
}

.guests-counter {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
}

.guests-counter__text strong {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: #222;
    margin-bottom: 2px;
}

.guests-counter__text span {
    font-size: 13px;
    color: #717171;
}

.guests-counter__editing {
    display: flex;
    align-items: center;
    gap: 12px;
}

.guests-counter__button {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid #dddddd;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    color: #222;
    font-size: 14px;
}

.guests-counter__button:hover {
    border-color: #222;
    background: #f7f7f7;
}

.guests-counter__button:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.guests-counter__value {
    font-size: 16px;
    font-weight: 500;
    min-width: 24px;
    text-align: center;
    color: #d4af37;
}

.guests-divider {
    border: none;
    border-top: 1px solid #ebebeb;
    margin: 8px 0;
}

.guests-pets {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
}

.guests-pets__text {
    font-size: 15px;
    font-weight: 600;
    color: #222;
}

.guests-pets__switcher {
    width: 48px;
    height: 28px;
    background: #ebebeb;
    border-radius: 100px;
    position: relative;
    cursor: pointer;
    transition: background 0.3s;
    display: block;
}

.guests-pets__switcher input {
    display: none;
}

.switcher-dot {
    width: 22px;
    height: 22px;
    background: #ffffff;
    border-radius: 50%;
    position: absolute;
    top: 3px;
    left: 3px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.guests-pets__switcher input:checked ~ .switcher-dot {
    left: 23px;
}

.guests-pets__switcher:has(input:checked) {
    background: #222222;
}

.guests-ready-btn {
    width: 100%;
    background: linear-gradient(135deg, #ff385c 0%, #ff8c00 100%);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 600;
    margin-top: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(255, 56, 92, 0.2);
}

.guests-ready-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 56, 92, 0.3);
}

.guests-selector {
    width: 100%;
    padding: 12px;
    border: 1px solid #dddddd;
    border-radius: 8px;
    background: #ffffff;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s;
    font-size: 14px;
    color: #222;
}

.guests-selector:hover {
    border-color: #222;
}

.booking-guests {
    position: relative;
    margin-bottom: 16px;
}

.booking-guests label {
    display: block;
    margin-bottom: 8px;
    font-size: 12px;
    font-weight: 600;
    color: #222;
}



