/* =========================
   Game Tables (Consolidated Component)
   Extracted from main.css
   ========================= */

/* =========================
   Game Tables (Consolidated Component)
   ========================= */
.vegas-wrap,
.banker-wrap {
  overflow-x: auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x pan-y;
  overscroll-behavior: contain;
  padding-bottom: 14px;
  border: 2px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
  scroll-behavior: auto;
}

/* Desktop wheel should continue scrolling naturally when hovering table cells. */
@media (hover: hover) and (pointer: fine) {
  .vegas-wrap,
  .banker-wrap {
    overscroll-behavior: auto;
    overscroll-behavior-y: auto;
  }
}
.vegas-table,
.banker-table,
.skins-table,
.junk-table {
  width: max(100%, 720px);
  border-collapse: separate;
  border-spacing: 0;
}

.banker-table,
.skins-table,
.junk-table {
  width: max(100%, 820px);
}

.vegas-table th,
.vegas-table td,
.banker-table th,
.banker-table td,
.skins-table th,
.skins-table td,
.junk-table th,
.junk-table td {
  border-bottom: 2px solid var(--line);
  padding: 4px 6px;
  text-align: center;
  white-space: nowrap;
  font-size: var(--text-lg);
}

.vegas-table thead th,
.banker-table thead th,
.skins-table thead th,
.junk-table thead th {
  position: sticky;
  top: var(--game-sticky-head-top, 0px);
  background: var(--panel-alt);
  padding-top: calc(4px * var(--game-header-height-scale, 1));
  padding-bottom: calc(4px * var(--game-header-height-scale, 1));
  z-index: var(--z-sticky-header);
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

/* Let touch drags started on locked game headers continue scrolling the table pane. */
.vegas-table thead th,
.banker-table thead th,
.skins-table thead th,
.junk-table thead th,
#wolfTable thead th,
#hiloTable thead th,
#hiloHoleTable thead th {
  touch-action: pan-x pan-y;
}

#vegasTable thead th,
#bankerTable thead th,
#skinsTable thead th,
#junkTable thead th,
#wolfTable thead th,
#hiloTable thead th,
#hiloHoleTable thead th {
  top: var(--game-sticky-head-top, 0px);
  padding-top: calc(4px * var(--game-header-height-scale, 1));
  padding-bottom: calc(4px * var(--game-header-height-scale, 1));
}

.vegas-table thead th:first-child,
.banker-table thead th:first-child,
.skins-table thead th:first-child,
.junk-table thead th:first-child {
  z-index: var(--z-sticky-corner);
  background-color: var(--panel);
}

.vegas-table tfoot td,
.banker-table tfoot td,
.skins-table tfoot td,
.junk-table tfoot td {
  background: var(--panel-alt);
  font-weight: 700;
  height: var(--touch-min);
  padding: 8px;
  font-size: var(--text-lg);
}

.vegas-table tfoot tr:first-child td,
.banker-table tfoot tr:first-child td,
.skins-table tfoot tr:first-child td,
.junk-table tfoot tr:first-child td {
  border-top: 2px solid var(--line);
}

.vegas-table tfoot tr:last-child td,
.banker-table tfoot tr:last-child td,
.skins-table tfoot tr:last-child td,
.junk-table tfoot tr:last-child td {
  border-bottom: none;
}

/* Restore bottom border on the last player row in skins tbody —
   the global tr:last-child rule strips it. */
#skinsBody tr:last-child td,
#skinsBody tr:last-child th {
  border-bottom: 2px solid var(--line);
}

/* Restore bottom border on the last Hi-Lo results row —
   the global tr:last-child rule strips it. */
#hiloResultsBody tr:last-child td,
#hiloResultsBody tr:last-child th {
  border-bottom: 2px solid var(--line);
}

/* Restore bottom border on the last Hi-Lo hole-by-hole row —
   the global tr:last-child rule strips it. */
#hiloHoleBody tr:last-child td,
#hiloHoleBody tr:last-child th {
  border-bottom: 2px solid var(--line);
}

/* Restore bottom border on last rows for game hole/result tables —
   the global tr:last-child rule strips it. */
#vegasBody tr:last-child td,
#vegasBody tr:last-child th,
#bankerBody tr:last-child td,
#bankerBody tr:last-child th,
#junkBody tr:last-child td,
#junkBody tr:last-child th,
#wolfBody tr:last-child td,
#wolfBody tr:last-child th {
  border-bottom: 2px solid var(--line);
}

.vegas-table tfoot td:first-child,
.banker-table tfoot td:first-child,
.skins-table tfoot td:first-child,
.junk-table tfoot td:first-child {
  text-align: left;
  padding-left: 12px;
  background: var(--panel-alt);
}

.vegas-table th:first-child,
.vegas-table td:first-child,
.banker-table th:first-child,
.banker-table td:first-child,
.skins-table th:first-child,
.skins-table td:first-child,
.junk-table th:first-child,
.junk-table td:first-child {
  width: 40px;
  min-width: 40px;
  padding-left: 4px;
  padding-right: 4px;
  position: sticky;
  left: 0;
  background-color: var(--panel);
  z-index: var(--z-sticky-col);
  border-right: 2px solid var(--line);
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

#junkTable thead th:first-child,
#junkTable tbody td:first-child,
#wolfTable thead th:first-child,
#wolfTable tbody td:first-child {
  width: 52px !important;
  min-width: 52px !important;
}

/* =========================================================================
   Light theme overrides — moved from light-theme-overrides.css
   ========================================================================= */

:root[data-theme="light"] .vegas-table thead th,
:root[data-theme="light"] .banker-table thead th,
:root[data-theme="light"] .skins-table thead th,
:root[data-theme="light"] .junk-table thead th,
:root[data-theme="light"] .vegas-table tfoot td,
:root[data-theme="light"] .banker-table tfoot td,
:root[data-theme="light"] .skins-table tfoot td,
:root[data-theme="light"] .junk-table tfoot td {
  background: #e5ecf2;
  color: #1a1c1f;
}
