/* ===================================================
   СТИЛИ ДЛЯ ВИДЖЕТА БРОНИРОВАНИЯ BNOVO
   ================================================== */

/* Контейнер виджета в hero секции - только позиционирование */
/* Десктоп версия - ТОЛЬКО для главной страницы */
/* Виджет находится в hero__content, позиционируем относительно hero__background */
.hero__content > .booking-widget-container.desktop-widget,
.hero .booking-widget-container.desktop-widget {
    position: absolute !important;
    bottom: 40px !important; /* Позиционируем от низа hero секции */
    left: 50% !important; /* Центрируем горизонтально */
    transform: translateX(-50%) !important; /* Центрируем горизонтально */
    width: 1591px !important;
    max-width: calc(100% - 80px) !important; /* 40px с каждой стороны */
    min-height: 500px !important; /* Увеличиваем минимальную высоту чтобы календарь помещался сразу */
    height: 500px !important; /* Фиксированная высота 500px чтобы календарь помещался сразу */
    max-height: 700px !important; /* Увеличиваем max-height чтобы всплывающие меню не обрезались */
    z-index: 100 !important; /* Увеличиваем z-index чтобы всплывающие меню были поверх всего */
    margin: 0 !important;
    padding: 0 !important; /* Убираем padding чтобы не было смещений */
    padding-top: 0 !important; /* Дополнительный отступ сверху для всплывающих меню */
    overflow: visible !important; /* КРИТИЧНО: Позволяем выпадающим элементам отображаться поверх */
    clip-path: none !important; /* Убираем любые обрезки */
    pointer-events: auto !important; /* Гарантируем что виджет кликабелен */
    top: auto !important; /* Отключаем top */
    right: auto !important; /* Отключаем right */
    /* Убираем все transitions чтобы не было скачков */
    transition: none !important;
    transition-property: none !important;
    transition-duration: 0s !important;
    transition-timing-function: none !important;
    /* Фиксируем высоту чтобы не было скачков */
    will-change: auto !important;
    /* Убираем flex влияние */
    flex: none !important;
    flex-grow: 0 !important;
    flex-shrink: 0 !important;
    flex-basis: auto !important;
    align-self: auto !important;
    order: 0 !important;
    /* НЕ скрываем виджет - применяем стили сразу, чтобы он был в правильном месте */
    /* Это предотвращает скачки, так как виджет сразу в нужной позиции */

/* Общий стиль для booking-widget-container (для других страниц) */
.booking-widget-container {
    position: absolute !important;
    bottom: 40px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    right: auto !important;
    top: auto !important;
    width: 1591px !important;
    max-width: calc(100% - 80px) !important;
    height: 222px !important;
    min-height: 222px !important;
    max-height: 222px !important;
    z-index: 10 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    clip-path: none !important;
    pointer-events: auto !important;
}

/* Дополнительная специфичность для гарантии применения стилей */
.hero__content > .booking-widget-container.desktop-widget {
    position: absolute !important;
    bottom: 40px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    top: auto !important;
    right: auto !important;
    /* Убираем влияние flex на виджет */
    align-self: auto !important;
    order: 0 !important;
    flex: none !important;
    margin: 0 !important;
    width: 1591px !important;
    max-width: calc(100% - 80px) !important;
    min-height: 222px !important;
    height: 222px !important;
    max-height: 700px !important; /* Увеличиваем max-height чтобы всплывающие меню не обрезались */
    z-index: 100 !important;
    padding: 0 !important;
    padding-top: 0 !important;
    overflow: visible !important;
    /* Убираем transition чтобы не было скачков */
    transition: none !important;
    /* Фиксируем высоту чтобы не было скачков */
    will-change: auto !important;
}

/* Адаптация для экранов 1728px */
@media (max-width: 1728px) {
    .booking-widget-container {
        position: absolute !important;
        bottom: 40px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        width: calc(100% - 80px) !important;
        max-width: 1591px !important;
        top: auto !important;
        min-height: 222px !important;
        height: auto !important;
        max-height: none !important;
    }
    
    .hero .booking-widget-container.desktop-widget {
        bottom: 40px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        top: auto !important;
        min-height: 222px !important;
        height: auto !important;
        max-height: none !important;
    }
}

/* Адаптация для экранов 1440px */
@media (max-width: 1440px) {
    .booking-widget-container {
        position: absolute !important;
        bottom: 40px !important; /* Позиционируем от низа hero секции */
        left: 50% !important;
        transform: translateX(-50%) !important;
        width: calc(100% - 80px) !important;
        max-width: 1400px !important;
        min-height: 222px !important;
        height: auto !important;
        max-height: none !important;
        overflow: visible !important;
        clip-path: none !important;
        top: auto !important;
    }
    
    /* Десктопный виджет на 1440px */
    .hero .booking-widget-container.desktop-widget {
        bottom: 40px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        min-height: 222px !important;
        height: auto !important;
        max-height: none !important;
        overflow: visible !important;
        clip-path: none !important;
        top: auto !important;
    }
}

/* Адаптация для планшетов и начало вертикального режима */
@media (max-width: 1024px) {
    /* Не переопределяем hero стили здесь - они в hero.css */
    
    /* Десктопный виджет в hero - скрыт на мобильных */
    .hero .booking-widget-container.desktop-widget {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
    }
    
    /* Мобильный виджет в hero - показан и не обрезается */
    .hero .booking-widget-container.mobile-widget {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        pointer-events: all !important;
        position: relative !important;
        top: auto !important;
        bottom: auto !important;
        left: auto !important;
        transform: none !important;
        width: 100% !important;
        max-width: 380px !important;
        height: auto !important;
        min-height: auto !important;
        max-height: none !important;
        margin: 0 auto !important;
        padding: 0 15px 40px !important;
        z-index: 2 !important;
        overflow: visible !important;
    }
    
    /* iframe внутри мобильного виджета */
    .hero .booking-widget-container.mobile-widget iframe {
        height: auto !important;
        min-height: 500px !important;
        max-height: none !important;
        overflow: visible !important;
    }
}

/* Адаптация для мобильных */
@media (max-width: 768px) {
    /* Мобильный виджет на 768px */
    .hero .booking-widget-container.mobile-widget {
        max-width: 340px !important;
        padding: 0 15px 30px !important;
    }
    
    .hero .booking-widget-container.mobile-widget iframe {
        min-height: 480px !important;
    }
}

@media (max-width: 480px) {
    /* Мобильный виджет на 480px */
    .hero .booking-widget-container.mobile-widget {
        max-width: 320px !important;
        padding: 0 10px 25px !important;
    }
    
    .hero .booking-widget-container.mobile-widget iframe {
        min-height: 450px !important;
    }
}

/* Скрытие ссылки на Bnovo (показывается только при ошибке) */
#_bnovo_link_ {
    display: none;
    color: #958ad1;
    font-family: 'Coolvetica', sans-serif;
    font-size: 18px;
    text-decoration: none;
    padding: 12px 24px;
    border: 2px solid #958ad1;
    border-radius: 11px;
    transition: none !important;
}

