/* US Daily Sports — custom styles layered on top of Tailwind */

/* ---- Vertical scrolling scores ticker ---- */
.ticker {
  /* fade out top & bottom edges */
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 8%, #000 92%, transparent);
          mask-image: linear-gradient(to bottom, transparent, #000 8%, #000 92%, transparent);
}

.ticker__track {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.5rem;
  /* duration is set inline by JS based on content height */
  animation: ticker-scroll var(--ticker-duration, 30s) linear infinite;
  will-change: transform;
}

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

@keyframes ticker-scroll {
  from { transform: translateY(0); }
  /* track holds two copies of the list, so -50% loops seamlessly */
  to   { transform: translateY(-50%); }
}

/* Respect reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
  .ticker__track { animation: none; }
  .ticker { overflow-y: auto; }
}

/* Score card */
.score-card {
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: #fff;
  font-size: 0.8rem;
}
.score-card .team { display: flex; justify-content: space-between; align-items: center; }
.score-card .team + .team { margin-top: 2px; }
.score-card .team-name { font-weight: 600; color: #0f172a; }
.score-card .team-score { font-weight: 800; color: #0f172a; font-variant-numeric: tabular-nums; }
.score-card .winner .team-name,
.score-card .winner .team-score { color: #1d4ed8; }

/* Article card image fallback shimmer */
.shimmer {
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 37%, #f1f5f9 63%);
  background-size: 400% 100%;
  animation: shimmer 1.4s ease infinite;
}
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }

/* Clamp helpers (in case the CDN plugin isn't present) */
.line-clamp-2 {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.line-clamp-3 {
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
