/* ============================================================
   RANKRIX SUITE — POPUPS (full-screen variant)
   Dark, transparent, blurred backdrop fills the whole viewport
   on every screen size. Form sits centred with no card chrome.
   Scrollbar hidden but tall forms still scroll naturally.
   ============================================================ */

/* ---------- Stage = full viewport ---------- */
.rks-popup-stage {
    position: fixed;
    inset: 0;
    z-index: 99980;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding: clamp(64px, 7vw, 110px) clamp(16px, 3vw, 60px) clamp(40px, 5vw, 80px);
    overflow-y: auto;
    overflow-x: hidden;
    /* Hide scrollbar — keep scroll functionality */
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
    /* Explicitly allow vertical touch panning inside the popup. Without
       this, some browsers prevent scroll inside the popup when the body
       is scroll-locked. */
    touch-action: pan-y;
    overscroll-behavior: contain;
}
.rks-popup-stage::-webkit-scrollbar { display: none; width: 0; height: 0; }
.rks-popup-stage.is-open { display: flex; }

body.rks-popup-locked,
html.rks-popup-locked {
    overflow: hidden !important;
    height: 100% !important;
    overscroll-behavior: contain;
}

/* ---------- Blurred backdrop layer ---------- */
.rks-popup-overlay {
    position: fixed;
    inset: 0;
    z-index: 0;
    background: rgba(0, 0, 0, 0.62);
    backdrop-filter: blur(22px) saturate(1.2);
    -webkit-backdrop-filter: blur(22px) saturate(1.2);
    cursor: pointer;
    opacity: 0;
    animation: rks-overlay-in 420ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.rks-popup-stage.is-closing .rks-popup-overlay {
    animation: rks-overlay-out 280ms cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
@keyframes rks-overlay-in  { to { opacity: 1; } }
@keyframes rks-overlay-out { from { opacity: 1; } to { opacity: 0; } }

/* ---------- Popup = transparent content holder ---------- */
.rks-popup {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 720px;
    margin: auto;
    padding: clamp(8px, 1.4vw, 20px) 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
    max-height: none;
    opacity: 0;
    transform: translateY(18px) scale(0.97);
    animation: rks-popup-in 480ms cubic-bezier(0.34, 1.32, 0.64, 1) 120ms forwards;
    scrollbar-width: none;
}
.rks-popup--wide { max-width: 800px; }
.rks-popup::-webkit-scrollbar { display: none; width: 0; height: 0; }

.rks-popup-stage.is-closing .rks-popup {
    animation: rks-popup-out 260ms cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
@keyframes rks-popup-in  { to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes rks-popup-out { to { opacity: 0; transform: translateY(8px) scale(0.97); } }

/* ---------- Close button — fixed to viewport corner ---------- */
.rks-popup__close {
    position: fixed;
    top: clamp(14px, 2vw, 26px);
    right: clamp(14px, 2vw, 26px);
    width: 38px;
    height: 38px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 1px;
    color: rgba(255, 255, 255, 0.78);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition:
        background 240ms cubic-bezier(0.4, 0, 0.2, 1),
        border-color 240ms cubic-bezier(0.4, 0, 0.2, 1),
        color 240ms cubic-bezier(0.4, 0, 0.2, 1),
        transform 320ms cubic-bezier(0.34, 1.4, 0.64, 1);
    z-index: 99990;
    backdrop-filter: blur(10px) saturate(1.3);
    -webkit-backdrop-filter: blur(10px) saturate(1.3);
    -webkit-tap-highlight-color: transparent;
}
.rks-popup__close:hover {
    background: rgba(248, 113, 113, 0.18);
    border-color: rgba(248, 113, 113, 0.55);
    color: #ffffff;
    transform: rotate(90deg);
}
.rks-popup__close:active { transform: rotate(90deg) scale(0.95); }
.rks-popup__close:focus-visible {
    outline: 2px solid rgba(0, 87, 255, 0.7);
    outline-offset: 3px;
}
.rks-popup__close svg { width: 13px; height: 13px; }

/* Only the active popup's close button shows */
.rks-popup[hidden] .rks-popup__close { display: none; }

/* ---------- Responsive ---------- */
@media (max-width: 559px) {
    .rks-popup-stage { padding: 60px 14px 30px; }
    .rks-popup { padding: 0; }
    .rks-popup__close { width: 34px; height: 34px; top: 12px; right: 12px; }
}
@media (min-width: 1920px) {
    .rks-popup { max-width: 760px; }
    .rks-popup--wide { max-width: 860px; }
    .rks-popup__close { width: 42px; height: 42px; }
    .rks-popup__close svg { width: 14px; height: 14px; }
}
@media (min-width: 2560px) {
    .rks-popup { max-width: 840px; }
    .rks-popup--wide { max-width: 960px; }
    .rks-popup__close { width: 50px; height: 50px; }
    .rks-popup__close svg { width: 18px; height: 18px; }
}
@media (min-width: 3840px) {
    .rks-popup { max-width: 960px; }
    .rks-popup--wide { max-width: 1120px; }
    .rks-popup__close { width: 60px; height: 60px; }
    .rks-popup__close svg { width: 22px; height: 22px; }
}

@media (prefers-reduced-motion: reduce) {
    .rks-popup-overlay, .rks-popup, .rks-popup__close {
        animation-duration: 1ms !important;
        transition-duration: 1ms !important;
    }
}

/* ============================================================
   FULL-SCREEN BOOKING — glass polish + confirmation card
   ============================================================ */
/* Frosted glass panel behind the form for depth on the full-screen overlay */
.rks-popup--wide .rks-form,
.rks-popup .rks-booking {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: 18px;
    backdrop-filter: blur(14px) saturate(1.1);
    -webkit-backdrop-filter: blur(14px) saturate(1.1);
    box-shadow: 0 30px 80px -20px rgba(0,0,0,0.55);
    padding: clamp(22px, 3vw, 40px);
}

/* Confirmation (thank-you) details card */
.rks-success { text-align: center; animation: rks-success-rise 520ms cubic-bezier(0.22,1,0.36,1) both; }
@keyframes rks-success-rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.rks-success__icon { margin: 0 auto 14px; width: 64px; height: 64px; }
.rks-success__title { font-size: clamp(22px, 3vw, 30px); font-weight: 700; color: #fff; margin: 0 0 8px; }
.rks-success__body { color: rgba(255,255,255,0.72); font-size: 15px; margin: 0 auto 22px; max-width: 420px; line-height: 1.6; }

.rks-success__card {
    text-align: left;
    max-width: 380px;
    margin: 0 auto 22px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 14px;
    overflow: hidden;
}
.rks-success__card-row {
    display: flex; justify-content: space-between; align-items: center; gap: 16px;
    padding: 13px 18px;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    color: #fff; font-size: 14px;
}
.rks-success__card-row:last-child { border-bottom: 0; }
.rks-success__card-label { color: rgba(255,255,255,0.5); font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; }
.rks-success__card-row--hero { background: rgba(0,87,255,0.16); padding: 16px 18px; }
.rks-success__card-when { font-size: 16px; font-weight: 700; color: #fff; text-align: right; }
.rks-success__actions { display: flex; justify-content: center; }
