/* Header overrides: one line desktop menu, language dropdown, mobile drawer.
   Loaded after the theme sheets so these rules win the cascade. */

/* ---------------------------------------------------------------- desktop */

#pxl-header-elementor .pxl-header-elementor-main .e-con-full.pars-header-after,
#pxl-header-elementor .pxl-header-elementor-sticky .e-con-full.pars-header-after {
    --flex-wrap: nowrap;
    --padding-left: 18px;
    --padding-right: 18px;
    flex-wrap: nowrap;
}

#pxl-header-elementor .pxl-logo img {
    max-height: 52px;
}

#pxl-header-elementor .alqaed-widget-pxl_logo > .alqaed-widget-container {
    margin: 0 22px 0 0 !important;
}

#pxl-header-elementor .pxl-nav-menu .pxl-menu-primary {
    white-space: nowrap;
}

#pxl-header-elementor .pxl-nav-menu .pxl-menu-primary > li {
    margin: 0 8px !important;
}

#pxl-header-elementor .pxl-nav-menu .pxl-menu-primary > li > a {
    font-size: 14px !important;
    line-height: 66px !important;
    letter-spacing: 0;
}

#pxl-header-elementor .pxl-menu-primary .site-menu-caret {
    font-size: 9px;
    margin-left: 7px;
    opacity: .7;
}

#pxl-header-elementor .pxl-button > .btn {
    font-size: 13px !important;
    line-height: 32px !important;
    padding: 0 16px !important;
    white-space: nowrap;
}

#pxl-header-elementor .pxl-button > .btn .pxl--btn-text {
    font-size: inherit;
    white-space: nowrap;
}

@media screen and (max-width: 1400px) {
    #pxl-header-elementor .pxl-nav-menu .pxl-menu-primary > li {
        margin: 0 6px !important;
    }

    #pxl-header-elementor .pxl-nav-menu .pxl-menu-primary > li > a {
        font-size: 13px !important;
    }

    #pxl-header-elementor .alqaed-widget-pxl_logo > .alqaed-widget-container {
        margin: 0 14px 0 0 !important;
    }

    #pxl-header-elementor .pxl-button > .btn {
        padding: 0 13px !important;
    }
}

/* -------------------------------------------------------------- dropdowns */

.product-menu {
    position: relative;
}

.product-menu .dropdown-menu {
    display: block;
    opacity: 0;
    visibility: hidden;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    margin: 0;
    background-color: #fff;
    border: 0;
    border-radius: 8px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, .1);
    padding: 10px 0;
    z-index: 1001;
    transform: translateY(10px);
    transition: all .3s ease;
    pointer-events: none;
}

.product-menu:hover .dropdown-menu,
.product-menu:focus-within .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

/* the last menu item sits at the edge of the header, so drop its list inwards */
.pxl-menu-primary > li:last-child .dropdown-menu {
    left: auto;
    right: 0;
}

.product-menu .dropdown-menu li {
    list-style: none;
}

.product-menu .dropdown-menu li a {
    display: block;
    padding: 10px 20px;
    color: #0c0b0b !important;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: background .2s ease;
}

.product-menu .dropdown-menu li a:hover {
    background-color: #f5f5f5;
}

/* --------------------------------------------------------- language menu */

.site-lang {
    position: relative;
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    margin-left: 10px;
}

/* the elementor kit styles every <button>, so these need to shout a little */
.site-lang .site-lang-toggle {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    width: auto !important;
    height: 39px !important;
    min-height: 0 !important;
    padding: 0 10px !important;
    background: #ffc300 !important;
    border: 0 !important;
    border-radius: 999px !important;
    box-shadow: none !important;
    color: #111 !important;
    font-family: inherit;
    font-size: 14px !important;
    font-weight: 600 !important;
    /* FONT-WEIGHT: 600; */
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background .2s ease;
}

.site-lang .site-lang-toggle:hover,
.site-lang .site-lang-toggle:focus,
.site-lang.is-open .site-lang-toggle {
    background: #eab000 !important;
    color: #111 !important;
}

.site-lang-caret {
    font-size: 8px;
    opacity: .7;
    transition: transform .2s ease;
}

.site-lang.is-open .site-lang-caret {
    transform: rotate(180deg);
}

.site-lang-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 138px;
    margin: 0;
    padding: 6px;
    list-style: none;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, .06);
    border-radius: 10px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, .12);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(6px);
    transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
    z-index: 1002;
}

.site-lang.is-open .site-lang-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.site-lang-menu li {
    list-style: none;
}

.site-lang-menu a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    border-radius: 7px;
    background: transparent;
    color: #1b1b1b !important;
    font-size: 12.5px;
    font-weight: 600;
    white-space: nowrap;
    text-decoration: none !important;
    transition: background .15s ease;
}

.site-lang-menu a:hover,
.site-lang-menu a:focus {
    background: #ffc300 !important;
    color: #111 !important;
}

.site-lang-menu a.is-active {
    background: #fff4d1;
}

.site-lang-menu .site-lang-code {
    min-width: 20px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .06em;
    opacity: .5;
}

.site-lang-menu a:hover .site-lang-code,
.site-lang-menu a.is-active .site-lang-code {
    opacity: .8;
}

/* ----------------------------------------------------------------- mobile */

#pxl-header-mobile .pxl-header-branding {
    max-width: calc(100% - 120px);
}

#pxl-header-mobile .pxl-header-branding span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#pxl-header-mobile .pxl-header-mobile-default {
    position: relative;
}

#pxl-header-mobile .pxl-header-mobile-actions {
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 2;
}

#pxl-header-mobile .pxl-header-mobile-actions #pxl-nav-mobile {
    position: static;
    top: auto;
    right: auto;
    left: auto;
    transform: none;
}

#pxl-header-mobile .site-lang {
    margin: 0;
}

/* a long menu was cut off by the drawer's fixed height */
#pxl-header-mobile .pxl-header-menu-scroll {
    height: 100%;
    max-height: 100vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 42px 24px 40px;
}

#pxl-header-mobile .pxl-logo-mobile {
    margin-bottom: 22px;
}

#pxl-header-mobile .pxl-menu-primary > li {
    display: block;
    margin: 0;
}

#pxl-header-mobile .pxl-menu-primary > li.product-menu > a {
    display: block;
    padding-right: 38px;
}

/* submenus collapse behind their own toggle instead of always showing */
#pxl-header-mobile .product-menu > .dropdown-menu {
    display: none;
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    pointer-events: auto;
    min-width: 0;
    padding: 0 0 8px 14px;
    background: transparent;
    box-shadow: none;
    border-radius: 0;
}

#pxl-header-mobile .product-menu.is-open > .dropdown-menu {
    display: block;
}

#pxl-header-mobile .product-menu > .dropdown-menu li a {
    padding: 8px 0;
    font-weight: 500;
}

#pxl-header-mobile .site-submenu-toggle {
    position: absolute;
    top: 6px;
    right: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    background: rgba(0, 0, 0, .04);
    border: 0;
    border-radius: 4px;
    color: #1b1b1b;
    font-size: 11px;
    cursor: pointer;
    z-index: 2;
}

#pxl-header-mobile .site-submenu-toggle i {
    transition: transform .25s ease;
}

#pxl-header-mobile .product-menu.is-open > .site-submenu-toggle i {
    transform: rotate(180deg);
}