#_bnovo_link_:hover {
    background: #958ad1;
    color: #ffffff;
}

/* Стилизация iframe виджета */
#_bn_widget_ iframe {
    border-radius: 11px;
    border: none;
    /* Фиксируем высоту iframe, чтобы предотвратить сползание виджета */
    height: 500px !important; /* Увеличиваем начальную высоту чтобы календарь помещался сразу */
    min-height: 222px !important;
    max-height: 700px !important; /* Увеличиваем max-height чтобы всплывающие меню не обрезались */
    width: 100% !important;
    /* iframe не может иметь overflow: visible, но мы увеличиваем его высоту */
    clip-path: none !important;
    clip: auto !important;
    contain: none !important;
    isolation: auto !important;
    position: relative !important; /* Относительное позиционирование внутри контейнера */
    z-index: 1 !important;
    margin-top: 0 !important;
    padding-top: 0 !important;
    /* Убираем transition чтобы не было скачков */
    transition: none !important;
    /* Фиксируем высоту чтобы не было скачков */
    will-change: auto !important;
}

/* Десктопный iframe виджета - гарантируем фиксированную высоту */
/* КРИТИЧНО: iframe не может иметь overflow: visible, но мы можем увеличить его высоту
   чтобы всплывающие меню не обрезались, или использовать другой подход */
