/* ==========================================================================
   ticker.css - 顶部 / 底部行情跑马灯
   ========================================================================== */

/* --------------------------------------------------------------------------
   顶部 Ticker - 横向滚动条
   -------------------------------------------------------------------------- */
[data-child-theme="binance"] .ticker-strip {
  background: linear-gradient(180deg, rgba(11, 14, 17, 0.95) 0%, rgba(24, 26, 32, 0.95) 100%);
  border-bottom: 1px solid var(--ri-border-color);
  padding: 0.5rem 0;
  overflow: hidden;
  position: relative;
  font-size: 0.82rem;
  backdrop-filter: blur(10px);
}

[data-child-theme="binance"] .ticker-strip::before,
[data-child-theme="binance"] .ticker-strip::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 60px;
  z-index: 2;
  pointer-events: none;
}
[data-child-theme="binance"] .ticker-strip::before {
  left: 0;
  background: linear-gradient(90deg, #0B0E11 0%, transparent 100%);
}
[data-child-theme="binance"] .ticker-strip::after {
  right: 0;
  background: linear-gradient(-90deg, #0B0E11 0%, transparent 100%);
}

[data-child-theme="binance"] .ticker-track {
  display: flex;
  gap: 2rem;
  animation: ticker-scroll 40s linear infinite;
  white-space: nowrap;
  width: max-content;
}
[data-child-theme="binance"] .ticker-track:hover {
  animation-play-state: paused;
}
@keyframes ticker-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

[data-child-theme="binance"] .ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0 0.25rem;
}
[data-child-theme="binance"] .ticker-pair {
  font-weight: 600;
  color: var(--ri-emphasis-color);
}
[data-child-theme="binance"] .ticker-price {
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  color: var(--ri-secondary-color);
}
[data-child-theme="binance"] .ticker-change {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  font-size: 0.78rem;
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
}
[data-child-theme="binance"] .ticker-change.up {
  background: rgba(14, 203, 129, 0.12);
  color: var(--ri-success);
}
[data-child-theme="binance"] .ticker-change.down {
  background: rgba(246, 70, 93, 0.12);
  color: var(--ri-danger);
}

/* --------------------------------------------------------------------------
   跑马灯放置位置（PC 端 - 在顶部导航下方）
   -------------------------------------------------------------------------- */
[data-child-theme="binance"] .ticker-strip {
  display: block;
}

/* 移动端隐藏（节省空间） */
@media (max-width: 767.98px) {
  [data-child-theme="binance"] .ticker-strip {
    display: none;
  }
}

/* --------------------------------------------------------------------------
   卡片内的紧凑 Ticker（嵌入文章/侧栏）
   -------------------------------------------------------------------------- */
[data-child-theme="binance"] .ticker-mini {
  background: var(--ri-secondary-bg);
  border: 1px solid var(--ri-border-color);
  border-radius: var(--ri-border-radius-lg);
  padding: 0.85rem 1rem;
  margin-bottom: 1.25rem;
}
[data-child-theme="binance"] .ticker-mini-track {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  scrollbar-width: thin;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
[data-child-theme="binance"] .ticker-mini-track::-webkit-scrollbar {
  height: 4px;
}
[data-child-theme="binance"] .ticker-mini-track::-webkit-scrollbar-thumb {
  background: var(--ri-border-color);
  border-radius: 2px;
}
[data-child-theme="binance"] .ticker-mini-item {
  flex: 0 0 auto;
  scroll-snap-align: start;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.75rem;
  border-right: 1px solid var(--ri-border-color);
}
[data-child-theme="binance"] .ticker-mini-item:last-child {
  border-right: none;
}
[data-child-theme="binance"] .ticker-mini-pair {
  font-weight: 600;
  color: var(--ri-emphasis-color);
  font-size: 0.85rem;
}
[data-child-theme="binance"] .ticker-mini-price {
  font-variant-numeric: tabular-nums;
  color: var(--ri-secondary-color);
  font-size: 0.85rem;
}
[data-child-theme="binance"] .ticker-mini-change {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
}
[data-child-theme="binance"] .ticker-mini-change.up {
  background: rgba(14, 203, 129, 0.12);
  color: var(--ri-success);
}
[data-child-theme="binance"] .ticker-mini-change.down {
  background: rgba(246, 70, 93, 0.12);
  color: var(--ri-danger);
}

/* --------------------------------------------------------------------------
   移动端 ticker
   -------------------------------------------------------------------------- */
@media (max-width: 767.98px) {
  [data-child-theme="binance"] .ticker-mini {
    padding: 0.65rem 0.85rem;
    margin-bottom: 0.85rem;
  }
  [data-child-theme="binance"] .ticker-mini-item {
    padding: 0.25rem 0.5rem;
    gap: 0.35rem;
  }
}