/*
 * ticker.css — live price ticker tape + scrolling news strip (brief §4.3/§4.5).
 * Pure CSS scroll; pause on hover; respects prefers-reduced-motion.
 */

/* ===== Price ticker ===== */
.to-ticker {
  overflow: hidden; background: #0a0a0d; color: #e7e9f1;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.to-ticker__track { display: inline-flex; white-space: nowrap; will-change: transform; }
.to-tick { display: inline-flex; align-items: baseline; gap: 8px; padding: 10px 20px; border-right: 1px solid rgba(255,255,255,0.06); font-size: var(--fs-sm); }
.to-tick__lbl { font-family: var(--font-heading); font-weight: 700; color: #fff; }
.to-tick__px { color: #cfd2dc; }
.to-tick__chg { font-weight: 600; }
.to-tick.up .to-tick__chg { color: #2ee08a; }
.to-tick.down .to-tick__chg { color: #ff6b6b; }

/* ===== News strip ===== */
/* Layout a colonna: targhetta sottile sopra, strip a tutta larghezza sotto. */
.to-newsstrip { display: flex; flex-direction: column; background: #fff; border-bottom: 1px solid var(--brk-line); }
.to-newsstrip__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 14px; border-bottom: 1px solid var(--brk-line); background: var(--brk-surface, #faf9fc); }
.to-newsstrip__tag {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--brk-pink); font-family: var(--font-heading);
  font-weight: 800; font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.11em;
}
.to-newsstrip__live { width: 7px; height: 7px; border-radius: 50%; background: var(--brk-pink); flex: 0 0 auto; animation: to-livepulse 1.8s infinite; }
@keyframes to-livepulse { 0% { box-shadow: 0 0 0 0 rgba(216,27,96,.45); } 70% { box-shadow: 0 0 0 6px rgba(216,27,96,0); } 100% { box-shadow: 0 0 0 0 rgba(216,27,96,0); } }
.to-newsstrip__viewport { overflow: hidden; }
.to-newsstrip__track { display: inline-flex; white-space: nowrap; will-change: transform; }
.to-news { display: inline-flex; align-items: center; gap: 9px; padding: 11px 20px; text-decoration: none; border-right: 1px solid var(--brk-line); font-size: var(--fs-sm); color: var(--brk-ink); }
.to-news__src { font-family: var(--font-heading); font-weight: 800; font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.04em; flex: 0 0 auto; }
.to-news.is-ed .to-news__src { color: var(--brk-green-700); }
.to-news.is-ext .to-news__src { color: var(--brk-pink); }
.to-news__t { color: var(--brk-ink); font-weight: 500; }
.to-news:hover .to-news__t { color: var(--brk-purple); }
.to-news__dt { flex: 0 0 auto; color: var(--brk-muted); font-variant-numeric: tabular-nums; font-size: var(--fs-xs); padding-left: 9px; margin-left: 2px; border-left: 1px solid var(--brk-line); }
.to-newsstrip__toggle { flex: 0 0 auto; width: 28px; height: 22px; border: 1px solid var(--brk-line); border-radius: 6px; background: #fff; color: var(--brk-muted); font-size: 0.66rem; line-height: 1; cursor: pointer; }

/* Scroll animation (enhancement only) */
@media (prefers-reduced-motion: no-preference) {
  .to-ticker__track { animation: to-scroll-x 60s linear infinite; }
  .to-newsstrip__track { animation: to-scroll-x 140s linear infinite; }
  .to-ticker:hover .to-ticker__track,
  .to-newsstrip:hover .to-newsstrip__track,
  .to-newsstrip.is-paused .to-newsstrip__track { animation-play-state: paused; }
}
@keyframes to-scroll-x { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* No-motion / no-JS: horizontally scrollable instead of animated */
@media (prefers-reduced-motion: reduce) {
  .to-ticker, .to-newsstrip__viewport { overflow-x: auto; }
}
