/* The Players table scrolls within its own panel, like the Draft player table.
   This gives the sticky headings the same vertical scroll container on both pages. */
.player-stats-scroll {
  max-height: min(72vh, 720px);
  overscroll-behavior: contain;
}

.player-stats-scroll thead th,
.draft-available thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f4f6f8;
  box-shadow: 0 1px 0 var(--line), 0 3px 5px rgba(20, 40, 60, .12);
}

.visible-rank {
  width: 36px;
  min-width: 36px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

/* The current lineup slot itself opens the move menu. Empty bench rows stay plain text. */
.roster-slot-select {
  width: 80px;
  padding: 5px 4px;
  font-weight: 700;
}

.draft-team-and-queue {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 16px 0;
}
.draft-commissioner-controls { flex-wrap: wrap; }
.draft-undo-target { display: block; max-width: 190px; color: var(--muted); overflow-wrap: anywhere; }
.draft-team-and-queue > .panel { min-width: 0; margin: 0; }
.draft-actions { white-space: nowrap; }
.draft-actions button + button { margin-left: 6px; }
.queue-row {
  display: flex;
  align-items: center;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding: 10px 0;
}
.queue-row .queue-number { min-width: 24px; font-variant-numeric: tabular-nums; }
.queue-player { flex: 1; min-width: 0; }
.queue-player strong, .queue-player small { display: block; overflow-wrap: anywhere; }
.queue-player small { color: var(--muted); }
.queue-taken .queue-player { opacity: .6; }
.queue-buttons { display: flex; gap: 4px; flex-wrap: wrap; }
.queue-buttons button { min-width: 34px; padding: 6px 8px; }
@media (max-width: 850px) {
  .draft-team-and-queue { grid-template-columns: minmax(0, 1fr); }
}

.team-picker .filterbar { align-items: end; }
.team-picker p { margin-bottom: 0; }
.team-identity > a { display: inline-flex; align-items: center; gap: 8px; }
.matchup-overview-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.matchup-overview-card { position: relative; display: grid; gap: 6px; padding: 12px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.matchup-overview-card.selected { border-color: var(--blue); background: #f0f6fd; }
.matchup-card-hit { position: absolute; inset: 0; z-index: 1; }
.matchup-card-hit:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.matchup-card-team { position: relative; z-index: 2; display: inline-flex; align-items: center; gap: 8px; width: fit-content; max-width: 100%; }
.matchup-card-team strong { white-space: normal; overflow-wrap: anywhere; }
.matchup-card-score { font-weight: 800; font-size: 17px; }
.player-stat-link { background: none; border: 0; padding: 0; color: var(--blue); font: inherit; font-weight: 700; cursor: pointer; text-align: left; }
.player-stat-link:hover { text-decoration: underline; }
.player-stat-link:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.round-board .player-stat-link { display: block; white-space: normal; }
.player-stat-modal { border: 1px solid var(--line); border-radius: 8px; width: min(94vw, 480px); max-height: 88vh; padding: 22px; color: var(--text); box-shadow: 0 18px 55px rgba(0,0,0,.25); }
.player-stat-modal::backdrop { background: rgba(9, 24, 39, .65); }
.player-stat-modal-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 15px; }
.player-stat-modal-header small { color: var(--muted); }
.player-stat-modal-header h2 { margin: 4px 0; }
.player-stat-modal-header p { margin: 0 0 14px; color: var(--muted); }
.player-stat-modal-table th { background: none; border-bottom: 1px solid var(--line); text-transform: none; font-size: 12px; letter-spacing: 0; }
.player-stat-modal-table td { text-align: right; }