.hero .booking-widget-container.desktop-widget iframe {
    height: 500px !important; /* Увеличиваем начальную высоту чтобы календарь помещался сразу */
    min-height: 222px !important;
    max-height: 700px !important; /* Увеличиваем max-height чтобы всплывающие меню не обрезались */
    /* iframe не может иметь overflow: visible, но мы увеличиваем его высоту */
    clip-path: none !important;
    clip: auto !important;
    contain: none !important;
    isolation: auto !important;
    /* Позволяем всплывающим меню выходить за пределы iframe */
    pointer-events: auto !important;
    margin-top: 0 !important;
    padding-top: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    /* Убираем transition чтобы не было скачков */
    transition: none !important;
    /* Фиксируем высоту чтобы не было скачков */
    will-change: auto !important;
}

/* Контейнер виджета - увеличиваем высоту чтобы всплывающие меню не обрезались */
/* Используем другой подход: увеличиваем высоту hero__content чтобы всплывающие меню не обрезались */
.hero .booking-widget-container.desktop-widget {
    min-height: 222px !important;
    max-height: 700px !important; /* Увеличиваем max-height чтобы всплывающие меню не обрезались */
    height: 500px !important; /* Увеличиваем начальную высоту чтобы календарь помещался сразу */
    overflow: visible !important; /* Позволяем всплывающим меню выходить за пределы контейнера */
    /* Убираем transition чтобы не было скачков */
    transition: none !important;
    /* Фиксируем высоту чтобы не было скачков */
    will-change: auto !important;
}

/* Виджет Bnovo - гарантируем что выпадающие меню не обрезаются */
#_bn_widget_ {
    overflow: visible !important;
    clip-path: none !important;
    position: relative !important;
    height: 222px !important;
    min-height: 222px !important;
    max-height: 700px !important; /* Увеличиваем max-height чтобы всплывающие меню не обрезались */
}

/* Десктопный виджет Bnovo */
.hero .booking-widget-container.desktop-widget #_bn_widget_ {
    overflow: visible !important;
    clip-path: none !important;
    height: 222px !important;
    min-height: 222px !important;
    max-height: 700px !important; /* Увеличиваем max-height чтобы всплывающие меню не обрезались */
}

/* Выпадающие меню виджета - гарантируем что они не обрезаются */
.hero .booking-widget-container.desktop-widget * {
    overflow: visible !important;
}

/* Специально для выпадающих календарей и меню выбора */
.hero .booking-widget-container.desktop-widget iframe,
.hero .booking-widget-container.desktop-widget iframe body,
.hero .booking-widget-container.desktop-widget iframe html {
    overflow: visible !important;
}

/* Убеждаемся что выпадающие меню виджета не обрезаются */
/* Контейнер виджета и его прямые родители должны иметь overflow: visible */
.hero,
.hero__wrapper,
.hero__background,
.hero__content {
    overflow: visible !important;
    clip-path: none !important;
    clip: auto !important;
    contain: none !important;
    isolation: auto !important;
}

/* Специально для всплывающих меню виджета - гарантируем что они не обрезаются сверху */
.hero .booking-widget-container.desktop-widget iframe,
.hero .booking-widget-container.desktop-widget iframe * {
    overflow: visible !important;
    clip-path: none !important;
    clip: auto !important;
    contain: none !important;
    isolation: auto !important;
}

/* Всплывающие элементы виджета должны иметь высокий z-index */
.hero .booking-widget-container.desktop-widget iframe body * {
    z-index: 9999 !important;
    position: relative !important;
}

/* Виджет и его содержимое */
.hero .booking-widget-container.desktop-widget,
.hero .booking-widget-container.desktop-widget * {
    overflow: visible !important;
}

/* Исключение: только фоновое изображение может обрезаться */
.hero__background-image {
    /* overflow управляется через .hero__background */
}
