/* CueTracker reporting tables: 8 Ball is the visual baseline.
   Opt in only on club/history/profile surfaces, never live scoring or setup. */
[data-ct-table-surface] {
  --ct-table-border: var(--line, var(--border));
  --ct-table-bg: var(--card, var(--surface));
  --ct-table-head: var(--card-2, var(--surface-alt));
  --ct-table-muted: var(--muted, var(--text-muted));
  --ct-table-accent: var(--yellow, var(--gold));
}
[data-ct-table-surface] table {
  width:100%; max-width:100%; min-width:0!important;
  border-collapse:collapse;
  font-family:'Segoe UI',system-ui,-apple-system,BlinkMacSystemFont,sans-serif;
  font-variant-numeric:tabular-nums;
  background:var(--ct-table-bg);
}
[data-ct-table-surface] th {
  background:var(--ct-table-head)!important;
  color:var(--ct-table-muted)!important;
  font-size:.7rem!important; font-weight:800; letter-spacing:.04em;
  padding:10px 12px!important; line-height:1.35; vertical-align:middle;
  border-bottom:1px solid var(--ct-table-border);
}
[data-ct-table-surface] td {
  padding:11px 12px!important;
  border-bottom:1px solid var(--ct-table-border);
  line-height:1.45; vertical-align:middle;
}
[data-ct-table-surface] tbody tr:last-child > td { border-bottom:0; }
[data-ct-table-surface] tbody tr:hover { background:var(--ct-table-head); }
[data-ct-table-surface] div:has(>table) { max-width:100%; overflow-x:auto; }
[data-ct-table-surface] th :is(button,a):focus-visible {
  outline:2px solid var(--ct-table-accent); outline-offset:-2px;
}
@media(max-width:760px) {
  [data-ct-table-surface] table { table-layout:fixed!important; }
  [data-ct-table-surface] :is(th,td) {
    padding:6px 3px!important; min-width:0!important;
    font-size:clamp(.72rem,2.6vw,.85rem)!important;
    white-space:normal!important; overflow-wrap:anywhere; word-break:normal;
  }
  [data-ct-table-surface] th { font-size:clamp(.68rem,2.4vw,.78rem)!important; }
  [data-ct-table-surface] table:has(thead tr > th:nth-child(7)) { min-width:640px!important; table-layout:auto!important; }
  [data-ct-table-surface] table:has(thead tr > th:nth-child(7)) :is(th,td) { padding:9px 10px!important; white-space:nowrap!important; overflow-wrap:normal; }
  [data-ct-table-surface] td :is(button,input,select) { max-width:100%; min-width:0; }
}
@media(prefers-reduced-motion:reduce) {
  [data-ct-table-surface] tr { transition:none; }
}
