/* ==============================
   NFL Recap Stats (isolated)
   ============================== */

.nflstats { margin: 24px 0; }

/* ---------- Tabs (sticky overlay) ---------- */
.nflstats .nflstats-tabs{
  position: sticky; top: 64px; z-index: 40;
  display:flex; gap:8px; align-items:center; justify-content:center;
  background: rgba(243,245,249,.9); backdrop-filter: blur(8px);
  padding:6px; border-radius:999px; width:fit-content; margin:0 auto 16px;
  border:1px solid #e5e7eb; box-shadow: 0 6px 20px rgba(0,0,0,.06);
}
.nflstats .nflstats-tab{
  display:inline-flex; align-items:center; gap:8px;
  border:0; border-radius:999px; padding:8px 14px; cursor:pointer;
  font-weight:700; background:transparent; color:#0f172a;
}
.nflstats .nflstats-tab img{ width:20px; height:20px; }
.nflstats .nflstats-tab.is-active{ background:#fff; box-shadow:0 1px 3px rgba(0,0,0,.06); }

/* ---------- Desktop centering wrapper ---------- */
.nflstats-center{ max-width: 1200px; margin: 0 auto; padding: 0 16px; }

/* ---------- Scroll shell ---------- */
.nflstats .nflstats-scroll{
  position:relative; overflow-x:auto; overflow-y:hidden;
  -webkit-overflow-scrolling:touch;
  border-radius:14px; background:#fff; box-shadow:0 8px 24px rgba(0,0,0,.06);
}

/* ---------- Table base ---------- */
.nflstats .nflstats-table{
  border-collapse:separate; border-spacing:0;
  width:max-content; min-width:900px;   /* desktop default */
  margin:0 auto;
  font:14px/1.4 system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  color:#111827;
}
.nflstats .nflstats-table th,
.nflstats .nflstats-table td{
  padding:10px 12px;
  border-bottom:1px solid #e6e9ee;
  text-align:center; vertical-align:middle; white-space:nowrap;
  background:#fff; color:#111;
}

/* Sticky first column (desktop defaults) */
.nflstats .nflstats-table th:first-child,
.nflstats .nflstats-table td:first-child{
  position:sticky; left:0; z-index:2;
  text-align:left; min-width:180px;
  box-shadow:1px 0 0 rgba(0,0,0,.06);
  font-weight:700; color:#111; background:#fff;
}

/* ---------- Sticky header rows (desktop) ---------- */
.nflstats .nflstats-table thead tr.rankings-row th{ position:sticky; top:0; z-index:4; }
.nflstats .nflstats-table thead tr.averages-row th{ position:sticky; top:42px; z-index:4; }

.nflstats .nflstats-table thead tr.rankings-row th{ background:#f5f7fa; color:#111; font-weight:800; }
.nflstats .nflstats-table thead tr.averages-row th{ background:#f7f9fc; color:#111; font-weight:800; }
.nflstats .nflstats-table thead tr.rankings-row th.label{ background:#eef2f7; }
.nflstats .nflstats-table thead tr.averages-row th.label{ background:#eef5ff; }

/* Column labels row */
.nflstats .nflstats-table tbody tr.labels th,
.nflstats .nflstats-table tbody tr.labels td{
  background:#0b2948; color:#fff !important; font-weight:800; letter-spacing:.02em;
  border-bottom:1px solid #05203a;
}

.nflstats .nflstats-table thead tr.labels th,
.nflstats .nflstats-table thead tr.labels td {
  background:#0b2948;
  color:#fff !important;
  font-weight:800;
  letter-spacing:.02em;
  border-bottom:1px solid #05203a;
}
.nflstats .nflstats-table tbody tr.labels th:first-child{ background:#092340; }

/* Body rows */
.nflstats .nflstats-table tbody tr{ background:#fff; color:#111827; }
.nflstats .nflstats-table tbody tr:nth-child(odd){ background:#fbfdff; }
.nflstats .nflstats-table tbody tr:hover{ background:#f6f8fb; }

/* Team totals */
.nflstats .nflstats-table tbody tr.team-totals th,
.nflstats .nflstats-table tbody tr.team-totals td{
  background:#1f2937; color:#fff; font-weight:800;
}

/* Empty cell helper */
.nflstats .nflstats-table th:empty,
.nflstats .nflstats-table td:empty{ background:#e5e7eb; }

/* Ranking heatmap */
.nflstats .ranking-cell[data-rank="1"],
.nflstats .ranking-cell[data-rank="2"],
.nflstats .ranking-cell[data-rank="3"],
.nflstats .ranking-cell[data-rank="4"],
.nflstats .ranking-cell[data-rank="5"],
.nflstats .ranking-cell[data-rank="6"],
.nflstats .ranking-cell[data-rank="7"],
.nflstats .ranking-cell[data-rank="8"]   { background:#22c55e !important; color:#fff !important; }
.nflstats .ranking-cell[data-rank="9"],
.nflstats .ranking-cell[data-rank="10"],
.nflstats .ranking-cell[data-rank="11"],
.nflstats .ranking-cell[data-rank="12"],
.nflstats .ranking-cell[data-rank="13"],
.nflstats .ranking-cell[data-rank="14"],
.nflstats .ranking-cell[data-rank="15"],
.nflstats .ranking-cell[data-rank="16"]  { background:#6b7280 !important; color:#fff !important; }
.nflstats .ranking-cell[data-rank="17"],
.nflstats .ranking-cell[data-rank="18"],
.nflstats .ranking-cell[data-rank="19"],
.nflstats .ranking-cell[data-rank="20"],
.nflstats .ranking-cell[data-rank="21"],
.nflstats .ranking-cell[data-rank="22"],
.nflstats .ranking-cell[data-rank="23"],
.nflstats .ranking-cell[data-rank="24"]  { background:#fde047 !important; color:#111 !important; }
.nflstats .ranking-cell[data-rank="25"],
.nflstats .ranking-cell[data-rank="26"],
.nflstats .ranking-cell[data-rank="27"],
.nflstats .ranking-cell[data-rank="28"],
.nflstats .ranking-cell[data-rank="29"],
.nflstats .ranking-cell[data-rank="30"],
.nflstats .ranking-cell[data-rank="31"],
.nflstats .ranking-cell[data-rank="32"]  { background:#ef4444 !important; color:#fff !important; }

/* ===========================
   MOBILE (<= 768px)
   =========================== */
@media (max-width:768px){
  .nflstats .nflstats-table{ margin:0; min-width:600px; font-size:12px; line-height:1.3; }
  .nflstats .nflstats-table th,
  .nflstats .nflstats-table td{ padding:7px 6px; }

  /* first column narrow + ellipsis */
  .nflstats .nflstats-table th:first-child,
  .nflstats .nflstats-table td:first-child{
    min-width:84px; max-width:108px;
    white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
    z-index:3; background:#fff;
  }

  /* hide rankings/averages; avoid sticky collisions */
  .nflstats .nflstats-table thead tr.rankings-row,
  .nflstats .nflstats-table thead tr.averages-row{ display:none; }

  /* make the dark labels row the only sticky header */
  .nflstats .nflstats-table tbody tr.labels th,
  .nflstats .nflstats-table tbody tr.labels td{
    position:sticky; top:0; z-index:4; background:#0b2948; color:#fff !important;
  }
  .nflstats .nflstats-table tbody tr.labels th:first-child{ z-index:5; background:#092340; }


/* ==============================
   COMPACT TABLES (few columns)
   Only compact below desktop.
   ============================== */

/* Desktop (>=1024px): keep normal wide defaults */
@media (min-width:1024px){
  .nflstats .nflstats-table--compact{ min-width:900px; }
  .nflstats .nflstats-table--compact th:first-child,
  .nflstats .nflstats-table--compact td:first-child{ min-width:180px; max-width:none; }
}

/* Tablet (768–1023px): moderately compact */
@media (min-width:768px) and (max-width:1023px){
  .nflstats .nflstats-table--compact{ min-width:520px; }
  .nflstats .nflstats-table--compact th:first-child,
  .nflstats .nflstats-table--compact td:first-child{ min-width:130px; max-width:180px; }
  .nflstats .nflstats-table--compact th,
  .nflstats .nflstats-table--compact td{ padding-left:10px; padding-right:10px; }
}

/* Mobile (<=767px): tight */
@media (max-width:767px){
  .nflstats .nflstats-table--compact{ min-width:360px; }
  .nflstats .nflstats-table--compact th:first-child,
  .nflstats .nflstats-table--compact td:first-child{ min-width:100px; max-width:140px; }
  .nflstats .nflstats-table--compact th,
  .nflstats .nflstats-table--compact td{ padding-left:8px; padding-right:8px; }

  /* keep last numeric column tight & centered for compact tables like Receiving */
  .nflstats .nflstats-table--compact tr > *:last-child{
    min-width:60px; max-width:80px; text-align:center;
  }
}

/* Base style for player links (desktop + default) */
.player-link {
  color: #2563eb;           /* blue-600 */
  font-weight: 600;
  text-decoration: none;
}
.player-link:hover {
  text-decoration: underline;
}

/* --- Mobile override (<=768px) --- */
@media (max-width: 768px) {
  .player-link {
    color: #2563eb;         /* same blue as desktop */
    font-weight: 600;
    text-decoration: none;
  }
  .player-link:hover {
    text-decoration: underline;
  }
}
