/* scores/polish.css — entrance + interaction animations for /scores (incl. Rankings tab)
 * Presentation-only. Scoped to html[data-route="/scores"].
 * /rankings redirects permanently to /scores (nginx.conf); rankings panel lives here.
 * Mirrors rankings/polish.css selectors re-scoped to data-route="/scores".
 * Reduced-motion fallbacks included.
 * G8b fix / fix/iter2-closers 2026-06-10
 */

/* ── Keyframes ────────────────────────────────────────────── */
@keyframes pr-fade-rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes pr-scale-in {
  from { opacity: 0; transform: scale(.94); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes pr-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Entrance: page header ────────────────────────────────── */
html[data-route="/scores"] .row-pr-header,
html[data-route="/scores"] .sn--c_prheader {
  animation: pr-fade-rise .4s .05s ease both;
}
html[data-route="/scores"] .row-pr-controls,
html[data-route="/scores"] .pr-controls {
  animation: pr-fade-rise .38s .12s ease both;
}
html[data-route="/scores"] .row-pr-table,
html[data-route="/scores"] .pr-table-wrap {
  animation: pr-fade-rise .4s .18s ease both;
}

/* ── Toggle button hover / active / focus-visible ─────────── */
html[data-route="/scores"] .pr-toggle {
  transition: background .14s ease, color .14s ease, border-color .14s ease, transform .12s ease;
}
html[data-route="/scores"] .pr-toggle:hover:not(.is-active) {
  background: rgba(255, 255, 255, .06);
  transform: translateY(-1px);
}
html[data-route="/scores"] .pr-toggle:active {
  transform: translateY(0);
}
html[data-route="/scores"] .pr-toggle:focus-visible {
  outline: 2px solid var(--gold-accent, #F0BD30);
  outline-offset: 2px;
}

/* ── Row hover ────────────────────────────────────────────── */
html[data-route="/scores"] .pr-row {
  transition: background .14s ease;
}
html[data-route="/scores"] .pr-row:hover {
  background: rgba(255, 255, 255, .04);
}

/* ── Button hover / active / focus-visible ────────────────── */
html[data-route="/scores"] .btn,
html[data-route="/scores"] .press-btn {
  transition: transform .14s ease, box-shadow .14s ease;
}
html[data-route="/scores"] .btn:hover,
html[data-route="/scores"] .press-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 16px rgba(255, 26, 26, .22);
}
html[data-route="/scores"] .btn:active,
html[data-route="/scores"] .press-btn:active {
  transform: translateY(0);
}
html[data-route="/scores"] .btn:focus-visible,
html[data-route="/scores"] .press-btn:focus-visible {
  outline: 2px solid var(--gold-accent, #F0BD30);
  outline-offset: 3px;
}

/* ── Skeleton shimmer ─────────────────────────────────────── */
html[data-route="/scores"] .pr-skel-row,
html[data-route="/scores"] .skel-row {
  background: linear-gradient(90deg,
    rgba(255,255,255,.05) 25%,
    rgba(255,255,255,.12) 50%,
    rgba(255,255,255,.05) 75%);
  background-size: 200% 100%;
  border-radius: 4px;
  animation: pr-shimmer 1.6s infinite;
}

/* ── Reduced-motion overrides ─────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html[data-route="/scores"] .row-pr-header,
  html[data-route="/scores"] .sn--c_prheader,
  html[data-route="/scores"] .row-pr-controls,
  html[data-route="/scores"] .pr-controls,
  html[data-route="/scores"] .row-pr-table,
  html[data-route="/scores"] .pr-table-wrap {
    animation: none;
    opacity: 1;
  }
  html[data-route="/scores"] .pr-skel-row,
  html[data-route="/scores"] .skel-row {
    animation: none;
  }
  html[data-route="/scores"] .pr-toggle:hover,
  html[data-route="/scores"] .btn:hover,
  html[data-route="/scores"] .press-btn:hover {
    transform: none;
  }
}
