/* Rabot: Announcement Ticker (rendered by the Navbar widget)
 * A full-width bar pinned to the very top of the viewport. The Navbar widget
 * also shifts the fixed .header down by --rabot-anno-h so the bar + nav read as
 * one sticky unit. Desktop (>=768px): seamless right-to-left ticker. Mobile
 * (<768px): a single static line.
 */

.rabot-anno {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10000;
    height: var(--rabot-anno-h, 40px);
    display: flex;
    align-items: center;
    overflow: hidden;
    background: var(--anno-bg, #ff9696);
    color: var(--anno-text, #000c14);
    font-family: "Proxima Nova Bold", sans-serif;
    font-weight: 700;
    font-size: 14px;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: 0.01em;
}

.rabot-anno__link {
    display: flex;
    align-items: center;
    width: 100%;
    height: 100%;
    /* Force the ticker's own text colour — otherwise the theme's link colour
     * (green) wins over `inherit` and recolours the bar when a link is set.
     * !important to beat theme `a` rules regardless of their specificity. */
    color: var(--anno-text, #000c14) !important;
    text-decoration: none !important;
}

/* --- Ticker (desktop) --- */
.rabot-anno__ticker {
    width: 100%;
    overflow: hidden;
}

.rabot-anno__track {
    display: inline-flex;
    flex-wrap: nowrap;
    white-space: nowrap;
    will-change: transform;
    /* JS sets --anno-dur (from pixels/second) and --anno-shift (one group
     * width). The values here are only a no-JS fallback. */
    animation: rabot-anno-scroll var(--anno-dur, 20s) linear infinite;
}

.rabot-anno__group {
    display: inline-flex;
    align-items: center;
}

.rabot-anno__item {
    padding: 0 14px;
}

.rabot-anno__sep {
    padding: 0 8px;
    opacity: 1;
}

@keyframes rabot-anno-scroll {
    from { transform: translateX(0); }
    to   { transform: translateX(var(--anno-shift, -50%)); }
}

.rabot-anno:hover .rabot-anno__track,
.rabot-anno__link:focus .rabot-anno__track {
    /* Fallback path: halve the speed on hover (the WAAPI path eases to 0.5x). */
    animation-duration: calc(var(--anno-dur, 20s) * 2);
}

/* --- Mobile static text (<768px) --- */
.rabot-anno__mobile {
    display: none;
    width: 100%;
    padding: 0 16px;
    text-align: center;
}

@media (max-width: 767.98px) {
    .rabot-anno__ticker { display: none; }
    .rabot-anno__mobile { display: block; }
}

/* Accessibility: no motion for users who ask for it. */
@media (prefers-reduced-motion: reduce) {
    .rabot-anno__track {
        animation: none;
        transform: none;
    }
}
