.bw-news-ticker {
    --bw-news-blue: #2f80ff;
    --bw-news-cyan: #27b4ff;
    width: 100%;
    min-height: 46px;
    position: relative;
    z-index: 40;
    overflow: hidden;
    color: #edf6ff;
    background: linear-gradient(90deg, #071425 0%, #0a1c35 45%, #071425 100%);
    border-bottom: 1px solid rgba(74, 151, 255, .28);
    box-shadow: 0 8px 24px rgba(0, 18, 48, .2);
    text-transform: none !important;
}

.bw-news-ticker[hidden] {
    display: none !important;
}

body.bw-news-visible .wa-topbar {
    top: var(--bw-news-height, 46px);
}

body.bw-news-visible .wa-live-region {
    top: calc(var(--bw-news-height, 46px) + 76px + env(safe-area-inset-top));
}

.bw-news-ticker__inner {
    width: min(100%, 1440px);
    min-height: 46px;
    margin: 0 auto;
    padding: 5px 10px 5px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.bw-news-ticker__badge {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 9px;
    border: 1px solid rgba(70, 158, 255, .42);
    border-radius: 999px;
    color: #ddecff;
    background: rgba(47, 128, 255, .14);
    font-size: 10px;
    line-height: 1;
    font-weight: 800;
    letter-spacing: .08em;
}

.bw-news-ticker__badge i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--bw-news-cyan);
    box-shadow: 0 0 0 4px rgba(39, 180, 255, .12);
}

.bw-news-ticker__image {
    width: 36px;
    height: 30px;
    flex: 0 0 auto;
    object-fit: cover;
    border-radius: 7px;
    border: 1px solid rgba(255, 255, 255, .15);
}

.bw-news-ticker__image[hidden],
.bw-news-ticker__image:not([src]),
.bw-news-ticker:not(.has-image) .bw-news-ticker__image {
    display: none !important;
}

.bw-news-ticker__viewport {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    contain: layout paint;
}

.bw-news-ticker__copy {
    --bw-news-marquee-start: 100vw;
    --bw-news-marquee-end: -100%;
    --bw-news-marquee-duration: 22s;
    --bw-news-marquee-cycles: 1;
    display: inline-block;
    width: max-content;
    min-width: 0;
    max-width: none;
    margin: 0;
    padding: 0;
    color: #edf6ff !important;
    font-size: 13px;
    line-height: 1.45;
    font-weight: 500;
    white-space: nowrap;
    text-transform: none !important;
    transform: translate3d(var(--bw-news-marquee-start), 0, 0);
    unicode-bidi: plaintext;
    will-change: transform;
}

/*
 * The selected admin preset only decorates the ticker. Every preset keeps the
 * same complete right-to-left marquee, so slide/pulse/glow can never replace
 * or pause the actual news text movement.
 */
.bw-news-ticker__copy.is-marquee-running {
    animation-name: bw-news-marquee;
    animation-duration: var(--bw-news-marquee-duration);
    animation-timing-function: linear;
    animation-delay: 0s;
    animation-iteration-count: var(--bw-news-marquee-cycles);
    animation-direction: normal;
    animation-fill-mode: both;
    animation-play-state: running;
}

.bw-news-ticker__copy strong {
    color: #ffffff;
    font-weight: 750;
}

.bw-news-ticker__close {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    display: inline-grid;
    place-items: center;
    padding: 0;
    border: 1px solid rgba(118, 171, 239, .18);
    border-radius: 50%;
    color: #b9cbe2;
    background: rgba(255, 255, 255, .045);
    font: 400 24px/1 sans-serif;
    cursor: pointer;
    transition: color .2s ease, border-color .2s ease, background .2s ease;
}

.bw-news-ticker__close:hover,
.bw-news-ticker__close:focus-visible {
    color: #fff;
    border-color: rgba(93, 164, 255, .65);
    background: rgba(47, 128, 255, .2);
    outline: none;
}

.bw-news-ticker[data-animation="slide"] {
    animation: bw-news-enter .4s ease-out both;
}

.bw-news-ticker[data-animation="pulse"] .bw-news-ticker__badge {
    animation: bw-news-pulse 2s ease-in-out infinite;
}

.bw-news-ticker[data-animation="glow"] {
    animation: bw-news-glow 2.8s ease-in-out infinite alternate;
}

@keyframes bw-news-marquee {
    from { transform: translate3d(var(--bw-news-marquee-start), 0, 0); }
    to { transform: translate3d(var(--bw-news-marquee-end), 0, 0); }
}

@keyframes bw-news-enter {
    from { opacity: 0; transform: translateY(-12px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes bw-news-pulse {
    0%, 100% { box-shadow: 0 0 0 rgba(47, 128, 255, 0); }
    50% { box-shadow: 0 0 18px rgba(47, 128, 255, .28); }
}

@keyframes bw-news-glow {
    from { box-shadow: 0 8px 24px rgba(0, 18, 48, .2); }
    to { box-shadow: 0 8px 30px rgba(47, 128, 255, .28); }
}

@media (max-width: 575.98px) {
    .bw-news-ticker {
        min-height: 42px;
    }

    .bw-news-ticker__inner {
        min-height: 42px;
        gap: 7px;
        padding: 4px 7px 4px 8px;
    }

    .bw-news-ticker__badge {
        padding: 5px 7px;
        font-size: 9px;
    }

    .bw-news-ticker__image {
        width: 30px;
        height: 28px;
    }

    .bw-news-ticker__copy {
        font-size: 12px;
    }

    .bw-news-ticker__close {
        width: 32px;
        height: 32px;
        flex-basis: 32px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .bw-news-ticker,
    .bw-news-ticker__badge,
    .bw-news-ticker__copy {
        animation: none !important;
    }

    .bw-news-ticker__inner {
        align-items: flex-start;
    }

    .bw-news-ticker__viewport {
        overflow: visible;
        white-space: normal;
        contain: none;
    }

    .bw-news-ticker__copy {
        display: block;
        width: auto;
        min-width: 0;
        max-width: none;
        transform: none !important;
        white-space: normal;
        overflow: visible;
        overflow-wrap: anywhere;
        text-overflow: clip;
        will-change: auto;
    }
}
