/* ============================================================
   TICKER — Market data ribbon
   ============================================================ */

.ticker {
  background: var(--color-accent);
  color: var(--color-text-inverse);
  overflow: hidden;
  font-size: var(--text-sm);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
}

/* Fade edges */
.ticker::before,
.ticker::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 48px;
  z-index: 2;
  pointer-events: none;
}

.ticker::before {
  left: 0;
  background: linear-gradient(to right, var(--color-accent), transparent);
}

.ticker::after {
  right: 0;
  background: linear-gradient(to left, var(--color-accent), transparent);
}

.ticker__track {
  display: flex;
  width: max-content;
  animation: ticker-scroll 45s linear infinite;
  will-change: transform;
}

.ticker:hover .ticker__track,
.ticker:focus-within .ticker__track {
  animation-play-state: paused;
}

@keyframes ticker-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.ticker__content {
  display: flex;
  flex-shrink: 0;
}

.ticker__item {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  padding: 0.6em 1.5em;
  white-space: nowrap;
}

.ticker__label {
  color: rgba(255, 255, 255, 0.55);
  font-weight: 400;
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-wide);
}

.ticker__value {
  font-weight: 650;
}

.ticker__change--up {
  color: #4ade80;
}

.ticker__change--down {
  color: #f87171;
}

/* Reduced motion: static horizontal layout */
@media (prefers-reduced-motion: reduce) {
  .ticker__track {
    animation: none;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .ticker__track::-webkit-scrollbar {
    display: none;
  }

  .ticker__content:nth-child(2) {
    display: none;
  }
}
