/*
 * ZendaSoftware — ZS-6O-B4-R2
 *
 * Deliberately CSS-only.
 *
 * No MutationObserver.
 * No timers.
 * No logo src rewriting.
 * No accordion JavaScript.
 * No renderer-tracked DOM modification.
 */


/* =========================================================
 * 1. ACCESS COLLAPSE ROOT FIX
 *
 * B1 has:
 *
 * .zenda-mobile-access-grid {
 *     display: grid !important;
 * }
 *
 * That defeated the ordinary .hidden utility.
 *
 * The hidden state must be authoritative.
 * ========================================================= */

@media (max-width: 1023px) {

    #mobile-panel
    .zenda-mobile-access-grid.hidden {
        display:
            none !important;
    }


    #mobile-panel
    .zenda-mobile-access-grid:not(.hidden) {
        display:
            grid !important;
    }

}


/* =========================================================
 * 2. DETERMINISTIC LOGO VISIBILITY
 *
 * Existing HTML remains untouched:
 *
 * light slot -> logo-dark.png
 * dark slot  -> logo-light.png
 *
 * The site's existing theme contract is based on .dark.
 * Therefore "not .dark" is authoritative light mode.
 * ========================================================= */

html:not(.dark)
img[data-zenda-logo-slot="light"] {
    display:
        block !important;

    opacity:
        1 !important;

    visibility:
        visible !important;

    filter:
        none !important;

    -webkit-filter:
        none !important;

    mix-blend-mode:
        normal !important;
}


html:not(.dark)
img[data-zenda-logo-slot="dark"] {
    display:
        none !important;

    visibility:
        hidden !important;
}


html.dark
img[data-zenda-logo-slot="dark"] {
    display:
        block !important;

    opacity:
        1 !important;

    visibility:
        visible !important;

    filter:
        none !important;

    -webkit-filter:
        none !important;

    mix-blend-mode:
        normal !important;
}


html.dark
img[data-zenda-logo-slot="light"] {
    display:
        none !important;

    visibility:
        hidden !important;
}


/* =========================================================
 * 3. PREMIUM LIGHT MOBILE MENU
 *
 * Dark mode is intentionally not restyled here.
 * ========================================================= */

