.data-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  background: white;
}

thead tr {
  background: var(--brand-dark);
  color: var(--brand-gold);
}

thead th {
  font-family: "Oswald", sans-serif;
  font-weight: 600;
  font-size: 0.7rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 7px 8px;
  text-align: center;
  white-space: nowrap;
  border-right: 1px solid var(--brand-brown);
}

thead th:last-child {
  border-right: none;
}

tbody tr:nth-child(even) {
  background: var(--row-even);
}

tbody tr:hover {
  background: var(--row-hover);
}

tbody td {
  padding: 2px 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}

/* ── INJURY CELL — truncated with click-to-popup ─────── */
.td-injuries {
  max-width: 200px;
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  position: relative;
}

/* Injury popup modal */
.inj-popup-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(26, 14, 8, 0.45);
  z-index: 9000;
  align-items: center;
  justify-content: center;
}

.inj-popup-backdrop.open {
  display: flex;
}

.inj-popup {
  background: white;
  border: 2px solid var(--brand-amber);
  border-radius: 8px;
  padding: 18px 20px 14px;
  max-width: 480px;
  width: 90vw;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}

.inj-popup-label {
  font-family: "Oswald", sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--brand-amber);
  margin-bottom: 8px;
}

.inj-popup-team {
  font-family: "Oswald", sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--brand-dark);
  margin-bottom: 10px;
}

.inj-popup-text {
  font-size: 0.85rem;
  color: var(--text-main);
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 260px;
  overflow-y: auto;
  margin-bottom: 14px;
  padding: 10px 12px;
  background: var(--brand-light);
  border-radius: 4px;
  border: 1px solid var(--border);
}

.inj-popup-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.inj-popup-actions button {
  padding: 5px 14px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-family: "Oswald", sans-serif;
  font-weight: 600;
  font-size: 0.8rem;
  cursor: pointer;
  transition: background 0.12s;
}

.inj-btn-copy {
  background: var(--brand-gold);
  color: var(--brand-dark);
}

.inj-btn-copy:hover {
  background: var(--brand-amber);
}

.inj-btn-copy.copied {
  background: #1e7d38;
  color: white;
}

.inj-btn-close {
  background: white;
  color: var(--text-muted);
  border-color: var(--border) !important;
}

.inj-btn-close:hover {
  background: var(--row-even);
}

.td-rate {
  font-family: "Oswald", sans-serif;
  font-weight: 600;
}

.td-rate.high {
  color: var(--positive);
}

.td-rate.low {
  color: var(--negative);
}

.td-loc {
  font-weight: 700;
  font-family: "Oswald", sans-serif;
  font-size: 0.9rem;
}

.td-loc.home {
  color: var(--positive);
}

.td-loc.away {
  color: var(--text-muted);
}

.td-score {
  font-family: "Oswald", sans-serif;
  font-weight: 600;
  text-align: center;
}

.td-status {
  font-size: 0.75rem;
  color: var(--brand-amber);
  font-weight: 600;
}

.team-link {
  color: var(--brand-brown);
  font-weight: 600;
  text-decoration: none;
}

.team-link:hover {
  color: var(--brand-amber);
  text-decoration: underline;
}

/* ── EMPTY STATE ─────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 60px 24px;
  color: var(--text-muted);
}

.empty-state .empty-icon {
  font-size: 3rem;
  margin-bottom: 12px;
}

.empty-state p {
  font-size: 1rem;
}

/* ── PAGINATION ──────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.pagination a,
.pagination span {
  padding: 5px 11px;
  border-radius: 4px;
  font-size: 0.82rem;
  font-family: "Oswald", sans-serif;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--border);
}

.pagination a {
  color: var(--brand-brown);
  background: white;
}

.pagination a:hover {
  background: var(--brand-amber);
  color: white;
  border-color: var(--brand-amber);
}

.pagination .current {
  background: var(--brand-dark);
  color: var(--brand-gold);
  border-color: var(--brand-dark);
}

.pagination .disabled {
  color: var(--border);
  background: var(--brand-light);
}

/* ── DATE NAV ────────────────────────────────────────── */
.date-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.date-nav a {
  padding: 6px 14px;
  border-radius: var(--radius);
  background: var(--brand-brown);
  color: var(--brand-cream);
  text-decoration: none;
  font-family: "Oswald", sans-serif;
  font-weight: 600;
  font-size: 0.85rem;
  transition: background 0.15s;
}

.date-nav a:hover {
  background: var(--brand-amber);
  color: var(--brand-dark);
}

.date-nav .disabled {
  padding: 6px 14px;
  border-radius: var(--radius);
  background: var(--brand-light);
  color: var(--border);
  font-family: "Oswald", sans-serif;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: not-allowed;
  border: 1px solid var(--border);
}

.date-nav .date-display {
  font-family: "Oswald", sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--brand-dark);
}

.date-nav select {
  padding: 5px 10px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.85rem;
  background: white;
  cursor: pointer;
}

