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

/* ── Keyframes ────────────────────────────────────────────── */
@keyframes wv-fade-rise {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes wv-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
@keyframes wv-countdown-tick {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.08); }
  100% { transform: scale(1); }
}

/* ── Page entrance ────────────────────────────────────────── */
html[data-route="/waivers"] .page-header {
  animation: wv-fade-rise .35s ease both;
}
html[data-route="/waivers"] .league-tabs {
  animation: wv-fade-rise .35s .07s ease both;
}
html[data-route="/waivers"] .schedule-strip {
  animation: wv-fade-rise .35s .12s ease both;
}
html[data-route="/waivers"] .faab-bar {
  animation: wv-fade-rise .35s .14s ease both;
}

/* ── Countdown tick animation (subtle pulse every second) ─── */
html[data-route="/waivers"] #ss-countdown {
  display: inline-block;
  transition: color .3s ease;
}

/* ── Waiver claim queue rows ──────────────────────────────── */
html[data-route="/waivers"] .waiver-claim,
html[data-route="/waivers"] .claim-row,
html[data-route="/waivers"] .queue-item {
  animation: wv-fade-rise .3s ease both;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
html[data-route="/waivers"] .waiver-claim:hover,
html[data-route="/waivers"] .claim-row:hover,
html[data-route="/waivers"] .queue-item:hover {
  transform: translateX(3px);
  border-color: rgba(255, 26, 26, .25);
}
html[data-route="/waivers"] .waiver-claim:nth-child(1)  { animation-delay: .04s; }
html[data-route="/waivers"] .waiver-claim:nth-child(2)  { animation-delay: .07s; }
html[data-route="/waivers"] .waiver-claim:nth-child(3)  { animation-delay: .10s; }
html[data-route="/waivers"] .waiver-claim:nth-child(n+4){ animation-delay: .12s; }

/* ── Player tiles ─────────────────────────────────────────── */
html[data-route="/waivers"] .sns-ptile {
  animation: wv-fade-rise .3s ease both;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
html[data-route="/waivers"] .sns-ptile:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 16px rgba(255, 26, 26, .12);
  border-color: rgba(255, 26, 26, .25);
}

/* ── Action buttons ───────────────────────────────────────── */
html[data-route="/waivers"] .btn,
html[data-route="/waivers"] button.claim-btn,
html[data-route="/waivers"] button.add-btn {
  transition: transform .14s ease, box-shadow .14s ease;
}
html[data-route="/waivers"] .btn:hover,
html[data-route="/waivers"] button.claim-btn:hover,
html[data-route="/waivers"] button.add-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 26, 26, .2);
}
html[data-route="/waivers"] .btn:active,
html[data-route="/waivers"] button.claim-btn:active,
html[data-route="/waivers"] button.add-btn:active {
  transform: translateY(0) scale(.97);
}
html[data-route="/waivers"] .btn:focus-visible {
  outline: 2px solid var(--red-primary, #FF1A1A);
  outline-offset: 3px;
}

/* ── FAAB bid input ───────────────────────────────────────── */
html[data-route="/waivers"] input[type="number"],
html[data-route="/waivers"] input[type="text"] {
  transition: border-color .15s ease, box-shadow .15s ease;
}
html[data-route="/waivers"] input[type="number"]:focus,
html[data-route="/waivers"] input[type="text"]:focus {
  border-color: var(--red-primary, #FF1A1A);
  box-shadow: 0 0 0 3px rgba(255, 26, 26, .15);
  outline: none;
}

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

/* ── Reduced-motion overrides ─────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html[data-route="/waivers"] .page-header,
  html[data-route="/waivers"] .league-tabs,
  html[data-route="/waivers"] .schedule-strip,
  html[data-route="/waivers"] .faab-bar,
  html[data-route="/waivers"] .waiver-claim,
  html[data-route="/waivers"] .claim-row,
  html[data-route="/waivers"] .queue-item,
  html[data-route="/waivers"] .sns-ptile {
    animation: none;
    opacity: 1;
  }
  html[data-route="/waivers"] .skeleton,
  html[data-route="/waivers"] .skel-row,
  html[data-route="/waivers"] .skeleton-line {
    animation: none;
    background: var(--bg-surface, #0a0a0a);
  }
  html[data-route="/waivers"] .waiver-claim:hover,
  html[data-route="/waivers"] .claim-row:hover,
  html[data-route="/waivers"] .queue-item:hover,
  html[data-route="/waivers"] .sns-ptile:hover,
  html[data-route="/waivers"] .btn:hover {
    transform: none;
  }
}