@media (max-width: 1023px) {

    html:not(.dark)
    #mobile-menu {
        background:
            rgba(241, 244, 252, .86)
            !important;
    }


    html:not(.dark)
    #mobile-backdrop {
        background:
            radial-gradient(
                circle at 88% 3%,
                rgba(99,102,241,.14),
                transparent 30%
            ),
            radial-gradient(
                circle at 7% 94%,
                rgba(14,165,233,.08),
                transparent 34%
            ),
            rgba(238,242,250,.88)
            !important;

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

        backdrop-filter:
            blur(20px);
    }


    html:not(.dark)
    #mobile-panel {
        color:
            #101828 !important;

        background:
            radial-gradient(
                circle at 92% 0%,
                rgba(99,102,241,.095),
                transparent 32%
            ),
            radial-gradient(
                circle at 2% 100%,
                rgba(14,165,233,.055),
                transparent 31%
            ),
            linear-gradient(
                180deg,
                #ffffff 0%,
                #fafaff 39%,
                #f5f7fc 100%
            )
            !important;

        border-color:
            rgba(148,163,184,.20)
            !important;

        box-shadow:
            -18px 0 60px rgba(15,23,42,.10)
            !important;
    }


    html[dir="rtl"]:not(.dark)
    #mobile-panel {
        box-shadow:
            18px 0 60px rgba(15,23,42,.10)
            !important;
    }


    html:not(.dark)
    #mobile-panel::before {
        background:
            radial-gradient(
                circle,
                rgba(99,102,241,.11),
                transparent 70%
            )
            !important;
    }


    html:not(.dark)
    #mobile-panel::after {
        background:
            radial-gradient(
                circle,
                rgba(14,165,233,.075),
                transparent 70%
            )
            !important;
    }


    /* -----------------------------------------------------
     * Top bar
     * ----------------------------------------------------- */

    html:not(.dark)
    #mobile-panel
    .zenda-mobile-topbar {
        background:
            rgba(255,255,255,.96)
            !important;

        border-bottom:
            1px solid rgba(148,163,184,.18)
            !important;

        box-shadow:
            0 1px 0 rgba(255,255,255,.90),
            0 12px 34px rgba(67,56,202,.07)
            !important;

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

        backdrop-filter:
            blur(18px);
    }


    html:not(.dark)
    #mobile-close {
        color:
            #111827 !important;

        border:
            1px solid rgba(100,116,139,.20)
            !important;

        background:
            linear-gradient(
                145deg,
                #ffffff,
                #f3f4ff
            )
            !important;

        box-shadow:
            0 8px 22px rgba(15,23,42,.08),
            inset 0 1px 0 rgba(255,255,255,.92)
            !important;
    }


    html:not(.dark)
    #mobile-close i {
        color:
            #111827 !important;
    }


    /* -----------------------------------------------------
     * Intro card
     * ----------------------------------------------------- */

    html:not(.dark)
    .zenda-mobile-intro {
        border:
            1px solid rgba(129,140,248,.22)
            !important;

        background:
            radial-gradient(
                circle at 100% 0%,
                rgba(99,102,241,.11),
                transparent 48%
            ),
            linear-gradient(
                145deg,
                rgba(255,255,255,.98),
                rgba(247,248,255,.97)
            )
            !important;

        box-shadow:
            0 16px 42px rgba(79,70,229,.07),
            inset 0 1px 0 rgba(255,255,255,.94)
            !important;
    }


    html:not(.dark)
    .zenda-mobile-intro-title {
        color:
            #101828 !important;
    }


    html:not(.dark)
    .zenda-mobile-intro-copy {
        color:
            #667085 !important;
    }


    html:not(.dark)
    .zenda-mobile-intro-icon {
        color:
            #4f46e5 !important;

        background:
            linear-gradient(
                145deg,
                rgba(99,102,241,.14),
                rgba(14,165,233,.075)
            )
            !important;

        border:
            1px solid rgba(99,102,241,.11);
    }


    /* -----------------------------------------------------
     * Accordion section shells
     * ----------------------------------------------------- */

    html:not(.dark)
    #mobile-panel
    .zenda-mobile-section {
        border:
            1px solid rgba(148,163,184,.20)
            !important;

        background:
            rgba(255,255,255,.82)
            !important;

        box-shadow:
            0 10px 30px rgba(15,23,42,.045),
            inset 0 1px 0 rgba(255,255,255,.92)
            !important;
    }


    html:not(.dark)
    #mobile-panel
    .zenda-mobile-section
    > button {
        color:
            #101828 !important;

        background:
            transparent !important;
    }


    html:not(.dark)
    #mobile-panel
    .zenda-mobile-section
    > button
    .font-semibold {
        color:
            #101828 !important;
    }


    html:not(.dark)
    #mobile-panel
    .zenda-mobile-section
    > button
    .acc-chev {
        color:
            #667085 !important;
    }


    html:not(.dark)
    #mobile-panel
    .zenda-mobile-section
    > button
    > span:first-child
    > i {
        color:
            #5b5ce2 !important;

        background:
            rgba(99,102,241,.105)
            !important;

        box-shadow:
            inset 0 0 0 1px rgba(99,102,241,.06);
    }


    html:not(.dark)
    #mobile-panel
    .zenda-mobile-section
    > button:hover,
    html:not(.dark)
    #mobile-panel
    .zenda-mobile-section
    > button:focus-visible {
        background:
            rgba(99,102,241,.055)
            !important;

        outline:
            none;
    }


    html:not(.dark)
    #mobile-panel
    .zenda-mobile-section
    > button[aria-expanded="true"] {
        background:
            linear-gradient(
                90deg,
                rgba(99,102,241,.075),
                rgba(129,140,248,.035)
            )
            !important;

        box-shadow:
            inset 0 -1px 0 rgba(129,140,248,.10);
    }


    /* -----------------------------------------------------
     * Normal accordion links
     * ----------------------------------------------------- */

    html:not(.dark)
    #mobile-panel
    .zenda-mobile-section
    [data-acc-panel]
    > a {
        color:
            #1f2937 !important;

        border-color:
            rgba(148,163,184,.15)
            !important;

        background:
            rgba(255,255,255,.84)
            !important;
    }


    html:not(.dark)
    #mobile-panel
    .zenda-mobile-section
    [data-acc-panel]
    > a:hover,
    html:not(.dark)
    #mobile-panel
    .zenda-mobile-section
    [data-acc-panel]
    > a:focus-visible {
        border-color:
            rgba(99,102,241,.23)
            !important;

        background:
            #ffffff
            !important;

        box-shadow:
            0 8px 22px rgba(79,70,229,.06);

        outline:
            none;
    }


    /* -----------------------------------------------------
     * Access
     * ----------------------------------------------------- */

    html:not(.dark)
    .zenda-mobile-access-section {
        border-color:
            rgba(99,102,241,.27)
            !important;

        background:
            radial-gradient(
                circle at 100% 0%,
                rgba(99,102,241,.075),
                transparent 45%
            ),
            rgba(255,255,255,.88)
            !important;

        box-shadow:
            0 14px 36px rgba(79,70,229,.06),
            inset 0 1px 0 rgba(255,255,255,.94)
            !important;
    }


    html:not(.dark)
    .zenda-mobile-access-item {
        color:
            #101828 !important;

        border:
            1px solid rgba(148,163,184,.15)
            !important;

        background:
            rgba(255,255,255,.90)
            !important;

        box-shadow:
            0 6px 18px rgba(15,23,42,.035);
    }


    html:not(.dark)
    .zenda-mobile-access-item
    .font-semibold {
        color:
            #101828 !important;
    }


    html:not(.dark)
    .zenda-mobile-access-item
    .text-fg-2 {
        color:
            #667085 !important;
    }


    html:not(.dark)
    .zenda-mobile-access-item:hover,
    html:not(.dark)
    .zenda-mobile-access-item:focus-visible {
        border-color:
            rgba(99,102,241,.24)
            !important;

        background:
            #ffffff
            !important;

        box-shadow:
            0 10px 25px rgba(79,70,229,.065);

        outline:
            none;
    }


    /* -----------------------------------------------------
     * Utility / language / theme dock
     * ----------------------------------------------------- */

    html:not(.dark)
    .zenda-mobile-utility {
        border:
            1px solid rgba(148,163,184,.18)
            !important;

        background:
            linear-gradient(
                145deg,
                rgba(255,255,255,.94),
                rgba(247,248,255,.88)
            )
            !important;

        box-shadow:
            0 14px 38px rgba(15,23,42,.05),
            inset 0 1px 0 rgba(255,255,255,.94)
            !important;
    }


    html:not(.dark)
    .zenda-mobile-utility-title {
        color:
            #667085 !important;
    }


    html:not(.dark)
    .zenda-mobile-language,
    html:not(.dark)
    .zenda-mobile-theme-button {
        color:
            #475467 !important;

        border-color:
            rgba(148,163,184,.18)
            !important;

        background:
            rgba(255,255,255,.84)
            !important;
    }


    html:not(.dark)
    .zenda-mobile-language:hover,
    html:not(.dark)
    .zenda-mobile-language:focus-visible,
    html:not(.dark)
    .zenda-mobile-language.is-active,
    html:not(.dark)
    .zenda-mobile-theme-button:hover,
    html:not(.dark)
    .zenda-mobile-theme-button:focus-visible,
    html:not(.dark)
    .zenda-mobile-theme-button.is-active {
        color:
            #101828 !important;

        border-color:
            rgba(99,102,241,.30)
            !important;

        background:
            #ffffff
            !important;

        box-shadow:
            0 7px 20px rgba(79,70,229,.055);

        outline:
            none;
    }


    html:not(.dark)
    .zenda-mobile-support {
        border-color:
            rgba(79,70,229,.22)
            !important;

        box-shadow:
            0 12px 28px rgba(79,70,229,.13)
            !important;
    }

}


/* =========================================================
 * 4. REDUCED MOTION
 * ========================================================= */

@media (prefers-reduced-motion: reduce) {

    .zenda-mobile-section,
    .zenda-mobile-access-item,
    .zenda-mobile-language,
    .zenda-mobile-theme-button {
        transition:
            none !important;
    }

}
