/* APSAIDAL header — responsive tablet/mobile rail.
 * Desktop remains Elementor-authoritative. At tablet/phone widths the long
 * primary navigation is collapsed so the real header controls keep one line.
 */

.aps-header-language-control {
    display: none;
}

@media (max-width: 1024px) {
    /* Keep WPML as URL authority, but use APSAIDAL's compact trigger here. */
    .elementor-location-header:not([data-elementor-id="1107"]) .wpml-ls {
        display: none !important;
    }

    /* Collapse only the direct WPML widget. Never hide an ancestor container,
       because it can also contain the logo or the whole right-hand rail. */
    .elementor-location-header:not([data-elementor-id="1107"]) .elementor-widget:has(> .elementor-widget-container > .wpml-ls) {
        display: none !important;
    }

    header[data-elementor-id="1107"] .wpml-ls,
    header[data-elementor-id="1107"] .elementor-widget:has(> .elementor-widget-container > .wpml-ls) {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    /* The desktop taxonomy/navigation row is the source of the overlap visible
       on iPad/iPhone. JS marks that exact widget instead of relying on a brittle
       Elementor-generated id. */
    .elementor-location-header .aps-header-primary-nav,
    .elementor-location-header .aps-header-primary-nav-slot {
        display: none !important;
    }

    .elementor-location-header .aps-mobile-header-row {
        display: flex !important;
        align-items: center !important;
        flex-wrap: nowrap !important;
        column-gap: 12px !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow: visible !important;
    }

    .elementor-location-header .aps-mobile-header-row > * {
        min-width: 0;
    }

    .elementor-location-header .aps-header-search-direct,
    .elementor-location-header .elementor-element-3346eddd,
    .elementor-location-header .elementor-element-dbe6c62 {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 30px !important;
        min-width: 30px !important;
        max-width: 30px !important;
        flex: 0 0 30px !important;
        margin: 0 !important;
        transform: none !important;
    }

    .elementor-location-header .aps-header-language-control {
        position: relative;
        display: flex !important;
        align-items: center;
        flex: 0 0 auto !important;
        width: auto !important;
        min-width: 34px;
        margin: 0 !important;
        z-index: 100030;
    }

    .aps-header-language-control__trigger {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 3px;
        min-width: 34px;
        padding: 7px 2px !important;
        border: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
        color: #202020 !important;
        font: inherit;
        font-size: 13px;
        font-weight: 500;
        line-height: 1;
        white-space: nowrap;
        cursor: pointer;
    }

    .aps-header-language-control__chevron {
        position: relative;
        top: -1px;
        font-size: 12px;
        line-height: 1;
    }

    .aps-header-language-control__fallback {
        position: absolute;
        top: calc(100% + 9px);
        left: 50%;
        min-width: 56px;
        transform: translateX(-50%);
        padding: 7px 0;
        border: 1px solid rgba(0,0,0,.12);
        background: rgba(17,17,17,.94);
        box-shadow: 0 14px 34px rgba(0,0,0,.18);
    }

    .aps-header-language-control__fallback[hidden] {
        display: none !important;
    }

    .aps-header-language-control__fallback a {
        display: block;
        padding: 8px 12px;
        color: #fff !important;
        font-size: 12px;
        line-height: 1;
        text-align: center;
        text-decoration: none !important;
        white-space: nowrap;
    }

    .aps-header-language-control__fallback a.is-current {
        color: #e3606d !important;
        font-weight: 700;
    }

    .elementor-location-header .aps-header-login-link,
    .elementor-location-header .aps-header-register-link,
    .elementor-location-header a[href*="login" i],
    .elementor-location-header a[href*="log-in" i],
    .elementor-location-header a[href*="signin" i],
    .elementor-location-header a[href*="sign-in" i],
    .elementor-location-header a[href*="register" i] {
        white-space: nowrap !important;
        word-break: keep-all !important;
    }

    .elementor-location-header .aps-header-login-widget,
    .elementor-location-header .aps-header-register-widget,
    .elementor-location-header .aps-header-login-slot,
    .elementor-location-header .aps-header-register-slot {
        width: auto !important;
        min-width: max-content !important;
        max-width: none !important;
        flex: 0 0 auto !important;
    }

    .elementor-location-header .aps-mobile-header-logo,
    .elementor-location-header .aps-mobile-header-logo-slot {
        width: 170px !important;
        min-width: 90px !important;
        max-width: 170px !important;
        flex: 0 1 170px !important;
    }

    .elementor-location-header .aps-mobile-header-logo-slot {
        margin-right: auto !important;
    }

    .elementor-location-header .aps-mobile-header-logo img {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
    }
}

@media (max-width: 767px) {
    .elementor-location-header .aps-mobile-header-row {
        column-gap: 8px !important;
    }

    .elementor-location-header .aps-mobile-header-logo,
    .elementor-location-header .aps-mobile-header-logo-slot {
        width: 126px !important;
        max-width: 126px !important;
        flex-basis: 126px !important;
    }

    .elementor-location-header .aps-header-search-direct,
    .elementor-location-header .elementor-element-3346eddd,
    .elementor-location-header .elementor-element-dbe6c62 {
        width: 26px !important;
        min-width: 26px !important;
        max-width: 26px !important;
        flex-basis: 26px !important;
    }

    .elementor-location-header .aps-header-login-link,
    .elementor-location-header .aps-header-register-link {
        font-size: 13px !important;
    }
}

@media (max-width: 390px) {
    .elementor-location-header .aps-mobile-header-row {
        column-gap: 6px !important;
    }

    .elementor-location-header .aps-mobile-header-logo,
    .elementor-location-header .aps-mobile-header-logo-slot {
        width: 104px !important;
        min-width: 74px !important;
        max-width: 104px !important;
        flex-basis: 104px !important;
    }

    .elementor-location-header .aps-header-search-direct,
    .elementor-location-header .elementor-element-3346eddd,
    .elementor-location-header .elementor-element-dbe6c62 {
        width: 24px !important;
        min-width: 24px !important;
        max-width: 24px !important;
        flex-basis: 24px !important;
        margin: 0 !important;
    }

    .aps-header-language-control__trigger {
        min-width: 30px;
        padding-left: 0 !important;
        padding-right: 0 !important;
        font-size: 12px;
    }

    .elementor-location-header .aps-header-login-link,
    .elementor-location-header .aps-header-register-link {
        font-size: 12px !important;
    }
}

@media (max-width: 340px) {
    .elementor-location-header .aps-mobile-header-row {
        column-gap: 4px !important;
    }

    .elementor-location-header .aps-mobile-header-logo,
    .elementor-location-header .aps-mobile-header-logo-slot {
        width: 90px !important;
        max-width: 90px !important;
        flex-basis: 90px !important;
    }

    .aps-header-language-control__trigger {
        min-width: 28px;
        font-size: 11px;
    }

    .elementor-location-header .aps-header-login-link,
    .elementor-location-header .aps-header-register-link {
        font-size: 11px !important;
    }
}

/* WordPress admin toolbar compatibility.
 * The Elementor header may be sticky/fixed, but it must never cover wp-admin's
 * frontend toolbar for logged-in editors/admins.
 */
#wpadminbar{
    z-index:100200 !important;
    visibility:visible !important;
    opacity:1 !important;
}
body.admin-bar .elementor-location-header,
body.admin-bar .elementor-location-header .elementor-sticky--active{
    /* JS measures the toolbar that is actually visible. This prevents iPhone
       from reserving a ghost strip when WordPress keeps the admin-bar body
       class but the mobile toolbar is hidden/collapsed. */
    top:var(--aps-header-admin-offset, var(--wp-admin--admin-bar--height,32px)) !important;
}

