/* Sang Spa booking final-handoff spotlight.
 * The viewport scrim, foreground guidance, and pointer helper are mounted by
 * booking-canonical.js and follow the geometry of the real handoff controls.
 */

.sang-booking-handoff-spotlight {
    position: fixed;
    display: none;
    pointer-events: none;
    box-sizing: border-box;
    z-index: 1000000;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 1.15rem;
    box-shadow:
        0 0 0 200vmax rgba(8, 12, 20, 0.48),
        0 0 0 4px rgba(255, 255, 255, 0.14);
}

.sang-booking-handoff-spotlight.is-active {
    display: block;
}

.sang-booking-handoff-guidance {
    position: fixed;
    height: 58px;
    z-index: 1000001;
    pointer-events: none;
    box-sizing: border-box;
    opacity: 0;
    visibility: hidden;
    text-align: center;
    contain: layout paint style;
    filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.24));
    transition:
        opacity 220ms ease,
        visibility 0s linear 220ms;
}

.sang-booking-handoff-guidance.is-active {
    opacity: 1;
    visibility: visible;
    transition:
        opacity 220ms ease,
        visibility 0s linear 0s;
}

.sang-booking-handoff-guidance__viewport {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 0.75rem;
}

.sang-booking-handoff-guidance__message {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 2px 4px;
    box-sizing: border-box;
    opacity: 0;
    transform: translateY(26%);
    transform-origin: 50% 50%;
    will-change: transform, opacity;
    animation: sang-handoff-guidance-cycle 9s cubic-bezier(0.22, 1, 0.36, 1) infinite;
}

.sang-booking-handoff-guidance__message--b {
    animation-delay: 4.5s;
}

.sang-booking-handoff-guidance__heading,
.sang-booking-handoff-guidance__secondary {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: clip;
    white-space: nowrap;
}

.sang-booking-handoff-guidance__heading {
    color: rgba(255, 255, 255, 0.95);
    font-family: inherit;
    font-size: clamp(13px, 1.15vw, 16px);
    font-weight: 700;
    line-height: 1.16;
    letter-spacing: -0.01em;
}

.sang-booking-handoff-guidance__secondary {
    color: rgba(255, 255, 255, 0.72);
    font-family: inherit;
    font-size: clamp(10.5px, 0.9vw, 12.5px);
    font-weight: 500;
    line-height: 1.18;
    letter-spacing: 0;
}

.sang-booking-handoff-helper {
    --sang-helper-label-shift-x: 0px;
    --sang-helper-label-shift-y: 0px;
    position: fixed;
    width: 46px;
    height: 46px;
    z-index: 1000003;
    pointer-events: none;
    box-sizing: border-box;
    opacity: 0;
    visibility: hidden;
    color: #fff;
    transition:
        opacity 300ms ease,
        visibility 0s linear 300ms;
}

.sang-booking-handoff-helper.is-visible {
    opacity: 1;
    visibility: visible;
    transition:
        opacity 300ms ease,
        visibility 0s linear 0s;
}

.sang-booking-handoff-helper.is-travelling {
    transition:
        left 650ms cubic-bezier(0.22, 1, 0.36, 1),
        top 650ms cubic-bezier(0.22, 1, 0.36, 1),
        opacity 300ms ease,
        visibility 0s linear 0s;
}

