/* ── ticker.css — DB-driven ticker bar animation layer ───────────────── */
/* .ticker-bar is added alongside .portal-accent-bar on every element    */
/* served from the ticker_items API (ticker.html, API mode only).        */
/* Base layout, sizing, and colour styles remain in pocits-tokens.css    */
/* untouched — this file owns only the animation gate and keyframes.     */
/* Legacy dynamic tickers (.ticker--scroll path) are also untouched.     */

/* Animation — single-string approach, no text doubling required.        */
/* Text enters from right viewport edge, exits fully off left.           */
@keyframes tickerScroll {
  0%   { transform: translateX(100vw); }
  100% { transform: translateX(-100%); }
}

/* Gate: only animate when DB record has is_scroll=True.                 */
/* .is-scroll is added by ticker.html when item.is_scroll is truthy.     */
.ticker-bar.is-scroll .accent-bar-ticker-text {
  display: inline-block;
  white-space: nowrap;
  animation: tickerScroll 34s linear infinite;
}

/* Static tickers (is_scroll=False): clip and truncate normally.         */
.ticker-bar:not(.is-scroll) .accent-bar-ticker {
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Reduced motion — user has requested minimal animation.                */
@media (prefers-reduced-motion: reduce) {
  .ticker-bar.is-scroll .accent-bar-ticker-text {
    animation: none;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}