@media (max-width:1024px){
    body:not(.admin-bar) .elementor-location-header,
    body:not(.admin-bar) .elementor-location-header .elementor-sticky--active{
        top:0 !important;
    }
}


/* APSAIDAL header — compact sticky responsive closeout 2026-09-21 */
/* Elementor can preserve the desktop wrapper height after the controls have been
 * compacted. The JS hook above marks the exact shell so the sticky header uses
 * only the height its mobile controls need. */
@media (max-width:1024px){
    .elementor-location-header,
    .elementor-location-header .elementor-sticky--active{
        min-height:0 !important;
        height:auto !important;
    }

    .elementor-location-header .elementor-sticky--active{
        padding-top:0 !important;
        padding-bottom:0 !important;
    }

    .elementor-location-header :is(.e-con,.elementor-section,.elementor-container):has(.aps-mobile-header-row),
    .elementor-location-header :is(.e-con,.elementor-section,.elementor-container):has(.aps-mobile-header-row) > :is(.e-con,.elementor-container){
        min-height:0 !important;
        height:auto !important;
        margin-top:0 !important;
        margin-bottom:0 !important;
        padding-top:0 !important;
        padding-bottom:0 !important;
    }

    .elementor-location-header .aps-mobile-header-shell,
    .elementor-location-header .aps-mobile-header-shell-parent{
        min-height:0 !important;
        height:auto !important;
        margin-top:0 !important;
        margin-bottom:0 !important;
        padding-top:0 !important;
        padding-bottom:0 !important;
    }

    .elementor-location-header .aps-mobile-header-row{
        min-height:84px !important;
        height:84px !important;
        padding:0 24px !important;
        margin:0 !important;
        background:#fff !important;
    }

    .elementor-location-header .aps-mobile-header-row > *,
    .elementor-location-header .aps-mobile-header-row .elementor-widget{
        margin-top:0 !important;
        margin-bottom:0 !important;
    }

    .elementor-location-header .elementor-sticky--active{
        background:#fff !important;
        border-bottom:1px solid rgba(31,34,38,.10) !important;
        box-shadow:none !important;
    }

    .elementor-location-header .elementor-sticky--active .aps-mobile-header-row{
        min-height:78px !important;
        height:78px !important;
    }
}

