/* ============================================================
   ticker.css - Styling cho Dải băng chữ chạy Top RS Cao Nhất Ngành
   ============================================================ */

.rs-ticker-container {
  display: flex;
  align-items: center;
  background: var(--bg-card, #111b2e);
  border: 1px solid var(--border, rgba(255, 255, 255, 0.08));
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 14px;
  height: 38px;
  box-shadow: var(--shadow-card, 0 2px 8px rgba(0, 0, 0, 0.15));
}

.rs-ticker-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #7c3aed, #4f46e5);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.78rem;
  padding: 0 14px;
  height: 100%;
  white-space: nowrap;
  flex-shrink: 0;
  z-index: 2;
  box-shadow: 2px 0 8px rgba(0, 0, 0, 0.25);
  letter-spacing: 0.02em;
}

.rs-ticker-badge i {
  color: #f59e0b;
}

.rs-ticker-track-wrapper {
  flex: 1;
  overflow: hidden;
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
  mask-image: linear-gradient(to right, transparent, black 15px, black 95%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 15px, black 95%, transparent);
}

.rs-ticker-track {
  display: flex;
  align-items: center;
  white-space: nowrap;
  will-change: transform;
  animation: rs-ticker-anim 45s linear infinite;
}

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

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

.rs-ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.82rem;
  color: var(--text-primary, #e8edf5);
  margin-right: 18px;
}

.rs-ticker-sector-name {
  font-weight: 700;
  color: #38bdf8;
  font-size: 0.8rem;
  margin-right: 2px;
}

.rs-chip-comma {
  color: var(--text-muted, #94a3b8);
  font-weight: 700;
  font-size: 0.85rem;
  margin-left: -1px;
  margin-right: 3px;
}

.rs-stock-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.05);
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.rs-stock-chip:hover {
  background: rgba(56, 189, 248, 0.18);
  border-color: #38bdf8;
  transform: translateY(-1px);
}

.rs-val {
  color: #10b981;
  font-weight: 800;
  font-size: 0.75rem;
  background: rgba(16, 185, 129, 0.12);
  padding: 0 4px;
  border-radius: 3px;
}

.rs-divider {
  color: var(--border, rgba(255, 255, 255, 0.2));
  margin: 0 8px;
  font-weight: 300;
}

/* Responsive adjustment for Mobile */
@media (max-width: 768px) {
  .rs-ticker-container {
    height: 34px;
    margin-bottom: 10px;
  }
  .rs-ticker-badge {
    padding: 0 8px;
    font-size: 0.72rem;
  }
  .rs-ticker-badge span {
    display: none;
  }
  .rs-ticker-badge::after {
    content: "TOP RS ≥ 70";
  }
}
