/* ============================================
   AI Tribune — Market Ticker Styles
   ============================================ */

.market-ticker-bar {
  background: var(--ink, #1a1a1a);
  color: #e0e0e0;
  overflow: hidden;
  position: relative;
  height: 36px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.market-ticker-bar.hidden {
  display: none;
}

.ticker-track {
  display: flex;
  align-items: center;
  height: 100%;
  animation: ticker-scroll var(--ticker-speed, 40s) linear infinite;
  width: max-content;
  gap: 0;
}

.ticker-track:hover {
  animation-play-state: paused;
}

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

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 20px;
  white-space: nowrap;
  height: 100%;
  border-left: 1px solid rgba(255,255,255,0.08);
}

.ticker-item:first-child {
  border-left: none;
}

.ticker-symbol {
  font-weight: 600;
  color: #fff;
  font-size: 12px;
}

.ticker-price {
  color: #ccc;
  font-size: 13px;
}

.ticker-change {
  font-size: 12px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 3px;
}

.ticker-change.up {
  color: #4ade80;
  background: rgba(74, 222, 128, 0.1);
}

.ticker-change.down {
  color: #f87171;
  background: rgba(248, 113, 113, 0.1);
}

.ticker-change.flat {
  color: #999;
}

.ticker-type-badge {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: rgba(255,255,255,0.4);
  margin-left: 2px;
}

.ticker-separator {
  color: var(--accent, #8b0000);
  font-weight: 700;
  padding: 0 12px;
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.ticker-updated {
  font-size: 10px;
  color: rgba(255,255,255,0.3);
  padding: 0 16px;
}

/* RTL: ticker scrolls right-to-left naturally */
[dir="rtl"] .ticker-track {
  direction: ltr; /* Keep ticker LTR for financial data */
}

@media (max-width: 768px) {
  .market-ticker-bar {
    height: 32px;
    font-size: 12px;
  }
  .ticker-item {
    padding: 0 14px;
    gap: 4px;
  }
}