.sang-booking-handoff-helper__pointer {
    display: block;
    width: 46px;
    height: 46px;
    background: currentColor;
    -webkit-mask-image: url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz48IS0tIFVwbG9hZGVkIHRvOiBTVkcgUmVwbywgd3d3LnN2Z3JlcG8uY29tLCBHZW5lcmF0b3I6IFNWRyBSZXBvIE1peGVyIFRvb2xzIC0tPgo8c3ZnIHdpZHRoPSI4MDBweCIgaGVpZ2h0PSI4MDBweCIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgY2xhc3M9Imljb24iIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZmlsbD0iIzAwMDAwMCIgZD0iTTUxMS41NTIgMTI4Yy0zNS41ODQgMC02NC4zODQgMjguOC02NC4zODQgNjQuNDQ4djUxNi40OEwyNzQuMDQ4IDU3MC44OGE5NC4yNzIgOTQuMjcyIDAgMDAtMTEyLjg5Ni0zLjQ1NiA0NC40MTYg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gOTQuMjcyIDAgMDAtMTEyLjg5Ni0zLjQ1NiA0NC40MTYgNDQuNDE2IDAgMDAtOC45NiA2Mi4yMDhMMzMyLjggODcwLjRBNjQgNjQgMCAwMDM4NCA4OTZoNTEyVjU3NS4yMzJhNjQgNjQgMCAwMC00NS42MzItNjEuMzEybC0yMDUuOTUyLTYxLjc2QTk2IDk2IDAgMDE1NzYgMzYwLjE5MlYxOTIuNDQ4QzU3NiAxNTYuOCA1NDcuMiAxMjggNTExLjU1MiAxMjh6TTM1OS4wNCA1NTYuOGwyNC4xMjggMTkuMlYxOTIuNDQ4YTEyOC40NDggMTI4LjQ0OCAwIDExMjU2LjgzMiAwdjE2Ny43NDRhMzIgMzIgMCAwMDIyLjc4NCAzMC42NTZsMjA2LjAxNiA2MS43NkExMjggMTI4IDAgMDE5NjAgNTc1LjIzMlY4OTZhNjQgNjQgMCAwMS02NCA2NEgzODRhMTI4IDEyOCAwIDAxLTEwMi40LTUxLjJMMTAxLjA1NiA2NjguMDMyQTEwOC40MTYgMTA4LjQxNiAwIDAxMTI4IDUxMi41MTJhMTU4LjI3MiAxNTguMjcyIDAgMDExODUuOTg0IDguMzJMMzU5LjA0IDU1Ni44eiIvPjwvc3ZnPg==");
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-size: contain;
    mask-size: contain;
    filter: drop-shadow(0 4px 7px rgba(0, 0, 0, 0.36));
    transform-origin: 50% 50%;
    transition: transform 130ms ease;
}

.sang-booking-handoff-helper.is-flipped .sang-booking-handoff-helper__pointer {
    transform: rotate(180deg);
}

.sang-booking-handoff-helper.is-pressing .sang-booking-handoff-helper__pointer {
    transform: translateY(2px) scale(0.98);
}

.sang-booking-handoff-helper.is-flipped.is-pressing .sang-booking-handoff-helper__pointer {
    transform: rotate(180deg) translateY(2px) scale(0.98);
}

.sang-booking-handoff-helper__label {
    position: absolute;
    left: 50%;
    top: calc(100% + 8px);
    right: auto;
    bottom: auto;
    width: max-content;
    max-width: min(190px, calc(100vw - 24px));
    padding: 6px 9px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.88);
    color: #fff;
    box-shadow: 0 9px 24px -14px rgba(0, 0, 0, 0.72);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.01em;
    text-align: center;
    white-space: normal;
    transform: translateX(calc(-50% + var(--sang-helper-label-shift-x))) translateY(var(--sang-helper-label-shift-y));
}

.sang-booking-handoff-helper.is-label-above .sang-booking-handoff-helper__label {
    top: auto;
    right: auto;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(calc(-50% + var(--sang-helper-label-shift-x))) translateY(var(--sang-helper-label-shift-y));
}

.sang-booking-handoff-helper.is-label-right .sang-booking-handoff-helper__label {
    top: 50%;
    right: auto;
    bottom: auto;
    left: calc(100% + 8px);
    transform: translateX(var(--sang-helper-label-shift-x)) translateY(calc(-50% + var(--sang-helper-label-shift-y)));
}

.sang-booking-handoff-helper.is-label-left .sang-booking-handoff-helper__label {
    top: 50%;
    right: calc(100% + 8px);
    bottom: auto;
    left: auto;
    transform: translateX(var(--sang-helper-label-shift-x)) translateY(calc(-50% + var(--sang-helper-label-shift-y)));
}

.sang-booking-handoff-ripple {
    position: fixed;
    left: 0;
    top: 0;
    width: 14px;
    height: 14px;
    z-index: 1000002;
    pointer-events: none;
    box-sizing: border-box;
    border: 2px solid rgba(255, 255, 255, 0.94);
    border-radius: 999px;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.3);
}

.sang-booking-handoff-ripple.is-active {
    animation: sang-handoff-ripple 520ms ease-out both;
}

.sang-booking-modal .sang-handoff-action-area,
.sang-booking-modal .sang-handoff-action {
    box-sizing: border-box;
}

.sang-booking-modal .sang-handoff-action-area {
    max-width: 100%;
}

.sang-booking-modal .sang-handoff-action {
    --sang-handoff-ring: rgba(100, 116, 139, 0.24);
    --sang-handoff-shadow: rgba(15, 23, 42, 0.24);
    position: relative;
    min-width: 0;
    max-width: 100%;
    transform-origin: center;
    scale: 1;
    will-change: auto;
}

.sang-booking-modal .sang-handoff-action--whatsapp {
    --sang-handoff-ring: rgba(37, 211, 102, 0.30);
    --sang-handoff-shadow: rgba(22, 163, 74, 0.34);
}

