/* Guest onboarding modal. Every selector stays under #modal.sfd-onboard.
   Tokens come from .bl-storefront on .modalContainer. Buttons reuse .sfd-btn. */

#modal.sfd-onboard {
    overflow: visible;
}

#modal.sfd-onboard .modalBackdrop {
    background: rgba(27, 22, 48, 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

#modal.sfd-onboard .modalContainer {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 1402;
    transform: translate(-50%, -50%);
    box-sizing: border-box;
    width: min(560px, calc(100vw - 24px));
    max-height: calc(100dvh - 24px);
    min-height: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #fff;
    border-radius: 26px;
    direction: rtl;
    text-align: right;
    color: var(--sfd-ink-soft);
    box-shadow: 0 40px 90px -30px rgba(36, 20, 66, 0.65), 0 0 0 1px rgba(101, 53, 201, 0.08);
    animation: obIn 0.38s cubic-bezier(0.2, 0.9, 0.3, 1.15) both;
}

#modal.sfd-onboard .modalContainer *,
#modal.sfd-onboard .modalContainer *::before,
#modal.sfd-onboard .modalContainer *::after {
    box-sizing: border-box;
}

#modal.sfd-onboard .modalTitle {
    position: relative;
    flex: none;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    padding: 22px 26px 22px 70px;
    background: linear-gradient(165deg, #241442, #2E1856 32%, #3C1B63 62%, #26143F);
    color: #fff;
    font-size: 21px;
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -0.2px;
    text-align: right;
}

#modal.sfd-onboard .modalTitle::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(240px 140px at 12% -10%, rgba(229, 71, 154, 0.45), transparent 70%),
        radial-gradient(260px 160px at 95% 130%, rgba(40, 116, 255, 0.35), transparent 70%),
        var(--sfd-grad-accent) bottom / 100% 3px no-repeat;
}

#modal.sfd-onboard .ob-title-ic {
    position: relative;
    z-index: 1;
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 13px;
    background: linear-gradient(135deg, var(--sfd-blue), var(--sfd-purple-bright));
    box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.35), inset 0 -3px 6px rgba(0, 0, 0, 0.18), 0 10px 22px -10px rgba(40, 116, 255, 0.8);
}

#modal.sfd-onboard .ob-title-icn {
    width: 22px;
    height: 22px;
    display: block;
}

#modal.sfd-onboard .modalClose {
    top: 19px;
    left: 20px;
    right: auto;
    z-index: 3;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 0;
    line-height: 0;
    color: transparent;
    background: rgba(255, 255, 255, 0.12);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    transition: background 0.2s, transform 0.25s;
}

#modal.sfd-onboard .modalClose::before,
#modal.sfd-onboard .modalClose::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 2.2px;
    border-radius: 2px;
    background: #fff;
    transform: translate(-50%, -50%) rotate(45deg);
}

#modal.sfd-onboard .modalClose::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

#modal.sfd-onboard .modalClose:hover {
    background: rgba(255, 255, 255, 0.24);
    transform: rotate(90deg);
}

#modal.sfd-onboard .modalInner {
    flex: 1 1 auto;
    min-height: 0;
    max-height: calc(100dvh - 120px);
    overflow-y: auto;
    overscroll-behavior: contain;
    align-items: stretch;
    justify-content: flex-start;
    padding: 24px 26px 22px;
    border-radius: 0;
    background:
        radial-gradient(420px 220px at 100% 0, rgba(153, 72, 245, 0.07), transparent 70%),
        #fff;
    color: var(--sfd-ink-soft);
}

#modal.sfd-onboard .modalWrap {
    width: 100%;
    margin: 0;
    padding: 0;
    background: none;
    font-size: 16.5px;
    line-height: 1.7;
    color: var(--sfd-ink-soft);
}

#modal.sfd-onboard .modalWrap h3 {
    margin: 0 0 16px;
    font-size: 24px;
    font-weight: 800;
    line-height: 1.3;
    letter-spacing: -0.3px;
    color: var(--sfd-ink);
}

#modal.sfd-onboard .videoDiv {
    width: 100%;
    margin: 0 0 18px;
}

