/* ============================================================
   NFL Stats – supplemental stylesheet (light, kid-friendly)
   Core layout lives in the <style> block inside stats.html
   ============================================================ */

/* ---- Custom scrollbar (Webkit) ---- */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #EAF0F9;
}
::-webkit-scrollbar-thumb {
  background: #B9C8E0;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #93A5C4;
}

/* ---- Player headshots ---- */
.player-headshot {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  background: #EAF0F9;
  flex-shrink: 0;
  border: 2px solid #D4DFEF;
}

.player-headshot-placeholder {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: #EAF0F9;
  border: 2px solid #D4DFEF;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.player-headshot-placeholder svg {
  width: 26px;
  height: 26px;
  fill: #93A5C4;
}

/* ---- Position badge (colors come from script.js inline styles) ---- */
.pos-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* ---- Player row ---- */
.player-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid #E4EBF5;
  transition: background 0.12s;
}

.player-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.player-rank {
  width: 22px;
  font-size: 15px;
  font-weight: 900;
  color: #00338D;
  flex-shrink: 0;
  text-align: center;
  line-height: 1;
}

.player-info {
  flex: 1;
  min-width: 0;
}

.player-name {
  font-size: 16px;
  font-weight: 800;
  color: #10214B;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.player-stat-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  flex-wrap: wrap;
}

.player-stat {
  font-size: 14px;
  font-weight: 700;
  color: #4A5B7D;
  line-height: 1.2;
}

/* ---- Skeleton / shimmer loading ---- */
@keyframes shimmer {
  0%   { background-position: -600px 0; }
  100% { background-position:  600px 0; }
}

.skeleton {
  background: linear-gradient(
    90deg,
    #E4EBF5 25%,
    #F2F6FC 50%,
    #E4EBF5 75%
  );
  background-size: 600px 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: 8px;
}

.skeleton-card {
  height: 130px;
  border-radius: 16px;
}

/* ---- Data note banner ---- */
#data-note {
  background: #E9F1FF;
  border: 1px solid #B9CDF0;
  border-left: 5px solid #00338D;
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 15px;
  font-weight: 700;
  color: #1D3A75;
  margin-bottom: 22px;
  display: none;
  align-items: center;
  gap: 10px;
  line-height: 1.45;
}

#data-note .note-icon {
  font-size: 17px;
  flex-shrink: 0;
  color: #00338D;
}

/* ---- Detail panel scrollbar ---- */
#detail-panel::-webkit-scrollbar {
  width: 6px;
}
#detail-panel::-webkit-scrollbar-track {
  background: #F2F6FC;
}
#detail-panel::-webkit-scrollbar-thumb {
  background: #B9C8E0;
  border-radius: 3px;
}

/* ---- No players placeholder ---- */
.no-players {
  color: #4A5B7D;
  font-size: 15px;
  font-weight: 600;
  padding: 24px 0 8px;
  text-align: center;
  font-style: italic;
}

/* ---- Responsive tweaks ---- */
@media (max-width: 480px) {
  .player-headshot,
  .player-headshot-placeholder {
    width: 42px;
    height: 42px;
  }
  .player-headshot-placeholder svg {
    width: 22px;
    height: 22px;
  }
}

/* ---- Fade-in animation for team grid ---- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.team-card {
  animation: fadeUp 0.25s ease both;
}

.team-card:nth-child(1)  { animation-delay: 0.02s; }
.team-card:nth-child(2)  { animation-delay: 0.04s; }
.team-card:nth-child(3)  { animation-delay: 0.06s; }
.team-card:nth-child(4)  { animation-delay: 0.08s; }
.team-card:nth-child(5)  { animation-delay: 0.10s; }
.team-card:nth-child(6)  { animation-delay: 0.12s; }
.team-card:nth-child(7)  { animation-delay: 0.14s; }
.team-card:nth-child(8)  { animation-delay: 0.16s; }
.team-card:nth-child(9)  { animation-delay: 0.18s; }
.team-card:nth-child(10) { animation-delay: 0.20s; }
.team-card:nth-child(11) { animation-delay: 0.22s; }
.team-card:nth-child(12) { animation-delay: 0.24s; }
.team-card:nth-child(n+13) { animation-delay: 0.26s; }
