/* Emergency Cover global announcement banner v1.0.2
   Fixed at the very top, full-width, and kept independent from Elementor.
   Pure CSS only: no JS position calculations, so there is no flicker loop. */

:root {
    --ec-top-banner-height: 42px;
}

html {
    scroll-padding-top: var(--ec-top-banner-height);
}

body {
    padding-top: var(--ec-top-banner-height) !important;
}

.ec-global-top-banner {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    height: var(--ec-top-banner-height) !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #342565 !important;
    border: 0 !important;
    box-shadow: none !important;
    z-index: 9998 !important;
    box-sizing: border-box !important;
    font-family: inherit !important;
    transform: none !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.ec-global-top-banner,
.ec-global-top-banner * {
    box-sizing: border-box !important;
}

.ec-global-top-banner__inner {
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 5vw !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 24px !important;
}

.ec-global-top-banner__text,
.ec-global-top-banner__link {
    margin: 0 !important;
    padding: 0 !important;
    color: #ffffff !important;
    font-size: 13px !important;
    line-height: 1.25 !important;
}

.ec-global-top-banner__text {
    font-weight: 700 !important;
}

.ec-global-top-banner__link {
    flex: 0 0 auto !important;
    font-weight: 500 !important;
    text-decoration: underline !important;
    text-underline-offset: 2px !important;
    white-space: nowrap !important;
}

.ec-global-top-banner__link:hover,
.ec-global-top-banner__link:focus,
.ec-global-top-banner__link:visited {
    color: #ffffff !important;
}

/* Keep Elementor's existing sticky header below the fixed banner.
   This is a static CSS offset only; there is no JavaScript fighting Elementor. */
.elementor-location-header .elementor-sticky--active,
.elementor-location-header.elementor-sticky--active,
[data-elementor-type="header"] .elementor-sticky--active,
[data-elementor-type="header"].elementor-sticky--active,
header.elementor-sticky--active {
    top: var(--ec-top-banner-height) !important;
}

/* WordPress admin bar support while logged in. */
body.admin-bar .ec-global-top-banner {
    top: 32px !important;
}

body.admin-bar .elementor-location-header .elementor-sticky--active,
body.admin-bar .elementor-location-header.elementor-sticky--active,
body.admin-bar [data-elementor-type="header"] .elementor-sticky--active,
body.admin-bar [data-elementor-type="header"].elementor-sticky--active,
body.admin-bar header.elementor-sticky--active {
    top: calc(var(--ec-top-banner-height) + 32px) !important;
}

@media (max-width: 782px) {
    :root {
        --ec-top-banner-height: 46px;
    }

    .ec-global-top-banner__inner {
        padding: 0 18px !important;
        gap: 12px !important;
    }

    .ec-global-top-banner__text,
    .ec-global-top-banner__link {
        font-size: 11px !important;
    }

    body.admin-bar .ec-global-top-banner {
        top: 46px !important;
    }

    body.admin-bar .elementor-location-header .elementor-sticky--active,
    body.admin-bar .elementor-location-header.elementor-sticky--active,
    body.admin-bar [data-elementor-type="header"] .elementor-sticky--active,
    body.admin-bar [data-elementor-type="header"].elementor-sticky--active,
    body.admin-bar header.elementor-sticky--active {
        top: calc(var(--ec-top-banner-height) + 46px) !important;
    }
}

@media (max-width: 480px) {
    :root {
        --ec-top-banner-height: 52px;
    }

    .ec-global-top-banner__inner {
        padding: 0 14px !important;
        gap: 10px !important;
    }

    .ec-global-top-banner__text {
        font-size: 10px !important;
        line-height: 1.2 !important;
    }

    .ec-global-top-banner__link {
        font-size: 10px !important;
    }
}

/* v1.0.8 - exact fix for the minimal My Account header template.
   Diagnostics from staging show this header is Elementor template 3319,
   position:absolute at top:0, so the fixed 42px banner covers its top area.
   Move ONLY this header below the banner. The normal site header is untouched. */
.elementor-location-header.elementor-3319 {
    top: var(--ec-top-banner-height) !important;
}

/* v1.0.10 - keep the announcement below mobile menus and modal/popup overlays.
   The previous near-maximum z-index forced the banner above every overlay. */
