/* ============================================ */
/*  ALERT BAR — fixed above both headers         */
/* ============================================ */
:root {
    --lx-alert-bar-h: 34px;
}

html.lx-alert-bar-dismissed {
    --lx-alert-bar-h: 0px;
}

html.lx-alert-bar-dismissed .lx-alert-bar {
    display: none !important;
}

.lx-alert-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10000002;
    box-sizing: border-box;
    min-height: 34px;
    padding: calc(5px + env(safe-area-inset-top)) 48px 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(90deg, #0a2730 0%, #0f3a40 50%, #0a2730 100%);
    color: #e8f1f2;
    font-size: 13.5px;
    line-height: 1.35;
}

.lx-alert-bar-inner {
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: 1200px;
    min-width: 0;
}

.lx-alert-bar-icon {
    flex: 0 0 auto;
    font-size: 16px;
    line-height: 1;
    color: #5ed3c3;
}

.lx-alert-bar-text {
    margin: 0;
    padding: 0;
    color: inherit;
    font-size: inherit;
    line-height: inherit;
}

.lx-alert-bar-link,
.lx-alert-bar-link:visited {
    margin-left: 6px;
    color: #ffffff;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 2px;
    white-space: nowrap;
}

.lx-alert-bar-link:hover,
.lx-alert-bar-link:focus {
    color: #1e9eb7;
}

.lx-alert-bar-arrow {
    display: inline-block;
    margin-left: 4px;
    transition: transform 0.2s ease;
}

.lx-alert-bar-link:hover .lx-alert-bar-arrow {
    transform: translateX(3px);
}

.lx-alert-bar-close {
    position: absolute;
    top: 50%;
    right: 16px;
    transform: translateY(-50%);
    margin-top: calc(env(safe-area-inset-top) / 2);
    width: 26px;
    height: 26px;
    min-height: 0;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 50%;
    background: transparent;
    box-shadow: none;
    color: rgba(255, 255, 255, 0.75);
    font-size: 12px;
    line-height: 1;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    transition: background 0.2s ease, color 0.2s ease;
}

.lx-alert-bar-close:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}

.lx-alert-bar-close:focus-visible {
    outline: 2px solid #5ed3c3;
    outline-offset: 2px;
}

/* ---- Push the page and both headers down by the bar height ---- */
#wrapper {
    padding-top: var(--lx-alert-bar-h);
}

html .lx-custom-header {
    top: calc(2rem + var(--lx-alert-bar-h));
}

html:not(.lx-alert-bar-dismissed) .lx-custom-header {
    top: calc(1rem + var(--lx-alert-bar-h));
}

html .lx-mobile-header {
    top: var(--lx-alert-bar-h) !important;
}

/* The bar already carries the iOS safe-area padding while it is showing. */
html:not(.lx-alert-bar-dismissed) .lx-mobile-header {
    padding-top: 10px !important;
}

html:not(.lx-alert-bar-dismissed) .lx-mobile-menu {
    padding-top: calc(60px + var(--lx-alert-bar-h));
}

/* ---- Logged-in: sit below the WordPress admin bar ---- */
body.admin-bar .lx-alert-bar {
    top: 32px;
}

html:not(.lx-alert-bar-dismissed) body.admin-bar .lx-custom-header {
    top: calc(32px + 1rem + var(--lx-alert-bar-h));
}

html:not(.lx-alert-bar-dismissed) body.admin-bar .lx-mobile-header {
    top: calc(32px + var(--lx-alert-bar-h)) !important;
}

html:not(.lx-alert-bar-dismissed) body.admin-bar .lx-mobile-menu {
    padding-top: calc(32px + 60px + var(--lx-alert-bar-h));
}

@media screen and (max-width: 782px) {
    body.admin-bar .lx-alert-bar {
        top: 46px;
    }

    html:not(.lx-alert-bar-dismissed) body.admin-bar .lx-mobile-header {
        top: calc(46px + var(--lx-alert-bar-h)) !important;
    }

    html:not(.lx-alert-bar-dismissed) body.admin-bar .lx-mobile-menu {
        padding-top: calc(46px + 60px + var(--lx-alert-bar-h));
    }
}

/* ---- Tablet / phone ---- */
@media (max-width: 1200px) {
    :root {
        --lx-alert-bar-h: 44px;
    }

    html.lx-alert-bar-dismissed {
        --lx-alert-bar-h: 0px;
    }

    .lx-alert-bar {
        padding-left: 40px;
        padding-right: 40px;
        font-size: 12.5px;
    }

    /* Icon flows inline so it sits right before the first word, even when the text wraps. */
    .lx-alert-bar-inner {
        display: block;
        text-align: center;
    }

    .lx-alert-bar-text {
        display: inline;
    }

    .lx-alert-bar-icon {
        display: inline-block;
        margin-right: 6px;
        font-size: 15px;
        vertical-align: -0.15em;
    }

    .lx-alert-bar-close {
        right: 8px;
    }
}
