/* Slim 24h Samoa news ticker (rendered inside .public-navbar).
   Height is published to --news-ticker-h by news_ticker.js so page
   clearances offset only while the bar is actually visible. */
:root {
    --news-ticker-h: 0px;
}

.news-ticker {
    position: relative;
    width: 100%;
    background:
        linear-gradient(90deg, rgba(99, 102, 241, 0.18), rgba(15, 23, 42, 0.4) 26%, rgba(15, 23, 42, 0.4) 74%, rgba(99, 102, 241, 0.18));
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    color: #e2e8f0;
    font-size: 12.5px;
    overflow: hidden;
}

.news-ticker[hidden] {
    display: none !important;
}

.news-ticker-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    height: 34px;
}

.news-ticker-brand {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    flex-shrink: 0;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #c7d2fe;
    white-space: nowrap;
}

.news-ticker-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #f87171;
    animation: newsTickerPulse 2.4s ease-out infinite;
}

@keyframes newsTickerPulse {
    0% { box-shadow: 0 0 0 0 rgba(248, 113, 113, 0.55); }
    70% { box-shadow: 0 0 0 7px rgba(248, 113, 113, 0); }
    100% { box-shadow: 0 0 0 0 rgba(248, 113, 113, 0); }
}

.news-ticker-viewport {
    position: relative;
    flex: 1 1 auto;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 22px, #000 calc(100% - 22px), transparent);
    mask-image: linear-gradient(90deg, transparent, #000 22px, #000 calc(100% - 22px), transparent);
}

.news-ticker-track {
    display: flex;
    width: max-content;
    animation: newsTickerScroll var(--news-ticker-duration, 90s) linear infinite;
    will-change: transform;
}

.news-ticker-group {
    display: flex;
    align-items: center;
}

.news-ticker.is-paused .news-ticker-track {
    animation-play-state: paused;
}

.news-ticker-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-right: 36px;
    color: inherit;
    text-decoration: none;
    white-space: nowrap;
}

.news-ticker-item:hover .news-ticker-headline,
.news-ticker-item:focus-visible .news-ticker-headline {
    color: #ffffff;
    text-decoration: underline;
}

.news-ticker-item:focus-visible {
    outline: 2px solid rgba(165, 180, 252, 0.8);
    outline-offset: 2px;
    border-radius: 4px;
}

.news-ticker-source {
    flex-shrink: 0;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: #a5b4fc;
}

.news-ticker-source::after {
    content: '·';
    margin-left: 8px;
    color: rgba(148, 163, 184, 0.85);
    font-weight: 400;
}

.news-ticker-headline {
    color: #e2e8f0;
    font-weight: 500;
}

.news-ticker-time {
    flex-shrink: 0;
    font-size: 11px;
    color: rgba(148, 163, 184, 0.95);
}

.news-ticker-toggle {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    padding: 0;
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 6px;
    background: transparent;
    color: #cbd5e1;
    cursor: pointer;
}

.news-ticker-toggle:hover {
    background: rgba(148, 163, 184, 0.16);
    color: #f8fafc;
}

.news-ticker-icon-play {
    display: none;
}

.news-ticker.is-manual-paused .news-ticker-icon-pause {
    display: none;
}

.news-ticker.is-manual-paused .news-ticker-icon-play {
    display: block;
}

@keyframes newsTickerScroll {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

/* The marquee loops for every visitor — no prefers-reduced-motion / static
   fallback (product decision, 2026-09-26): machines with OS animations
   disabled still auto-scroll. Visitors retain hover, keyboard-focus and
   manual pause controls. */

@media (max-width: 768px) {
    .news-ticker-bar {
        gap: 8px;
        padding: 0 12px;
        height: 30px;
    }

    .news-ticker-brand {
        font-size: 9.5px;
        letter-spacing: 0.08em;
    }

    .news-ticker-item {
        gap: 6px;
        margin-right: 26px;
    }

    .news-ticker-time {
        display: none;
    }
}
