/*
 * VORIK Global Mobile Drawer
 * R01B
 */

@media (max-width: 760px) {

    .vorik-global-mobile-drawer
    .vorik-mobile-drawer__panel {
        width: min(92vw, 430px);
        max-width: 430px;
        height: 100dvh;
        max-height: 100dvh;
        display: flex;
        flex-direction: column;
        overflow: hidden;
        background: #fff;
    }

    .vorik-global-mobile-drawer .vgmd-sticky-head {
        position: relative;
        flex: 0 0 auto;
        background: #fff;
        z-index: 4;
        border-bottom: 1px solid #edf2f7;
    }

    .vorik-global-mobile-drawer
    .vorik-mobile-drawer__header {
        margin-bottom: 0;
        padding-bottom: 10px;
    }

    .vorik-global-mobile-drawer
    .vorik-mobile-drawer__tagline {
        margin: 0;
        padding: 0 30px 18px;
    }

    .vorik-global-mobile-drawer .vgmd-scroll {
        flex: 1 1 auto;
        min-height: 0;
        overflow-y: auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
        padding: 10px 22px 28px;
    }

    .vorik-global-mobile-drawer .vgmd-main {
        display: flex;
        flex-direction: column;
        gap: 3px;
    }

    .vorik-global-mobile-drawer .vgmd-direct,
    .vorik-global-mobile-drawer .vgmd-toggle {
        width: 100%;
        min-height: 54px;
        display: flex;
        align-items: center;
        gap: 14px;
        padding: 10px 12px;
        border: 0;
        border-radius: 14px;
        background: transparent;
        color: #082f63;
        text-decoration: none;
        font: inherit;
        font-size: 16px;
        font-weight: 700;
        line-height: 1.25;
        text-align: left;
        cursor: pointer;
    }

    .vorik-global-mobile-drawer .vgmd-direct:hover,
    .vorik-global-mobile-drawer .vgmd-toggle:hover,
    .vorik-global-mobile-drawer .vgmd-direct:focus-visible,
    .vorik-global-mobile-drawer .vgmd-toggle:focus-visible {
        background: #f2f8ff;
        outline: none;
    }

    .vorik-global-mobile-drawer .vgmd-icon {
        width: 26px;
        min-width: 26px;
        display: inline-flex;
        justify-content: center;
        align-items: center;
        color: #087fe8;
        font-size: 17px;
    }

    .vorik-global-mobile-drawer .vgmd-toggle {
        justify-content: space-between;
    }

    .vorik-global-mobile-drawer .vgmd-toggle-main,
    .vorik-global-mobile-drawer .vgmd-toggle-side {
        display: inline-flex;
        align-items: center;
    }

    .vorik-global-mobile-drawer .vgmd-toggle-main {
        gap: 14px;
    }

    .vorik-global-mobile-drawer .vgmd-toggle-side {
        gap: 9px;
    }

    .vorik-global-mobile-drawer .vgmd-toggle-side small {
        color: #64748b;
        font-size: 12px;
        font-weight: 800;
    }

    .vorik-global-mobile-drawer .vgmd-chevron {
        color: #7d96b3;
        font-size: 12px;
        transition: transform .22s ease;
    }

    .vorik-global-mobile-drawer
    .vgmd-toggle[aria-expanded="true"]
    .vgmd-chevron {
        transform: rotate(90deg);
    }

    .vorik-global-mobile-drawer
    .vgmd-toggle[aria-expanded="true"] {
        background: #f2f8ff;
    }

    .vorik-global-mobile-drawer .vgmd-submenu {
        margin: 2px 0 6px 38px;
        padding: 5px 0 7px 15px;
        border-left: 2px solid #d8e9f8;
    }

    .vorik-global-mobile-drawer
    .vgmd-submenu[hidden] {
        display: none !important;
    }

    .vorik-global-mobile-drawer .vgmd-submenu a {
        min-height: 42px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 8px 10px;
        border-radius: 10px;
        color: #355979;
        text-decoration: none;
        font-size: 14px;
        font-weight: 650;
        line-height: 1.35;
    }

    .vorik-global-mobile-drawer .vgmd-submenu a:hover,
    .vorik-global-mobile-drawer .vgmd-submenu a:focus-visible {
        background: #f6faff;
        color: #087fe8;
        outline: none;
    }

    .vorik-global-mobile-drawer .vgmd-check {
        color: #087fe8;
        font-weight: 900;
        margin-left: 12px;
    }

    .vorik-global-mobile-drawer .vgmd-separator {
        height: 1px;
        background: #dbe6f0;
        margin: 12px 0;
    }

    .vorik-global-mobile-drawer .vgmd-social {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        margin: 18px 0;
    }

    .vorik-global-mobile-drawer .vgmd-social a {
        min-height: 46px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 9px;
        border: 1px solid #dce8f2;
        border-radius: 13px;
        color: #082f63;
        background: #fff;
        text-decoration: none;
        font-size: 14px;
        font-weight: 700;
    }

    .vorik-global-mobile-drawer .vgmd-social i {
        color: #087fe8;
        font-size: 17px;
    }

    .vorik-global-mobile-drawer .vgmd-account {
        margin-top: 0;
        padding-top: 16px;
        border-top: 1px solid #dbe6f0;
    }

    .vorik-global-mobile-drawer .vgmd-copyright {
        padding: 22px 4px 4px;
        text-align: center;
        color: #8294a8;
        font-size: 12px;
        font-weight: 600;
    }
}