#modal.sfd-onboard .player {
    position: relative;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    border: 0;
    border-radius: 18px;
    overflow: hidden;
    cursor: pointer;
    background: #1d1236;
    isolation: isolate;
    box-shadow: 0 22px 44px -26px rgba(64, 42, 120, 0.75), 0 0 0 1px rgba(101, 53, 201, 0.12);
}

#modal.sfd-onboard .player::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background:
        linear-gradient(180deg, rgba(36, 20, 66, 0.05) 30%, rgba(36, 20, 66, 0.55)),
        linear-gradient(120deg, rgba(101, 53, 201, 0.18), transparent 60%);
    transition: opacity 0.3s;
}

#modal.sfd-onboard .player .plcholder {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
    object-fit: cover;
    display: block;
    transition: transform 0.5s;
}

#modal.sfd-onboard .player:hover .plcholder {
    transform: scale(1.04);
}

#modal.sfd-onboard .player iframe {
    position: absolute;
    inset: 0;
    z-index: 3;
    width: 100%;
    height: 100%;
    border: 0;
}

#modal.sfd-onboard .player .playerButton {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 2;
    transform: translate(-50%, -50%);
    width: 76px;
    height: 76px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    background: var(--sfd-grad-accent);
    background-size: 200% 100%;
    box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.4), 0 16px 34px -10px rgba(182, 42, 230, 0.8), 0 0 0 8px rgba(255, 255, 255, 0.18);
    transition: transform 0.25s, background-position 0.5s;
}

#modal.sfd-onboard .player .playerButton img {
    display: none;
    width: 0;
    height: 0;
}

#modal.sfd-onboard .player .playerButton::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 54%;
    transform: translate(-50%, -50%);
    border-style: solid;
    border-width: 13px 0 13px 21px;
    border-color: transparent transparent transparent #fff;
}

#modal.sfd-onboard .player .playerButton::after {
    content: "";
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.55);
    animation: obPulse 2s ease-out infinite;
}

#modal.sfd-onboard .player:hover .playerButton {
    transform: translate(-50%, -50%) scale(1.07);
    background-position: 100% 0;
}

#modal.sfd-onboard .marginTop {
    margin-top: 0;
    font-weight: 600;
    color: var(--sfd-ink);
}

#modal.sfd-onboard .boldText {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 6px 0 4px;
    padding: 3px 12px 3px 14px;
    border-radius: 999px;
    font-weight: 800;
    font-size: 15px;
    line-height: 1.4;
    color: #1E8A5A;
    white-space: normal;
    background: linear-gradient(135deg, rgba(58, 203, 136, 0.14), rgba(37, 201, 230, 0.12));
    box-shadow: inset 0 0 0 1px rgba(58, 203, 136, 0.35);
}

#modal.sfd-onboard .ob-check-badge {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #3ACB88;
}

#modal.sfd-onboard .ob-check-icn {
    width: 11px;
    height: 11px;
    display: block;
}

#modal.sfd-onboard .ob-note {
    margin-top: 12px;
    padding: 12px 16px;
    border-radius: 14px;
    font-size: 15.5px;
    line-height: 1.65;
    color: var(--sfd-ink-soft);
    background: #F7F3FE;
    box-shadow: inset 0 0 0 1px var(--sfd-line-purple);
}

#modal.sfd-onboard .modalButtons {
    display: flex;
    align-items: stretch;
    gap: 12px;
    width: 100%;
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid var(--sfd-line-purple);
}

#modal.sfd-onboard .modalButtons .cancelButton {
    flex: 0 0 auto;
    margin: 0;
    padding: 0;
    background: none;
    border-radius: 0;
    color: inherit;
}

#modal.sfd-onboard .ob-wa-link {
    flex: 1 1 auto;
    display: block;
    min-width: 0;
    text-decoration: none;
}

#modal.sfd-onboard .modalButtons .sfd-btn {
    width: auto;
    min-height: 52px;
    border-radius: 999px;
    font-size: 16.5px;
    padding: 12px 22px;
}

#modal.sfd-onboard .modalButtons .sfd-btn-accent {
    width: 100%;
    box-shadow: 0 14px 30px -12px rgba(229, 71, 154, 0.75), inset 0 1.5px 0 rgba(255, 255, 255, 0.35);
}

