/* Loading and notice states for cards backed by live data (live-cards.js). */
.live-slot { display: flex; flex: 1; flex-direction: column; align-items: center; justify-content: center; gap: 10px; min-height: 120px; }
.live-skeleton { display: block; width: 62%; height: 10px; border-radius: 5px; background: linear-gradient(90deg, #ffffff12 0%, #ffffff29 50%, #ffffff12 100%); background-size: 200% 100%; animation: live-shimmer 1.3s ease-in-out infinite; }
.live-skeleton.is-ring { width: 78px; height: 78px; border-radius: 50%; }
.live-skeleton.is-short { width: 38%; }
.live-slot .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
.live-notice { display: flex; flex: 1; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 120px; padding: 12px; color: #d1dce4; font-size: 12px; text-align: center; }
.live-notice > i { margin: 0 auto 6px; color: #b7dcff; font-size: 18px; }
.live-notice strong { color: #f7fafc; font-size: 13px; }
@keyframes live-shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
@media (prefers-reduced-motion: reduce) { .live-skeleton { animation: none; } }

/* Season titles from the API ("Temporada 2026") are longer than the mockup's years. Mobile keeps width: auto. */
@media (min-width: 761px) { .field-season { width: 150px; } }

/* Live charts: an overlay while pitch-accuracy data loads, or when there's none. */
.canvas-slot[data-chart-state] { position: relative; }
.canvas-slot[data-chart-state="loading"]::after,
.canvas-slot[data-chart-state="empty"]::after,
.canvas-slot[data-chart-state="error"]::after {
  position: absolute; inset: 0; display: grid; place-items: center; z-index: 2;
  border-radius: 8px; background: #3e4b56d9; color: #d1dce4; font-size: 12px; font-weight: 700; content: "Loading…";
}
.canvas-slot[data-chart-state="empty"]::after { content: "No evaluated pitches for this selection"; }
.canvas-slot[data-chart-state="error"]::after { color: #ffd9d9; content: "Couldn't load this chart"; }
.batter-side-comparison[data-chart-state] { position: relative; }
.batter-side-comparison[data-chart-state="loading"]::after,
.batter-side-comparison[data-chart-state="empty"]::after,
.batter-side-comparison[data-chart-state="error"]::after {
  position: absolute; inset: 0; display: grid; place-items: center; z-index: 2;
  border-radius: 8px; background: #3e4b56d9; color: #d1dce4; font-size: 12px; font-weight: 700; content: "Loading…";
}
.batter-side-comparison[data-chart-state="empty"]::after { content: "No evaluated pitches for this selection"; }
.batter-side-comparison[data-chart-state="error"]::after { color: #ffd9d9; content: "Couldn't load this chart"; }
/* Pitch speed: how many called pitches have no recorded speed. */
.canvas-slot[data-chart-note]:not([data-chart-note=""])::before {
  position: absolute; right: 8px; bottom: 2px; z-index: 1; color: #b6c8d6; font-size: 9px; content: attr(data-chart-note);
}

/* Live pitcher/catcher tables: the wrapper keeps the card's flex layout; the expanded list scrolls. */
.live-table { display: flex; flex: 1; flex-direction: column; min-height: 0; }
.table-body.is-expanded { max-height: 320px; overflow-y: auto; }
