.ev { padding: 64px 0; }
.ev-header { display: flex; align-items: baseline; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.ev-title { margin: 0; }
.ev-subtitle { color: var(--color-text-tertiary); font-size: 0.9rem; }

.ev-controls { display: grid; grid-template-columns: repeat(4, minmax(140px, 1fr)); gap: 12px; margin-bottom: 20px; }
.control-group { display: flex; flex-direction: column; gap: 6px; }
.control-group.grow { grid-column: span 3; }
.control-group label { color: var(--color-text-secondary); font-size: 0.85rem; }
.control-group input, .control-group select { padding: 10px 12px; border-radius: 10px; border: 1px solid var(--color-border-light); background: var(--color-surface-primary); color: var(--color-text-primary); }
.control-inline { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

.ev-table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  border-radius: 16px;
  border: 1px solid var(--color-border-light);
  background: var(--color-surface-primary);
  position: relative;
}
.ev-table { width: 100%; border-collapse: separate; border-spacing: 0; min-width: 1200px; table-layout: fixed; }
.ev-table thead th { position: sticky; top: 0; z-index: 10; background: var(--color-surface-primary); border-bottom: 1px solid var(--color-border-light); padding: 10px 12px; text-align: left; color: var(--color-text-secondary); font-weight: 700; font-size: 0.85rem; }
.ev-table tbody td { padding: 12px; border-bottom: 1px solid var(--color-border-light); vertical-align: middle; }
.ev-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.ev-table .th-player { width: 220px; }
.ev-table .th-team, .ev-table .th-opp, .ev-table .th-start, .ev-table .th-sport, .ev-table .th-prop-type, .ev-table .th-ou { white-space: nowrap; }
/* Adjust specific column widths */
.ev-table .th-ou { width: 72px; }
.ev-table .th-prop-type { width: 170px; }
.ev-table .th-line { width: 64px; }
.ev-table .th-odds { width: 76px; }
.ev-table .th-start { width: 125px; }
.ev-table .th-sport { width: 60px; }
.ev-table .th-win { width: 90px; }
.ev-table .th-ev { width: 90px; }
.ev-table .th-units { width: 90px; }
.ev-table .th-team { width: 64px; }
.ev-table .th-opp { width: 64px; }
.ev-table .td-prop-type { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev-table .td-ou, .ev-table .td-line, .ev-table .td-odds, .ev-table .td-start, .ev-table .td-sport, .ev-table .td-team, .ev-table .td-opp, .ev-table .td-win, .ev-table .td-ev, .ev-table .td-units { white-space: nowrap; }
.ev-table .td-player .name { font-weight: 700; color: var(--color-text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev-table .td-player .meta { color: var(--color-text-tertiary); font-size: 0.8rem; }
.ev-table .strong { font-weight: 800; color: var(--color-primary); }
.ev-empty { text-align: center; color: var(--color-text-secondary); }

/* Freeze first column (Player) */
.ev-table thead th:first-child,
.ev-table tbody td:first-child {
  position: sticky;
  left: 0;
  z-index: 11;
  background: var(--color-surface-primary);
}

/* Ensure header cell has higher z-index */
.ev-table thead th:first-child { z-index: 12; }

/* Win percentage coloring */
.win-pct.win-high { color: var(--color-primary); }
.win-pct.win-med { color: var(--color-warning-dark); }
.win-pct.win-low { color: var(--color-error); }

/* EV coloring */
.ev-pct.ev-high { color: var(--color-primary); }
.ev-pct.ev-med { color: var(--color-warning-dark); }
.ev-pct.ev-low { color: var(--color-error); }

/* Make green variants bold */
.win-pct.win-high,
.ev-pct.ev-high { font-weight: 800; }

/* Bet units coloring */
.units-high { color: var(--color-primary); font-weight: 800; }
.units-low { color: var(--color-error); }

@media (max-width: 768px) {
  /* Prevent page-level horizontal scrolling on this page */
  html, body { overflow-x: hidden; }
  .ev { padding: 24px 0; }
  .ev-header, .ev-controls { padding: 0 16px; }
  .ev-controls { grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 16px; }
  .control-group.grow { grid-column: span 2; }
  .ev-table-wrap { 
    border-radius: 12px; 
    max-width: 100vw; 
    margin: 0; 
  }
  .ev-table { min-width: 720px; }
  .ev-table thead th { 
    font-size: 0.75rem; 
    padding: 8px;
    white-space: nowrap;
  }
  .ev-table tbody td { padding: 8px; font-size: 0.85rem; }
  .ev-table .th-player { width: 200px; }
  .ev-table .th-prop-type { width: 200px; }
  .ev-table .th-line { width: 90px; }
  .ev-table .th-odds { width: 90px; }
  .ev-table .th-start { width: 110px; }
  .ev-table .th-sport { width: 80px; }
  .ev-table .th-win { width: 90px; }
  .ev-table .th-ev { width: 80px; }
  .ev-table .th-units { width: 120px; }
}