@media (max-width: 390px) {

    .vorik-global-mobile-drawer .vgmd-scroll {
        padding-left: 16px;
        padding-right: 16px;
    }

    .vorik-global-mobile-drawer
    .vorik-mobile-drawer__tagline {
        padding-left: 24px;
        padding-right: 24px;
    }

    .vorik-global-mobile-drawer .vgmd-direct,
    .vorik-global-mobile-drawer .vgmd-toggle {
        font-size: 15px;
    }

}

/* =========================================================
   R01D — GLOBAL PUBLIC MOBILE EXPERIENCE
   ========================================================= */

@media (min-width: 761px) {
    .vorik-mobile-header {
        display: none !important;
    }

    .vorik-global-mobile-drawer {
        display: none !important;
    }
}

@media (max-width: 760px) {

    /*
     * Desktop public header is not part of the mobile experience.
     */
    .vorik-header {
        display: none !important;
    }

    /*
     * Modern mobile header is the single mobile navigation entry point.
     */
    .vorik-mobile-header {
        display: flex !important;
    }

    /*
     * The premium desktop footer is intentionally removed on mobile.
     * Navigation, support, partners and legal links live in the drawer.
     */
    .vorik-footer--premium {
        display: none !important;
    }

    /*
     * Avoid legacy bottom navigation appearing on pages that may still
     * contain old markup outside the main public layout.
     */
    .vorik-mobile-bottom-nav {
        display: none !important;
    }
}

/* =========================================================
   R01E — COMPACT MOBILE DRAWER
   Keep primary targets comfortable while making expanded
   accordion content substantially more compact.
   ========================================================= */

@media (max-width: 760px) {

    .vorik-global-mobile-drawer .vgmd-scroll {
        padding-top: 6px;
        padding-bottom: 20px;
    }

    .vorik-global-mobile-drawer .vgmd-main {
        gap: 0;
    }

    /*
     * Main navigation remains comfortable for touch.
     */
    .vorik-global-mobile-drawer .vgmd-direct,
    .vorik-global-mobile-drawer .vgmd-toggle {
        min-height: 50px;
        padding-top: 8px;
        padding-bottom: 8px;
    }

    /*
     * Expanded section becomes intentionally denser.
     */
    .vorik-global-mobile-drawer .vgmd-submenu {
        margin-top: 0;
        margin-bottom: 3px;
        margin-left: 38px;

        padding:
            3px
            0
            4px
            15px;
    }

    .vorik-global-mobile-drawer .vgmd-submenu a {
        min-height: 0;

        padding:
            7px
            10px;

        font-size: 14px;
        font-weight: 650;
        line-height: 1.3;
    }

    /*
     * Small breathing room between submenu entries,
     * without creating the previous tall list.
     */
    .vorik-global-mobile-drawer
    .vgmd-submenu a + a {
        margin-top: 2px;
    }

    .vorik-global-mobile-drawer .vgmd-separator {
        margin-top: 8px;
        margin-bottom: 8px;
    }

    .vorik-global-mobile-drawer .vgmd-social {
        margin-top: 12px;
        margin-bottom: 12px;
    }

    .vorik-global-mobile-drawer .vgmd-account {
        padding-top: 12px;
    }

    .vorik-global-mobile-drawer .vgmd-copyright {
        padding-top: 16px;
    }
}

/* =========================================================
   R01D2 — GLOBAL PUBLIC MOBILE HEADER
   Structural styles extracted from the original mobile home
   component so header-mobile.php works on every public page.
   ========================================================= */