.sang-booking-modal .sang-handoff-action--email {
    --sang-handoff-ring: rgba(71, 85, 105, 0.28);
    --sang-handoff-shadow: rgba(15, 23, 42, 0.32);
}

.sang-booking-modal.is-handoff-active .sang-handoff-action {
    scale: 1;
    will-change: transform, box-shadow, scale;
    transition:
        transform 150ms ease,
        box-shadow 150ms ease,
        scale 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

.sang-booking-modal.is-handoff-active .sang-handoff-action--whatsapp {
    animation: sang-handoff-attention 4s ease-in-out 0s infinite;
}

.sang-booking-modal.is-handoff-active .sang-handoff-action--email {
    animation: sang-handoff-attention 4s ease-in-out 2s infinite;
}

.sang-booking-modal.is-handoff-active .sang-handoff-action:hover,
.sang-booking-modal.is-handoff-active .sang-handoff-action:focus-visible {
    animation-play-state: paused;
    transform: translateY(-1px) scale(1.01);
    box-shadow:
        0 0 0 3px var(--sang-handoff-ring),
        0 16px 32px -20px var(--sang-handoff-shadow);
}

.sang-booking-modal.is-handoff-active .sang-handoff-action.is-helper-press {
    scale: 0.978;
    transition-duration: 150ms, 150ms, 130ms;
    transition-timing-function:
        ease,
        ease,
        cubic-bezier(0.2, 0.8, 0.2, 1);
}

.sang-booking-modal.is-handoff-active .sang-handoff-action:focus-visible {
    outline: 3px solid #0f172a;
    outline-offset: 3px;
}

.sang-booking-exit-confirmation {
    position: absolute;
    inset: 0;
    z-index: 80;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: max(20px, env(safe-area-inset-top)) max(18px, env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left));
    box-sizing: border-box;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition:
        opacity 180ms ease,
        visibility 0s linear 180ms;
}

.sang-booking-exit-confirmation.is-active {
    pointer-events: auto;
    opacity: 1;
    visibility: visible;
    transition:
        opacity 180ms ease,
        visibility 0s linear 0s;
}

.sang-booking-exit-confirmation__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.48);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.sang-booking-exit-confirmation__panel {
    position: relative;
    width: min(420px, 100%);
    max-height: 100%;
    overflow: auto;
    overscroll-behavior: contain;
    padding: 24px;
    box-sizing: border-box;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 1.15rem;
    background: rgba(255, 255, 255, 0.985);
    box-shadow: 0 28px 70px -32px rgba(15, 23, 42, 0.7);
    color: #0f172a;
    text-align: center;
    transform: translateY(8px) scale(0.985);
    opacity: 0;
    transition:
        transform 200ms cubic-bezier(0.22, 1, 0.36, 1),
        opacity 180ms ease;
}

