/* Booking modal overrides. This file intentionally loads after the main site CSS. */
.overlay.overlay--bg-black {
    position: fixed !important;
    inset: 0 !important;
    z-index: 2147483000 !important;
    width: 100% !important;
    height: 100% !important;
    height: 100dvh !important;
    margin: 0 !important;
    padding: 20px !important;
    box-sizing: border-box !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
    background: rgba(0, 22, 45, 0.72) !important;
    overscroll-behavior: contain;
}

.overlay.overlay--bg-black:not(.shown) {
    pointer-events: none !important;
}

.overlay.overlay--bg-black.shown {
    pointer-events: auto !important;
}

.overlay--bg-black .popup {
    display: block !important;
    width: min(720px, 100%) !important;
    height: auto !important;
    max-height: calc(100vh - 40px) !important;
    max-height: calc(100dvh - 40px) !important;
    overflow: hidden !important;
    border-radius: 12px !important;
    background: #fff !important;
    box-shadow: 0 24px 70px rgba(0, 22, 45, 0.38) !important;
}

.overlay--bg-black .popup .popup-inner {
    width: 100% !important;
    max-width: none !important;
    max-height: calc(100vh - 40px) !important;
    max-height: calc(100dvh - 40px) !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    box-sizing: border-box !important;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.popup .icon-close {
    appearance: none;
    -webkit-appearance: none;
    display: flex;
    float: right;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    margin: -10px -10px 8px 12px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #596a7d;
    font-family: Arial, sans-serif;
    font-size: 34px;
    line-height: 1;
    cursor: pointer;
}

.popup .icon-close:hover,
.popup .icon-close:focus-visible {
    background: #f3f9ff;
    color: #00162d;
    outline: 2px solid #34c0ca;
    outline-offset: 2px;
}

body.popup-is-open {
    position: fixed !important;
    top: var(--popup-scroll-top, 0) !important;
    right: 0 !important;
    left: 0 !important;
    width: 100% !important;
    overflow: hidden !important;
}

body.popup-is-open .mobile-call-strip,
body.popup-is-open .mobile-version,
body.popup-is-open .footer-booking-cta,
body.popup-is-open .back-to-top,
body.popup-is-open .pubble-app,
body.popup-is-open [class*="pubble"],
body.popup-is-open [id*="pubble"],
body.popup-is-open [class*="chatify"],
body.popup-is-open [id*="chatify"],
body.popup-is-open iframe[src*="chatify"] {
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Keep the booking CTA usable when the chat launcher sits in the same corner. */
body:not(.popup-is-open) > .pubble-app,
body:not(.popup-is-open) > [class*="pubble"],
body:not(.popup-is-open) > [id*="pubble"],
body:not(.popup-is-open) > [class*="chatify"],
body:not(.popup-is-open) > [id*="chatify"],
body:not(.popup-is-open) > iframe[src*="chatify"] {
    z-index: 9997 !important;
}

@media (max-width: 690px) {
    .overlay.overlay--bg-black {
        padding: 0 !important;
        align-items: stretch !important;
        background: #fff !important;
    }

    .overlay--bg-black::before,
    .overlay--bg-black::after {
        display: none !important;
    }

    .overlay--bg-black .popup {
        width: 100% !important;
        height: 100% !important;
        height: 100dvh !important;
        max-height: none !important;
        border-radius: 0 !important;
        box-shadow: none !important;
    }

    .overlay--bg-black .popup .popup-inner {
        height: 100% !important;
        height: 100dvh !important;
        max-height: none !important;
        padding: 0 18px calc(28px + env(safe-area-inset-bottom)) !important;
        scroll-padding-top: 64px;
    }

    .popup .popup-header {
        position: sticky !important;
        top: 0 !important;
        z-index: 5 !important;
        min-height: 62px !important;
        margin: 0 -18px 10px !important;
        padding: calc(10px + env(safe-area-inset-top)) 18px 10px !important;
        box-sizing: content-box !important;
        background: rgba(255, 255, 255, 0.97) !important;
        box-shadow: 0 1px 0 rgba(0, 22, 45, 0.09) !important;
    }

    .popup .icon-close {
        position: static !important;
        display: flex !important;
        float: right !important;
        align-items: center !important;
        justify-content: center !important;
        width: 42px !important;
        height: 42px !important;
        margin: 0 !important;
        border-radius: 50% !important;
        background: #f3f9ff !important;
        color: #00162d !important;
        font-size: 32px !important;
        font-weight: 400 !important;
        line-height: 1 !important;
        cursor: pointer !important;
    }

    .popup-inner .cta__title {
        clear: both !important;
        margin: 0 0 16px !important;
        font-size: 26px !important;
        line-height: 1.2 !important;
    }

    .popup-inner .book-url,
    .popup-inner .cta__item {
        min-height: 0 !important;
        margin: 0 0 14px !important;
        padding: 18px 16px 18px 66px !important;
    }

    .popup-inner .cta__separator {
        margin: 28px -18px 24px !important;
    }

    .book-form-holder .row {
        margin-right: 0 !important;
        margin-left: 0 !important;
    }

    .book-form-holder .row > [class*="col-"] {
        padding-right: 0 !important;
        padding-left: 0 !important;
    }

    .book-form-holder .form-control {
        min-height: 50px !important;
        font-size: 16px !important;
    }

    .enquiry-captcha {
        max-width: 100% !important;
        overflow: hidden !important;
    }

    .enquiry-captcha .g-recaptcha {
        transform: scale(0.88);
        transform-origin: 0 0;
    }
}

@media (max-width: 360px) {
    .overlay--bg-black .popup .popup-inner {
        padding-right: 14px !important;
        padding-left: 14px !important;
    }

    .popup .popup-header {
        margin-right: -14px !important;
        margin-left: -14px !important;
        padding-right: 14px !important;
        padding-left: 14px !important;
    }

    .enquiry-captcha .g-recaptcha {
        transform: scale(0.82);
    }
}