/* ── RATINGS BADGE ───────────────────────────────────── */
.rating-badge {
  display: inline-block;
  padding: 1px 5px;
  border-radius: 3px;
  font-family: "Oswald", sans-serif;
  font-weight: 600;
  font-size: 0.78rem;
  line-height: 1;
  vertical-align: middle;
}

/* ── CATEGORY PILLS (shared: Players list + Player detail) ─ */
.rr-pill {
  font-family: "Oswald", sans-serif;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--brand-dark);
  cursor: pointer;
  white-space: nowrap;
  transition:
    background 0.12s,
    color 0.12s,
    border-color 0.12s;
}
.rr-pill:hover {
  background: var(--brand-brown);
  border-color: var(--brand-amber);
  color: var(--brand-cream);
}
.rr-pill.active {
  background: var(--brand-gold);
  border-color: var(--brand-gold);
  color: var(--brand-dark);
}

.rb-high {
  background: #d4f0db;
  color: #1e7d38;
}

.rb-mid {
  background: #fff5cc;
  color: #8a6500;
}

.rb-low {
  background: #fde0e0;
  color: #b51a1a;
}

/* ── SCHEDULE TABLE (dual-row games) ──────────────────── */
.schedule-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  background: white;
}

.game-away td {
  background: white;
}

.game-home td {
  background: white;
}

.game-stripe .game-away td {
  background: var(--row-even);
}

.game-stripe .game-home td {
  background: var(--row-even);
}

.game-block:hover .game-away td,
.game-block:hover .game-home td {
  background: var(--row-hover) !important;
}

.schedule-table thead tr {
  background: var(--brand-dark);
  color: var(--brand-gold);
}

.schedule-table thead th {
  font-family: "Oswald", sans-serif;
  font-weight: 600;
  font-size: 0.66rem;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  padding: 6px 7px;
  text-align: left;
  white-space: nowrap;
  border-right: 1px solid var(--brand-brown);
}

.schedule-table thead th:last-child {
  border-right: none;
}

.schedule-table tbody td {
  padding: 2px 7px;
  border-right: 1px solid #eee;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}

.schedule-table tbody td:last-child {
  border-right: none;
}

.game-home td {
  border-bottom: 2px solid var(--border);
}

.schedule-table .cell-rowspan {
  border-bottom: 2px solid var(--border);
}

.td-time {
  font-size: 0.76rem;
  color: var(--text-muted);
  vertical-align: middle;
  text-align: center;
}

.td-status {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--brand-amber);
  text-align: center;
}

.td-loc {
  font-family: "Oswald", sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  text-align: center;
}

.td-loc.away {
  color: var(--text-muted);
}

.td-loc.home {
  color: var(--positive);
}

.td-team {
  font-weight: 600;
}

.td-rate {
  text-align: center;
  font-family: "Oswald", sans-serif;
}

.td-ou {
  text-align: center;
  font-size: 0.8rem;
}

.td-score {
  font-family: "Oswald", sans-serif;
  font-weight: 700;
  text-align: center;
}

.td-score.winner {
  color: var(--positive);
}

.td-score.loser {
  color: var(--negative);
}

.td-rot {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
}

.td-conf {
  font-size: 0.74rem;
  color: var(--text-muted);
}

.cell-rowspan {
  vertical-align: middle;
  text-align: center;
}

