/* team/polish.css — entrance + interaction animations for /team
 * Presentation-only. Scoped to html[data-route="/team"].
 * Reduced-motion fallbacks included.
 * G8 / polish/e1-remaining-routes 2026-06-09
 */

/* ── Keyframes ────────────────────────────────────────────── */
@keyframes tm-fade-rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes tm-hero-in {
  from { opacity: 0; transform: translateY(-8px) scale(.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes tm-logo-pop {
  from { opacity: 0; transform: scale(.7) rotate(-5deg); }
  to   { opacity: 1; transform: scale(1) rotate(0); }
}
@keyframes tm-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Hero entrance ────────────────────────────────────────── */
html[data-route="/team"] .team-hero {
  animation: tm-hero-in .4s ease both;
}
html[data-route="/team"] .hero-logo {
  animation: tm-logo-pop .45s .05s cubic-bezier(.34,1.56,.64,1) both;
}
html[data-route="/team"] .hero-meta {
  animation: tm-fade-rise .4s .1s ease both;
}

/* ── Tab bar entrance ─────────────────────────────────────── */
html[data-route="/team"] .team-tabs-bar {
  animation: tm-fade-rise .35s .15s ease both;
}

/* ── Tab button hover/active ──────────────────────────────── */
html[data-route="/team"] .team-tab {
  transition: color .15s ease, border-color .15s ease, background .15s ease;
}
html[data-route="/team"] .team-tab:hover:not(.is-active) {
  color: var(--white-bright, #f5f5f5);
  background: rgba(255, 26, 26, .06);
}
html[data-route="/team"] .team-tab:focus-visible {
  outline: 2px solid var(--team-primary, #FF1A1A);
  outline-offset: -2px;
}

/* ── Panel stagger ────────────────────────────────────────── */
html[data-route="/team"] #panel-roster,
html[data-route="/team"] #panel-schedule,
html[data-route="/team"] #panel-stats,
html[data-route="/team"] #panel-fantasy {
  animation: tm-fade-rise .3s ease both;
}

/* ── Roster rows / player tiles ───────────────────────────── */
html[data-route="/team"] .roster-row,
html[data-route="/team"] .player-row,
html[data-route="/team"] .schedule-row,
html[data-route="/team"] .game-row {
  transition: background .15s ease, transform .14s ease;
}
html[data-route="/team"] .roster-row:hover,
html[data-route="/team"] .player-row:hover,
html[data-route="/team"] .schedule-row:hover,
html[data-route="/team"] .game-row:hover {
  background: rgba(255, 26, 26, .06);
  transform: translateX(2px);
}

/* ── Favorite button ──────────────────────────────────────── */
html[data-route="/team"] .fav-btn {
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, border-color .15s ease;
}
html[data-route="/team"] .fav-btn:hover {
  transform: scale(1.05);
}
html[data-route="/team"] .fav-btn[aria-pressed="true"] {
  animation: tm-logo-pop .25s ease;
}
html[data-route="/team"] .fav-btn:focus-visible {
  outline: 2px solid var(--team-primary, #FF1A1A);
  outline-offset: 3px;
}

/* ── Skeleton shimmer ─────────────────────────────────────── */
html[data-route="/team"] .skeleton,
html[data-route="/team"] .skel-text {
  background: linear-gradient(90deg,
    var(--bg-surface, #0a0a0a) 25%,
    #161616 50%,
    var(--bg-surface, #0a0a0a) 75%);
  background-size: 200% 100%;
  animation: tm-shimmer 1.5s infinite;
}

/* ── Reduced-motion overrides ─────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html[data-route="/team"] .team-hero,
  html[data-route="/team"] .hero-logo,
  html[data-route="/team"] .hero-meta,
  html[data-route="/team"] .team-tabs-bar,
  html[data-route="/team"] #panel-roster,
  html[data-route="/team"] #panel-schedule,
  html[data-route="/team"] #panel-stats,
  html[data-route="/team"] #panel-fantasy {
    animation: none;
    opacity: 1;
  }
  html[data-route="/team"] .skeleton,
  html[data-route="/team"] .skel-text {
    animation: none;
    background: var(--bg-surface, #0a0a0a);
  }
  html[data-route="/team"] .roster-row:hover,
  html[data-route="/team"] .player-row:hover,
  html[data-route="/team"] .schedule-row:hover,
  html[data-route="/team"] .game-row:hover,
  html[data-route="/team"] .fav-btn:hover {
    transform: none;
  }
}

/* ── WK0-0814-03: Week 0 badge in the schedule week cell ──────────────────
   Games before Thu 2026-09-03 (ET) are Week 0 — no fantasy points. Muted
   neutral (overrides the 16px .badge base), not alarm-red. */
html[data-route="/team"] .badge-wk0 {
  font: 700 11px/1 'JetBrains Mono', monospace;
  letter-spacing: .12em;
  color: var(--gray-light, #8A8A8A);
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  padding: 2px 6px;
  border-radius: 4px;
  vertical-align: 1px;
  white-space: nowrap;
}
