/* ESPN / The Athletic style Matchday Strip & live featured card transitions. */
.matchday-ticker {
  margin: 0 0 12px;
  border: 1px solid #cbd5e1;
  border-left: 3px solid #047857;
  border-radius: 9px;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
  color: #0f172a;
}
.matchday-ticker[hidden] {
  display: none !important;
}
.matchday-ticker-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 6px 10px;
}
.matchday-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  padding: 3px 8px;
  border-radius: 5px;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.25;
  text-transform: uppercase;
  white-space: nowrap;
}
.matchday-badge[data-state="final"] {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}
.matchday-badge[data-state="just_finished"] {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fcd34d;
}
.matchday-badge[data-state="live"] {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #6ee7b7;
}
.matchday-badge[data-state="live"]::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #059669;
  box-shadow: 0 0 0 0 rgba(5, 150, 105, 0.55);
  animation: matchdayPulse 1.8s ease-out infinite;
}
@keyframes matchdayPulse {
  0% { box-shadow: 0 0 0 0 rgba(5, 150, 105, 0.55); }
  70% { box-shadow: 0 0 0 6px rgba(5, 150, 105, 0); }
  100% { box-shadow: 0 0 0 0 rgba(5, 150, 105, 0); }
}
.matchday-headline-link {
  flex: 1 1 auto;
  min-width: 0;
  color: inherit;
  text-decoration: none;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.35;
}
.matchday-headline-link:hover .matchday-headline-text {
  text-decoration: underline;
  text-underline-offset: 2px;
}
.matchday-headline-text {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.matchday-meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}
.matchday-result-pill,
.matchday-elo-pill,
.matchday-match-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 5px;
  font-size: 0.75rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.matchday-result-pill {
  background: #f1f5f9;
  color: #0f172a;
}
.matchday-elo-pill {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
  font-size: 0.6875rem;
}
.matchday-match-pill {
  background: #f8fafc;
  color: #475569;
  border: 1px solid #e2e8f0;
  font-size: 0.6875rem;
}
.matchday-cta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 9px;
  border-radius: 6px;
  background: #047857;
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.25;
  white-space: nowrap;
  text-decoration: none;
}
.matchday-cta:hover {
  background: #065f46;
}
.matchday-controls {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
  padding-left: 6px;
  border-left: 1px solid #e2e8f0;
}
.matchday-nav {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}
.matchday-nav[hidden] {
  display: none !important;
}
.matchday-nav-btn,
.matchday-dismiss {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  color: #64748b;
  font-size: 0.9375rem;
  line-height: 1;
  cursor: pointer;
}
.matchday-nav-btn:hover,
.matchday-dismiss:hover {
  background: #f1f5f9;
  color: #0f172a;
}
.matchday-nav-btn:focus-visible,
.matchday-dismiss:focus-visible,
.matchday-cta:focus-visible,
.matchday-headline-link:focus-visible {
  outline: 2px solid #059669;
  outline-offset: 2px;
}
.matchday-counter {
  font-size: 0.6875rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: #64748b;
  padding: 0 3px;
  white-space: nowrap;
}

/* Featured tournament card live -> finished polish */
.home-rankings .featured-round[data-state="just-finished"] a,
.featured-round[data-state="just-finished"] a {
  color: #92400e;
  background: #fef3c7;
}
.featured-match-score {
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  padding: 2px 7px;
  border-radius: 5px;
  background: #f1f5f9;
  color: #334155;
  font-size: 0.6875rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.featured-result strong[data-result="½-½"] {
  color: #64748b;
}
.featured-result.featured-result-flash {
  animation: featuredResultFlash 2.2s ease-out;
  border-radius: 6px;
}
@keyframes featuredResultFlash {
  0% { background: #fef3c7; }
  35% { background: #d1fae5; }
  100% { background: transparent; }
}

/* Dark mode */
.dark .matchday-ticker {
  background: #1f2937;
  border-color: #3b495d;
  border-left-color: #10b981;
  color: #f1f5f9;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}
.dark .matchday-badge[data-state="final"] {
  background: #103f34;
  color: #6ee7b7;
  border-color: #065f46;
}
.dark .matchday-badge[data-state="just_finished"] {
  background: #451a03;
  color: #fcd34d;
  border-color: #92400e;
}
.dark .matchday-badge[data-state="live"] {
  background: #103f34;
  color: #6ee7b7;
  border-color: #059669;
}
.dark .matchday-badge[data-state="live"]::before {
  background: #34d399;
}
.dark .matchday-result-pill {
  background: #334155;
  color: #f8fafc;
}
.dark .matchday-elo-pill {
  background: #064e3b;
  color: #a7f3d0;
  border-color: #065f46;
}
.dark .matchday-match-pill {
  background: #253244;
  color: #cbd5e1;
  border-color: #3b495d;
}
.dark .matchday-cta {
  background: #059669;
  color: #ffffff;
}
.dark .matchday-cta:hover {
  background: #047857;
}
.dark .matchday-controls {
  border-left-color: #334155;
}
.dark .matchday-nav-btn,
.dark .matchday-dismiss,
.dark .matchday-counter {
  color: #94a3b8;
}
.dark .matchday-nav-btn:hover,
.dark .matchday-dismiss:hover {
  background: #334155;
  color: #f8fafc;
}
.dark .home-rankings .featured-round[data-state="just-finished"] a,
.dark .featured-round[data-state="just-finished"] a {
  color: #fcd34d;
  background: #451a03;
}
.dark .featured-match-score {
  background: #334155;
  color: #e2e8f0;
}
.dark .featured-result strong[data-result="½-½"] {
  color: #9ca3af;
}
@keyframes featuredResultFlashDark {
  0% { background: rgba(251, 191, 36, 0.25); }
  35% { background: rgba(16, 185, 129, 0.22); }
  100% { background: transparent; }
}
.dark .featured-result.featured-result-flash {
  animation: featuredResultFlashDark 2.2s ease-out;
}

@media (max-width: 900px) {
  .matchday-elo-pill,
  .matchday-match-pill {
    display: none;
  }
}
@media (max-width: 640px) {
  .matchday-ticker-inner {
    flex-wrap: wrap;
    row-gap: 6px;
    padding: 8px 10px;
  }
  .matchday-headline-link {
    order: 2;
    flex-basis: 100%;
  }
  .matchday-headline-text {
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }
  .matchday-badge {
    order: 1;
  }
  .matchday-controls {
    order: 1;
    margin-left: auto;
    border-left: 0;
    padding-left: 0;
  }
  .matchday-meta {
    order: 3;
    width: 100%;
    justify-content: space-between;
  }
}
@media (prefers-reduced-motion: reduce) {
  .matchday-badge[data-state="live"]::before,
  .featured-result.featured-result-flash {
    animation: none !important;
  }
}
