/* =========================================================
   DZ HEADER LANGUAGE DROPDOWN LAYER FIX V4.1.8
   Fixes top-header language/currency dropdown rendering
   behind the logo/search/navbar sticky block.
   ========================================================= */

@media (min-width: 1200px) {
    /*
     * V4.1.5 intentionally leaves header-top non-sticky, but gave it z-index:1.
     * The following sticky logo/search/navbar wrapper is z-index:1035.
     * Lift the NON-STICKY top strip above that sibling stacking context without
     * changing its position or sticky behavior.
     */
    .header .header-top {
        position: relative !important;
        top: auto !important;
        z-index: 1045 !important;
        overflow: visible !important;
        isolation: auto !important;
    }

    .header .header-top > .container,
    .header .header-top > .container > .d-flex,
    .header .header-top ul.nav,
    .header .header-top ul.nav > li,
    .header .header-top .language-dropdown {
        overflow: visible !important;
    }

    .header .header-top .language-dropdown {
        position: relative !important;
        z-index: 1050 !important;
    }

    /*
     * Applies to both the language selector and the adjacent currency selector,
     * because both use the same top-strip dropdown structure.
     */
    .header .header-top .language-dropdown .dropdown-menu,
    .header .header-top .language-dropdown .dropdown-menu.show {
        z-index: 5000 !important;
    }

    /* Keep RTL Arabic dropdown aligned to the logical right side. */
    html[dir="rtl"] .header .header-top .language-dropdown .dropdown-menu,
    html[lang="ar"] .header .header-top .language-dropdown .dropdown-menu,
    html[lang^="ar-"] .header .header-top .language-dropdown .dropdown-menu {
        inset-inline-start: auto !important;
        inset-inline-end: 0 !important;
    }
}