@media (max-width: 760px) {

    .vorik-mobile-header {
        position: fixed !important;
        z-index: 1000;
        top: 0;
        right: 0;
        left: 0;

        width: 100%;
        display: block !important;

        padding-top: env(safe-area-inset-top);

        color: #082b55;
        background: rgba(255, 255, 255, 0.96);

        border-bottom:
            1px solid rgba(8, 43, 85, 0.05);

        box-shadow:
            0 6px 24px rgba(8, 43, 85, 0.04);

        backdrop-filter: blur(18px);
        -webkit-backdrop-filter: blur(18px);
    }


    .vorik-mobile-header__inner {
        width: 100%;
        max-width: 520px;
        height: 84px;

        display: flex;
        align-items: center;
        justify-content: space-between;

        margin: 0 auto;
        padding: 0 24px;
        box-sizing: border-box;
    }


    .vorik-mobile-header__brand {
        display: inline-flex;
        align-items: center;
        gap: 13px;

        color: #082b55;
        text-decoration: none;
    }


    .vorik-mobile-header__mark {
        width: 44px;
        height: 44px;

        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex: 0 0 auto;

        border-radius: 12px;

        color: #082b55;

        background:
            linear-gradient(
                145deg,
                #ffdc36,
                #ffc700
            );

        box-shadow:
            0 8px 18px rgba(255, 199, 0, 0.22),
            inset 0 1px 0 rgba(255, 255, 255, 0.75);

        font-size: 20px;
        font-weight: 900;
        line-height: 1;
    }


    .vorik-mobile-header__name {
        color: #082b55;

        font-size: 23px;
        font-weight: 900;
        line-height: 1;
        letter-spacing: 0.10em;
    }


    .vorik-mobile-header__actions {
        display: flex;
        align-items: center;
        gap: 14px;
    }


    .vorik-mobile-header__languages {
        display: flex;
        align-items: center;
        gap: 7px;

        color: #71839a;

        font-size: 14px;
        font-weight: 800;
        line-height: 1;
    }


    .vorik-mobile-header__languages a {
        color: #082b55;
        text-decoration: none;
    }


    .vorik-mobile-header__languages a.is-active {
        color: #0876dd;
    }


    .vorik-mobile-header__avatar {
        width: 42px;
        height: 42px;

        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex: 0 0 auto;

        border-radius: 50%;

        color: #ffffff;

        background:
            linear-gradient(
                145deg,
                #1786ed,
                #0867c7
            );

        box-shadow:
            0 8px 18px rgba(8, 118, 221, 0.24);

        font-size: 16px;
        font-weight: 850;
        line-height: 1;
        text-decoration: none;
    }


    .vorik-mobile-header__menu {
        width: 42px;
        height: 42px;

        display: inline-flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;

        gap: 5px;
        flex: 0 0 auto;

        padding: 0;
        border: 0;
        border-radius: 10px;

        color: #082b55;
        background: transparent;

        cursor: pointer;
    }


    .vorik-mobile-header__menu span {
        width: 25px;
        height: 3px;

        display: block;

        border-radius: 999px;
        background: currentColor;
    }


    .vorik-mobile-header a:focus-visible,
    .vorik-mobile-header button:focus-visible {
        outline:
            3px solid rgba(8, 118, 221, 0.38);

        outline-offset: 3px;
    }


    /*
     * Global public pages need room for the fixed 84px header.
     *
     * We use body padding rather than modifying each premium
     * page hero independently.
     */
    body:not(.vorik-mobile-home-page) {
        padding-top:
            calc(
                84px
                + env(safe-area-inset-top)
            );
    }
}


/* Compact phones */
@media (max-width: 390px) {

    .vorik-mobile-header__inner {
        height: 76px;

        padding-right: 17px;
        padding-left: 17px;
    }


    .vorik-mobile-header__mark {
        width: 40px;
        height: 40px;
    }


    .vorik-mobile-header__name {
        font-size: 20px;
    }


    .vorik-mobile-header__actions {
        gap: 8px;
    }


    .vorik-mobile-header__languages {
        gap: 5px;

        font-size: 12px;
    }


    body:not(.vorik-mobile-home-page) {
        padding-top:
            calc(
                76px
                + env(safe-area-inset-top)
            );
    }
}


/* Very narrow phones */
@media (max-width: 340px) {

    .vorik-mobile-header__languages {
        display: none;
    }

}

/* =========================================================
   R01D3 — GLOBAL DRAWER RUNTIME STRUCTURE
   Makes the modern drawer operational outside home-mobile.css
   ========================================================= */