.sang-booking-exit-confirmation.is-active .sang-booking-exit-confirmation__panel {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.sang-booking-exit-confirmation__mark {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    margin: 0 auto 12px;
    border-radius: 999px;
    background: rgba(166, 93, 70, 0.10);
    border: 1px solid rgba(166, 93, 70, 0.30);
    color: var(--theme-color, #A65D46);
    font-size: 17px;
    font-weight: 800;
    line-height: 1;
}

.sang-booking-exit-confirmation__eyebrow {
    margin: 0 0 7px;
    color: var(--theme-color, #A65D46);
    font-size: 10px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.sang-booking-exit-confirmation__title {
    margin: 0;
    color: #0f172a;
    font-family: inherit;
    font-size: clamp(20px, 4vw, 25px);
    font-weight: 700;
    line-height: 1.16;
    letter-spacing: -0.025em;
}

.sang-booking-exit-confirmation__description {
    max-width: 350px;
    margin: 11px auto 0;
    color: #64748b;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.55;
}

.sang-booking-exit-confirmation__actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 10px;
    margin-top: 20px;
}

.sang-booking-exit-confirmation__continue,
.sang-booking-exit-confirmation__leave {
    min-height: 44px;
    padding: 11px 14px;
    border-radius: 0.8rem;
    font-family: inherit;
    font-size: 12px;
    font-weight: 750;
    line-height: 1.2;
    cursor: pointer;
    transition:
        transform 140ms ease,
        box-shadow 160ms ease,
        background-color 160ms ease,
        border-color 160ms ease;
}

.sang-booking-exit-confirmation__continue {
    border: 1px solid var(--theme-color, #A65D46);
    background: var(--theme-color, #A65D46);
    color: #fff;
    box-shadow: 0 12px 24px -17px rgba(166, 93, 70, 0.30);
}

.sang-booking-exit-confirmation__leave {
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #334155;
}

.sang-booking-exit-confirmation__continue:hover,
.sang-booking-exit-confirmation__leave:hover {
    transform: translateY(-1px);
}

.sang-booking-exit-confirmation__leave:hover {
    border-color: #94a3b8;
    background: #f8fafc;
}

.sang-booking-exit-confirmation__continue:focus-visible,
.sang-booking-exit-confirmation__leave:focus-visible {
    outline: 3px solid rgba(15, 23, 42, 0.9);
    outline-offset: 3px;
}

@keyframes sang-handoff-guidance-cycle {
    0% {
        opacity: 0;
        transform: translateY(26%);
    }
    7% {
        opacity: 1;
        transform: translateY(0);
    }
    43% {
        opacity: 1;
        transform: translateY(0);
    }
    50% {
        opacity: 0;
        transform: translateY(-26%);
    }
    100% {
        opacity: 0;
        transform: translateY(-26%);
    }
}

@keyframes sang-handoff-attention {
    0%, 38%, 100% {
        transform: translateY(0) scale(1);
        box-shadow: 0 14px 28px -22px var(--sang-handoff-shadow);
    }
    10%, 24% {
        transform: translateY(-1px) scale(1.015);
        box-shadow:
            0 0 0 3px var(--sang-handoff-ring),
            0 18px 34px -20px var(--sang-handoff-shadow);
    }
}

@keyframes sang-handoff-ripple {
    0% {
        opacity: 0.88;
        transform: translate(-50%, -50%) scale(0.3);
    }
    65% {
        opacity: 0.38;
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(4.5);
    }
}

@media (max-width: 520px) {
    .sang-booking-handoff-guidance {
        height: 52px;
    }

    .sang-booking-handoff-guidance__message {
        gap: 3px;
    }

    .sang-booking-handoff-guidance__heading {
        font-size: clamp(10.75px, 3.35vw, 12px);
    }

    .sang-booking-handoff-guidance__secondary {
        font-size: clamp(9.25px, 2.9vw, 10.25px);
        letter-spacing: -0.01em;
    }

    .sang-booking-exit-confirmation {
        align-items: flex-end;
        padding-top: max(16px, env(safe-area-inset-top));
        padding-right: max(14px, env(safe-area-inset-right));
        padding-bottom: max(16px, env(safe-area-inset-bottom));
        padding-left: max(14px, env(safe-area-inset-left));
    }

    .sang-booking-exit-confirmation__panel {
        width: 100%;
        padding: 21px 18px 18px;
        border-radius: 1rem;
    }

    .sang-booking-exit-confirmation__actions {
        grid-template-columns: minmax(0, 1fr);
    }

    .sang-booking-exit-confirmation__continue,
    .sang-booking-exit-confirmation__leave {
        min-height: 48px;
    }

    .sang-booking-modal.is-handoff-active .sang-handoff-action-area {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 0.65rem !important;
        width: 100%;
    }

    .sang-booking-modal.is-handoff-active .sang-handoff-action {
        width: 100% !important;
        max-width: 100%;
        min-height: 48px;
        white-space: normal;
    }

    .sang-booking-handoff-helper__label {
        max-width: min(172px, calc(100vw - 20px));
        font-size: 10.5px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .sang-booking-exit-confirmation,
    .sang-booking-exit-confirmation__panel,
    .sang-booking-exit-confirmation__continue,
    .sang-booking-exit-confirmation__leave {
        transition: none !important;
    }

    .sang-booking-exit-confirmation__panel {
        transform: none !important;
    }

    .sang-booking-handoff-guidance__message {
        animation: none !important;
        opacity: 0;
        transform: none;
        will-change: auto;
    }

    .sang-booking-handoff-guidance__message--a {
        opacity: 1;
    }

    .sang-booking-handoff-guidance__message--b {
        display: none;
    }

    .sang-booking-modal.is-handoff-active .sang-handoff-action {
        animation: none !important;
        transition: none !important;
        scale: 1 !important;
        will-change: auto;
    }

    .sang-booking-modal.is-handoff-active .sang-handoff-action.is-helper-press {
        scale: 1 !important;
    }

    .sang-booking-handoff-helper,
    .sang-booking-handoff-helper.is-travelling,
    .sang-booking-handoff-helper__pointer {
        transition: none !important;
    }

    .sang-booking-handoff-ripple {
        display: none !important;
        animation: none !important;
    }
}