/* ── CARD GRID ───────────────────────────────────────── */
.sport-card-grid {
  display: grid;
  /* Cards are min 260px wide; browser fills as many columns as fit.
         At 1400px wide → ~5 cols. At 900px → ~3. At 600px → ~2. At <520px → 1. */
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.sport-card {
  background: white;
  border: 2px solid var(--border);
  border-radius: 10px;
  padding: 20px 18px;
  text-decoration: none;
  transition:
    border-color 0.15s,
    transform 0.1s,
    box-shadow 0.15s;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
}

.sport-card:hover {
  border-color: var(--brand-amber);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(196, 124, 26, 0.15);
}

.sport-card .sc-icon {
  font-size: 2.4rem;
}

.sport-card .sc-name {
  font-family: "Oswald", sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--brand-dark);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.sport-card .sc-leagues {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.league-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 2px;
}

.league-pill {
  display: inline-flex;
  flex-direction: column;
  align-items: stretch;
  text-align: center;
  padding: 5px 8px 5px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: linear-gradient(to bottom, #ffffff, #f5f0ea);
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  font-family: "Oswald", sans-serif;
  color: var(--brand-brown);
  text-decoration: none;
  transition:
    background 0.12s,
    box-shadow 0.12s,
    border-color 0.12s,
    transform 0.08s;
}

.league-pill .pill-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.3px;
  line-height: 1.2;
}

.league-pill .pill-count {
  display: block;
  font-size: 0.72rem;
  font-weight: 400;
  opacity: 0.7;
  line-height: 1.2;
}

.league-pill:hover {
  background: linear-gradient(to bottom, var(--brand-amber), #c47c1a);
  color: white;
  border-color: var(--brand-amber);
  box-shadow:
    0 2px 6px rgba(196, 124, 26, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.league-pill:hover .pill-count {
  opacity: 0.85;
}

.league-pill-disabled {
  opacity: 0.38;
  cursor: not-allowed;
  pointer-events: none;
}

/* ── HERO SECTION ────────────────────────────────────── */
.hero {
  background: linear-gradient(
    135deg,
    var(--brand-dark) 0%,
    var(--brand-brown) 100%
  );
  border-radius: 12px;
  padding: 32px 36px;
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.hero img {
  height: 160px;
}

.hero-text {
}

.hero-title {
  font-family: "Oswald", sans-serif;
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--brand-gold);
  text-transform: uppercase;
  letter-spacing: 2px;
  line-height: 1;
}

.hero-subtitle {
  font-size: 0.95rem;
  color: var(--brand-cream);
  margin-top: 6px;
  opacity: 0.8;
}

/* ── Recent features table ──────────────────────────────────────────────── */
table.no-row-hover tbody tr:hover {
  background: inherit;
}

table.no-row-hover tbody tr:nth-child(even):hover {
  background: var(--row-even);
}

.rf-row-latest td {
  background: #fdfaf5;
}

.rf-new-badge {
  display: inline-block;
  background: #2a7fa8;
  color: #fff;
  font-family: "Oswald", sans-serif;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 4px;
  vertical-align: middle;
  margin-right: 5px;
}

.rf-fix-badge {
  display: inline-block;
  background: #dc3545;
  color: #fff;
  font-family: "Oswald", sans-serif;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding: 1px 5px;
  border-radius: 3px;
  vertical-align: middle;
  margin-right: 5px;
}

/* ── League card layout ─────────────────────────────────────────────────── */
/* Card shell — replaces the old inline styles on the active card div */
.lc-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: white;
  border: 2px solid var(--border);
  border-radius: 10px;
  padding: 18px;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}

.lc-card-empty {
  background: #f7f6f4;
  border: 2px dashed var(--border);
  opacity: 0.55;
}

.lc-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 2px;
}

/* Icon sizing — explicit dimensions beat browser img default */
.lc-header img {
  height: 40px;
  width: 40px;
  object-fit: contain;
  flex-shrink: 0;
}

.lc-card-empty .lc-header img {
  height: 36px;
  width: 36px;
  opacity: 0.6;
}

.lc-abbr {
  font-family: "Oswald", sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--brand-dark);
}

.lc-card-empty .lc-abbr {
  color: var(--text-muted);
}

.lc-name {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ── Three equal-width pill columns ─────────────────────────────────────── */
.lc-pills {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}

.lc-pill-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

/* Force pills to fill column width */
.lc-pill-col .league-pill,
.lc-pill-col .league-pill-disabled {
  display: flex;
  width: 100%;
  box-sizing: border-box;
  justify-content: center;
}

/* ── Search button — styled to complement the pills ─────────────────────── */
.lc-sw-wrap {
  position: relative;
  width: 100%;
}

.lc-sw-btn {
  width: 100%;
  box-sizing: border-box;
  padding: 4px 8px;
  font-family: "Oswald", sans-serif;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.3px;
  text-align: center;
  background: linear-gradient(to bottom, #ffffff, #f5f0ea);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--brand-brown);
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  transition:
    background 0.12s,
    box-shadow 0.12s,
    border-color 0.12s,
    transform 0.08s;
  white-space: nowrap;
}

.lc-sw-btn:hover {
  background: linear-gradient(to bottom, var(--brand-amber), #c47c1a);
  color: white;
  border-color: var(--brand-amber);
  box-shadow: 0 2px 6px rgba(196, 124, 26, 0.35);
  transform: translateY(-1px);
}

/* ── Popover — absolute so it never affects card height ─────────────────── */
.lc-popover {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 9999;
  background: white;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.13);
  width: 220px;
  overflow: hidden;
}

.lc-search-wrap {
  padding: 7px 8px;
  border-bottom: 1px solid var(--border);
}

.lc-search {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 4px 7px;
  font-size: 0.8rem;
  font-family: "Source Sans 3", sans-serif;
  outline: none;
}

.lc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 240px;
  overflow-y: auto;
}

.lc-list li {
  list-style: none;
  padding: 0;
  margin: 0;
}

.lc-list li a {
  display: block;
  padding: 7px 12px;
  font-size: 0.82rem;
  color: var(--brand-dark);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  background: white;
}

.lc-list li:last-child a {
  border-bottom: none;
}

.lc-list li a:hover {
  background: var(--row-hover);
}

.lc-list li a .lc-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-left: 4px;
}

/* ── Mobile / small screen overrides ────────────────────────────────────── */
/* Trigger: width <= 768px OR height <= 500px (landscape phone) */
@media (max-width: 768px), (max-height: 500px) {
  /* Schedule date nav — hide Go to date controls, keep on one row */
  .date-nav {
    flex-wrap: nowrap;
    gap: 6px;
  }

  .date-nav-goto {
    display: none;
  }
}