@media (max-width: 760px) {

    .vorik-global-mobile-drawer {
        position: fixed;
        inset: 0;
        z-index: 1100;

        display: block;

        pointer-events: none;
        visibility: hidden;
    }

    .vorik-global-mobile-drawer.is-open {
        pointer-events: auto;
        visibility: visible;
    }


    .vorik-global-mobile-drawer
    .vorik-mobile-drawer__backdrop {
        position: absolute;
        inset: 0;

        width: 100%;
        height: 100%;

        padding: 0;
        border: 0;

        opacity: 0;
        background: rgba(5, 25, 48, 0.48);

        backdrop-filter: blur(3px);
        -webkit-backdrop-filter: blur(3px);

        transition: opacity .22s ease;
        cursor: pointer;
    }


    .vorik-global-mobile-drawer.is-open
    .vorik-mobile-drawer__backdrop {
        opacity: 1;
    }


    .vorik-global-mobile-drawer
    .vorik-mobile-drawer__panel {
        position: absolute;
        z-index: 2;

        top: 0;
        right: 0;
        bottom: 0;

        transform: translateX(102%);

        transition:
            transform .24s cubic-bezier(.2, .8, .2, 1);

        box-shadow:
            -20px 0 55px rgba(4, 31, 61, 0.18);
    }


    .vorik-global-mobile-drawer.is-open
    .vorik-mobile-drawer__panel {
        transform: translateX(0);
    }


    body.vorik-mobile-menu-open {
        overflow: hidden;
        touch-action: none;
    }


    .vorik-global-mobile-drawer
    .vorik-mobile-drawer__header {
        display: flex;
        align-items: center;
        justify-content: space-between;

        padding:
            calc(18px + env(safe-area-inset-top))
            28px
            10px;
    }


    .vorik-global-mobile-drawer
    .vorik-mobile-drawer__brand {
        display: inline-flex;
        align-items: center;
        gap: 14px;

        color: #082b55;
        text-decoration: none;

        font-size: 22px;
        font-weight: 900;
        letter-spacing: .11em;
    }


    .vorik-global-mobile-drawer
    .vorik-mobile-drawer__mark {
        width: 53px;
        height: 53px;

        display: inline-flex;
        align-items: center;
        justify-content: center;

        border-radius: 14px;

        color: #082b55;

        background:
            linear-gradient(
                145deg,
                #ffdc36,
                #ffc700
            );

        font-size: 21px;
        font-weight: 900;
        letter-spacing: 0;
    }


    .vorik-global-mobile-drawer
    .vorik-mobile-drawer__close {
        width: 53px;
        height: 53px;

        display: inline-flex;
        align-items: center;
        justify-content: center;

        padding: 0;
        border: 0;
        border-radius: 15px;

        color: #082b55;
        background: #edf6ff;

        font-size: 22px;

        cursor: pointer;
    }


    .vorik-global-mobile-drawer
    .vorik-mobile-drawer__tagline {
        color: #52708f;

        font-size: 16px;
        line-height: 1.4;
    }
}


@media (max-width: 390px) {

    .vorik-global-mobile-drawer
    .vorik-mobile-drawer__header {
        padding-left: 22px;
        padding-right: 22px;
    }

    .vorik-global-mobile-drawer
    .vorik-mobile-drawer__mark,
    .vorik-global-mobile-drawer
    .vorik-mobile-drawer__close {
        width: 48px;
        height: 48px;
    }

}

/* =========================================================
   R01D4 — GLOBAL DRAWER GEOMETRY LOCK
   Prevent page-specific legacy CSS from changing drawer side
   or width.
   ========================================================= */

@media (max-width: 760px) {

    /*
     * Root always covers the entire physical viewport.
     */
    body .vorik-global-mobile-drawer {
        position: fixed !important;

        top: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        left: 0 !important;

        width: 100vw !important;
        height: 100dvh !important;
        max-width: none !important;

        margin: 0 !important;
        padding: 0 !important;

        transform: none !important;
    }


    /*
     * Panel contract:
     * - always attached to RIGHT edge
     * - 92% viewport maximum
     * - maximum desktop-like mobile width of 430px
     */
    body .vorik-global-mobile-drawer
    > .vorik-mobile-drawer__panel {

        position: absolute !important;

        top: 0 !important;
        right: 0 !important;
        bottom: 0 !important;

        left: auto !important;

        width: min(92vw, 430px) !important;
        min-width: 0 !important;
        max-width: 430px !important;

        height: 100dvh !important;
        max-height: 100dvh !important;

        margin: 0 !important;

        transform: translate3d(102%, 0, 0) !important;

        transform-origin: right center !important;
    }


    body .vorik-global-mobile-drawer.is-open
    > .vorik-mobile-drawer__panel {

        transform: translate3d(0, 0, 0) !important;
    }


    /*
     * Backdrop always fills everything left behind the panel.
     */
    body .vorik-global-mobile-drawer
    > .vorik-mobile-drawer__backdrop {

        position: absolute !important;

        inset: 0 !important;

        width: 100vw !important;
        height: 100dvh !important;

        margin: 0 !important;
    }

}


