/* Live market ticker — drop-in styles (supplied package), VR Wealth colours.
   Only the --tk-* values were changed; layout and animation are as supplied.
   --tk-speed is set per page by includes/market-ticker.php
   (TICKER_SECONDS_PER_ITEM × number of items). */
:root{
  --tk-bg:#080F28;        /* strip background — deepest brand navy  */
  --tk-text:#C9D3ED;      /* value text                            */
  --tk-accent:#F58634;    /* the coloured box, left — brand saffron */
  --tk-accent-text:#26160A;
  --tk-up:#3ED598;        /* positive change         */
  --tk-down:#FF6B6B;      /* negative change         */
  --tk-speed:60s;         /* fallback only; overridden inline        */
  --tk-height:34px;
}

.ticker{
  background:var(--tk-bg);color:var(--tk-text);
  font-size:.82rem;height:var(--tk-height);
  display:flex;align-items:center;
  overflow:hidden;white-space:nowrap;position:relative;
  border-bottom:1px solid rgba(255,255,255,.08);
}
.ticker-label{
  flex:0 0 auto;background:var(--tk-accent);color:var(--tk-accent-text);font-weight:800;
  font-size:.66rem;letter-spacing:.14em;text-transform:uppercase;
  padding:0 14px;height:100%;display:flex;align-items:center;
  position:relative;z-index:2;
}
.ticker-track{
  /* FIX: the track must keep its full natural width (never shrink to the screen),
     otherwise translateX(-50%) is half the screen, not one full copy of the list,
     and the strip jumps back to the start after a few items. */
  display:flex;flex:0 0 auto;width:max-content;
  animation:tk-scroll var(--tk-speed) linear infinite;
}
.ticker:hover .ticker-track{animation-play-state:paused}
.ticker-item{
  padding:0 22px;display:inline-flex;gap:8px;
  border-right:1px solid rgba(255,255,255,.12);
}
.ticker-item b{color:#fff;font-weight:700}
.ticker .up{color:var(--tk-up);font-weight:700}
.ticker .dn{color:var(--tk-down);font-weight:700}
.ticker-time{
  position:absolute;right:0;top:0;bottom:0;display:flex;align-items:center;padding:0 14px;
  color:#8E9CC6;font-size:.74rem;white-space:nowrap;
  background:var(--tk-bg);z-index:2;
  box-shadow:-14px 0 14px var(--tk-bg);
}

/* The track holds two identical copies, so -50% is one full loop. */
@keyframes tk-scroll{from{transform:translateX(0)}to{transform:translateX(-50%)}}

@media (max-width:900px){
  .ticker{height:30px;font-size:.74rem}
  .ticker-label{padding:0 10px}
  .ticker-time{display:none}
}
@media (prefers-reduced-motion:reduce){
  .ticker-track{animation:none}
  .ticker{overflow-x:auto}
}
