/* ==========================================================================
   Continuous Moving Public Warning Banner (Marquee/Ticker)
   Fixed to the top of the viewport on every page, above the main nav.
   The nav bar and page body are pushed down at runtime by warning-banner.js,
   which measures the banner's rendered height and writes it to --pwb-height.
   ========================================================================== */

:root {
    --pwb-height: 0px;
}

/* Push the theme's fixed navbar (assets/css/style.css .fixed-top / .is-sticky)
   below the banner instead of letting it sit underneath at top:0. */
.nav-area.fixed-top,
.nav-area .navbar-area.is-sticky {
    top: var(--pwb-height) !important;
}

/* Shift all normal-flow content down so nothing hides under the fixed
   banner + nav stack. */
body {
    margin-top: var(--pwb-height);
}

.pwb-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1100;
    overflow: hidden;
    display: flex;
    align-items: center;
    background: linear-gradient(90deg, #b91c1c 0%, #d32f2f 50%, #b91c1c 100%);
    border-bottom: 2px solid #7f1010;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.pwb-track {
    display: flex;
    align-items: center;
    width: max-content;
    white-space: nowrap;
    animation: pwb-scroll 48s linear infinite;
}

/* Pause the ticker while the user reads it, via mouse or keyboard focus. */
.pwb-banner:hover .pwb-track,
.pwb-banner:focus-within .pwb-track {
    animation-play-state: paused;
}

.pwb-content {
    display: inline-block;
    padding: 10px 0;
    padding-right: 60px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 14.5px;
    font-weight: 700;
    letter-spacing: 0.2px;
    color: #ffffff;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
}

@keyframes pwb-scroll {
    from {
        transform: translateX(0);
    }
    to {
        /* .pwb-content is duplicated twice in the markup, so -50% is exactly
           one full copy of the text: the loop restarts with no visible seam. */
        transform: translateX(-50%);
    }
}

.pwb-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Respect users who have asked the OS/browser to minimize motion: stop the
   animation and let them read the notice via manual horizontal scroll. */
@media (prefers-reduced-motion: reduce) {
    .pwb-track {
        animation: none;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

@media (max-width: 767.98px) {
    .pwb-content {
        font-size: 12.5px;
        padding: 9px 0;
        padding-right: 40px;
    }

    .pwb-track {
        animation-duration: 33s;
    }
}

@media (max-width: 480px) {
    .pwb-content {
        font-size: 11.5px;
        padding: 8px 0;
        padding-right: 28px;
    }

    .pwb-track {
        animation-duration: 24s;
    }
}