/*
 * Smaller phones should keep a little visible backdrop
 * instead of making the drawer truly full-screen.
 */
@media (max-width: 390px) {

    body .vorik-global-mobile-drawer
    > .vorik-mobile-drawer__panel {

        width: 92vw !important;
        max-width: 92vw !important;
    }

}

/* =========================================================
   MOBILE DOWNLOAD R01B — GLOBAL VISITOR ACQUISITION CTA
   Reuses the visual language of the mobile homepage CTA.
   ========================================================= */

.vorik-global-mobile-download {
    display: none;
}


@media (max-width: 760px) {

    /*
     * Give normal visitor pages enough room so the fixed
     * acquisition bar never hides the last page content.
     */
    body:not(.vorik-mobile-home-page) {
        padding-bottom:
            calc(
                92px
                + env(safe-area-inset-bottom)
            );
    }


    .vorik-global-mobile-download {
        position: fixed;

        z-index: 980;

        right: 9px;
        bottom:
            calc(
                9px
                + env(safe-area-inset-bottom)
            );
        left: 9px;

        display: block;

        max-width: 520px;

        margin-right: auto;
        margin-left: auto;
    }


    .vorik-global-mobile-download__button {
        box-sizing: border-box;

        width: 100%;
        min-height: 72px;

        display: flex;
        align-items: center;

        gap: 13px;

        padding: 10px 16px;

        border:
            1px solid rgba(255,255,255,.24);

        border-radius: 18px;

        color: #ffffff;
        text-decoration: none;

        background:
            linear-gradient(
                135deg,
                #0f4c81 0%,
                #0877d9 100%
            );

        box-shadow:
            0 14px 35px
            rgba(8, 61, 111, .24);
    }


    .vorik-global-mobile-download__icon {
        width: 47px;
        height: 47px;

        display: inline-flex;
        align-items: center;
        justify-content: center;

        flex: 0 0 47px;

        border-radius: 13px;

        color: #0f4c81;
        background: #ffffff;

        font-size: 25px;

        box-shadow:
            0 6px 15px
            rgba(0,0,0,.10);
    }


    .vorik-global-mobile-download__copy {
        min-width: 0;

        display: flex;
        flex: 1;

        flex-direction: column;

        gap: 2px;
    }


    .vorik-global-mobile-download__copy small {
        color:
            rgba(255,255,255,.78);

        font-size: 10px;
        font-weight: 800;

        line-height: 1.15;

        letter-spacing: .07em;
    }


    .vorik-global-mobile-download__copy strong {
        color: #ffffff;

        font-size: 15px;
        font-weight: 850;

        line-height: 1.2;
    }


    .vorik-global-mobile-download__arrow {
        flex: 0 0 auto;

        margin-left: auto;

        color: #ffffff;

        font-size: 16px;
    }


    /*
     * Homepage mobile already owns the original richer
     * Early Access CTA + BottomSheet.
     */
    body.vorik-mobile-home-page
    .vorik-global-mobile-download {
        display: none !important;
    }


    /*
     * Never place acquisition CTA over navigation drawer.
     */
    body.vorik-mobile-menu-open
    .vorik-global-mobile-download {
        opacity: 0;
        pointer-events: none;
    }

}


@media (max-width: 390px) {

    .vorik-global-mobile-download {
        right: 7px;
        bottom:
            calc(
                7px
                + env(safe-area-inset-bottom)
            );
        left: 7px;
    }


    .vorik-global-mobile-download__button {
        min-height: 68px;

        padding: 9px 13px;

        border-radius: 17px;
    }


    .vorik-global-mobile-download__icon {
        width: 44px;
        height: 44px;

        flex-basis: 44px;

        font-size: 23px;
    }

}


/* Desktop must never display the mobile acquisition bar. */
@media (min-width: 761px) {

    .vorik-global-mobile-download {
        display: none !important;
    }

}
