/*
 * Announcement banner above the header, in both designs, until dismissed (body.has-banner).
 * The header, left nav and content are fixed/padded for the header alone, so they move down by the banner's height.
 * --header-h is 56px in the new design; the classic layout's header is 50px.
 */

body.has-banner {
    --banner-h: 40px;
}

body.has-banner .site-header {
    top: var(--banner-h);
}

body.has-banner .site-nav-left {
    top: calc(var(--header-h, 50px) + var(--banner-h));
    height: calc(100% - var(--header-h, 50px) - var(--banner-h));
}

body.has-banner .site-content {
    padding-top: calc(var(--header-h, 50px) + var(--banner-h));
}

body.has-banner .toast-active {
    top: calc(var(--header-h, 50px) + var(--banner-h) + 16px);
}

.site-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 6;
    height: 40px;
    padding: 0 48px 0 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 13px;
    line-height: 1;
    white-space: nowrap;
    background: #eef3f8;
    color: #2a3a4a;
    border-bottom: 1px solid #d5dde6;
}

.site-banner-tag {
    padding: 4px 8px;
    font-size: 11px;
    font-weight: bold;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: #2a5786;
    color: #fff;
}

.site-banner-text {
    overflow: hidden;
    text-overflow: ellipsis;
}

.site-banner a.site-banner-link {
    font-weight: bold;
    color: #075698;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.site-banner-close {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border: 0;
    background: transparent;
    color: inherit;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    opacity: 0.7;
}

.site-banner-close:hover {
    opacity: 1;
}

/* new design: the HUD's black strip with lime signal */
body.ui-theme .site-banner {
    background: #c8f031;
    color: #111;
    border-bottom: 1px solid #111;
    font-family: var(--font-ui);
}

body.ui-theme .site-banner-tag {
    font-family: var(--font-label);
    background: #111;
    color: #c8f031;
    clip-path: polygon(0 0, calc(100% - 6px) 0, 100% 6px, 100% 100%, 0 100%);
}

body.ui-theme .site-banner a.site-banner-link {
    color: #111;
    text-decoration-color: #111;
    text-decoration-thickness: 2px;
}

body.ui-theme .site-banner a.site-banner-link:hover {
    background: #111;
    color: #c8f031;
    text-decoration: none;
    padding: 4px 6px;
    margin: -4px -6px;
}

body.ui-theme .site-banner-close:focus-visible,
body.ui-theme .site-banner a:focus-visible {
    outline: 2px solid #111;
    outline-offset: 2px;
}

@media (max-width: 700px) {
    .site-banner-more {
        display: none;
    }
}

@media (max-width: 520px) {
    .site-banner {
        justify-content: flex-start;
    }

    .site-banner-text {
        display: none;
    }
}