#modal.sfd-onboard .modalButtons .sfd-btn-ghost {
    min-width: 120px;
    color: var(--sfd-purple);
    border: 1.5px solid transparent;
    background:
        linear-gradient(#fff, #fff) padding-box,
        linear-gradient(120deg, var(--sfd-purple-bright), var(--sfd-pink), var(--sfd-orange)) border-box;
    box-shadow: none;
}

#modal.sfd-onboard .modalButtons .sfd-btn-ghost:hover {
    background:
        linear-gradient(#F7F3FE, #F7F3FE) padding-box,
        linear-gradient(120deg, var(--sfd-purple-bright), var(--sfd-pink), var(--sfd-orange)) border-box;
}

#modal.sfd-onboard .ob-wa-link .sfd-btn {
    pointer-events: none;
}

#modal.sfd-onboard .ob-wa-link:hover .sfd-btn-accent {
    transform: translateY(-2px);
    background-position: 100% 0;
    box-shadow: 0 18px 34px -12px rgba(229, 71, 154, 0.85), inset 0 1.5px 0 rgba(255, 255, 255, 0.35);
}

#modal.sfd-onboard .ob-wa-link:hover .sfd-btn-accent::after {
    opacity: 1;
    transform: translateX(620%) skewX(-18deg);
    transition: transform 0.75s ease, opacity 0.2s;
}

#modal.sfd-onboard .sfd-btn .icn {
    width: 20px;
    height: 20px;
}

#modal.sfd-onboard .modalClose:focus-visible,
#modal.sfd-onboard .playerButton:focus-visible,
#modal.sfd-onboard .ob-wa-link:focus-visible {
    outline: 3px solid rgba(153, 72, 245, 0.45);
    outline-offset: 3px;
}

@media (min-width: 1280px) {
    #modal.sfd-onboard .modalContainer {
        width: min(560px, calc(100vw - 24px));
    }

    #modal.sfd-onboard .player {
        width: 100%;
        height: auto;
    }

    #modal.sfd-onboard .player .playerButton {
        top: 50%;
        left: 50%;
    }
}

@media (max-width: 560px) {
    #modal.sfd-onboard .modalContainer {
        border-radius: 22px;
    }

    #modal.sfd-onboard .modalTitle {
        padding: 18px 18px 18px 62px;
        font-size: 19px;
        gap: 10px;
    }

    #modal.sfd-onboard .ob-title-ic {
        width: 36px;
        height: 36px;
        border-radius: 11px;
    }

    #modal.sfd-onboard .ob-title-icn {
        width: 19px;
        height: 19px;
    }

    #modal.sfd-onboard .modalClose {
        top: 16px;
        left: 14px;
        width: 36px;
        height: 36px;
    }

    #modal.sfd-onboard .modalInner {
        padding: 18px 16px 16px;
    }

    #modal.sfd-onboard .modalWrap {
        font-size: 15.5px;
    }

    #modal.sfd-onboard .modalWrap h3 {
        font-size: 20.5px;
        margin-bottom: 13px;
    }

    #modal.sfd-onboard .player .playerButton {
        width: 62px;
        height: 62px;
    }

    #modal.sfd-onboard .player .playerButton::before {
        border-width: 11px 0 11px 17px;
    }

    #modal.sfd-onboard .modalButtons {
        flex-direction: column-reverse;
        gap: 10px;
    }

    #modal.sfd-onboard .cancelButton,
    #modal.sfd-onboard .ob-wa-link {
        flex: 1 1 auto;
        width: 100%;
    }

    #modal.sfd-onboard .cancelButton .sfd-btn {
        width: 100%;
        min-height: 46px;
    }
}

@media (prefers-reduced-motion: reduce) {
    #modal.sfd-onboard .modalContainer,
    #modal.sfd-onboard .playerButton::after {
        animation: none;
    }

    #modal.sfd-onboard .player .plcholder,
    #modal.sfd-onboard .player .playerButton,
    #modal.sfd-onboard .modalClose {
        transition: none;
    }
}

@keyframes obIn {
    from {
        opacity: 0;
        transform: translate(-50%, calc(-50% + 18px)) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

@keyframes obPulse {
    from {
        opacity: 0.9;
        transform: scale(0.9);
    }
    to {
        opacity: 0;
        transform: scale(1.35);
    }
}