@media (max-width:767px){
    .elementor-location-header .aps-mobile-header-row{
        min-height:66px !important;
        height:66px !important;
        padding:0 14px !important;
        column-gap:7px !important;
    }

    .elementor-location-header .elementor-sticky--active .aps-mobile-header-row{
        min-height:62px !important;
        height:62px !important;
    }

    .elementor-location-header .aps-mobile-header-logo,
    .elementor-location-header .aps-mobile-header-logo-slot{
        width:118px !important;
        max-width:118px !important;
        flex-basis:118px !important;
    }

    .elementor-location-header .elementor-element-3346eddd{
        width:24px !important;
        min-width:24px !important;
        max-width:24px !important;
        flex-basis:24px !important;
    }

    .elementor-location-header .aps-header-login-link,
    .elementor-location-header .aps-header-register-link{
        font-size:12.5px !important;
        line-height:1 !important;
    }
}

@media (max-width:390px){
    .elementor-location-header .aps-mobile-header-row{
        min-height:64px !important;
        height:64px !important;
        padding:0 12px !important;
        column-gap:6px !important;
    }

    .elementor-location-header .elementor-sticky--active .aps-mobile-header-row{
        min-height:60px !important;
        height:60px !important;
    }

    .elementor-location-header .aps-mobile-header-logo,
    .elementor-location-header .aps-mobile-header-logo-slot{
        width:102px !important;
        max-width:102px !important;
        flex-basis:102px !important;
    }

    .aps-header-language-control__trigger{
        min-width:28px !important;
        font-size:12px !important;
    }

    .elementor-location-header .aps-header-login-link,
    .elementor-location-header .aps-header-register-link{
        font-size:12px !important;
    }
}
