/* Player summaries, season history and cup history */
.cvsl-table--playerseason-summary, 
.cvsl-table--active-players, 
.cvsl-table--inactive-players,
.cvsl-table--registered-players,
.cvsl-table--player-handicaps,
.cvsl-table--player-results,
.cvsl-table--player-high-breaks
{
  width: 100% !important;
  max-width: none !important;
  table-layout: fixed;
  display: table;
  border-collapse: collapse;
}

.cvsl-table--playerseason-summary tbody,
.cvsl-table--playerseason-summary thead,
.cvsl-table--active-players tbody,
.cvsl-table--active-players thead,
.cvsl-table--inactive-players tbody,
.cvsl-table--inactive-players thead,
.cvsl-table--registered-players tbody,
.cvsl-table--registered-players thead,
.cvsl-table--player-handicaps tbody,
.cvsl-table--player-handicaps thead,
.cvsl-table--player-results tbody,
.cvsl-table--player-results thead,
.cvsl-table--player-high-breaks tbody,
.cvsl-table--player-high-breaks thead
{
  width: 100%;
}

.cvsl-table--playerseason-summary th:first-child,
.cvsl-table--playerseason-summary td:first-child  { width: 30%; text-align: center; }
.cvsl-table--playerseason-summary th:nth-child(2),
.cvsl-table--playerseason-summary td:nth-child(2) { width: 30%; text-align: center }
.cvsl-table--playerseason-summary th:nth-child(n + 3):not(:last-child),
.cvsl-table--playerseason-summary td:nth-child(n + 3):not(:last-child) { width: 10%; text-align: center; }
.cvsl-table--playerseason-summary th:last-child,
.cvsl-table--playerseason-summary td:last-child { width: 5%; text-align: center; }

.cvsl-table--active-players th:first-child, 
.cvsl-table--active-players td:first-child { width: 30%; text-align: left; }
.cvsl-table--active-players th:nth-child(2),
.cvsl-table--active-players td:nth-child(2) { width: 20%; text-align: center }
.cvsl-table--active-players th:nth-child(3),
.cvsl-table--active-players td:nth-child(3) { width: 20%; text-align: center }
.cvsl-table--active-players th:nth-child(n + 4):not(:last-child),
.cvsl-table--active-players td:nth-child(n + 4):not(:last-child) { width: 10%; text-align: center;}
.cvsl-table--active-players th:last-child
.cvsl-table--active-players td:last-child { width: 5%; text-align: center; }

.cvsl-table--inactive-players th:first-child,
.cvsl-table--inactive-players td:first-child { width: 30%; text-align: left; }
.cvsl-table--inactive-players th:nth-child(2),
.cvsl-table--inactive-players td:nth-child(2) { width: 30%; text-align: center }
.cvsl-table--inactive-players th:nth-child(3),
.cvsl-table--inactive-players td:nth-child(3) { width: 30%; text-align: center }
.cvsl-table--inactive-players th:last-child,
.cvsl-table--inactive-players td:last-child { width: 5%; text-align: center; }

.cvsl-table--registered-players th:first-child,
.cvsl-table--registered-players td:first-child { width: 60%; text-align: left; overflow-wrap: anywhere; }
.cvsl-table--registered-players th:nth-child(2),
.cvsl-table--registered-players td:nth-child(2) { width: 35%; text-align: center }
.cvsl-table--registered-players th:last-child,
.cvsl-table--registered-players td:last-child { width: 5%; text-align: center; }

.cvsl-table--player-handicaps th:first-child, 
.cvsl-table--player-handicaps td:first-child { width: 30%; text-align: center; }
.cvsl-table--player-handicaps th:nth-child(2),
.cvsl-table--player-handicaps td:nth-child(2) { width: 35%; text-align: center }
.cvsl-table--player-handicaps th:nth-child(3),
.cvsl-table--player-handicaps td:nth-child(3) { width: 30%; text-align: center }
.cvsl-table--player-handicaps th:last-child
.cvsl-table--player-handicaps td:last-child { width: 5%; text-align: center; }

/* Player match history uses fixture rows and reserves a fixed action area. */
.cvsl-table--player-results th:first-child,
.cvsl-table--player-results td:first-child { width: auto; text-align: right; }
.cvsl-table--player-results th:nth-child(2),
.cvsl-table--player-results td:nth-child(2) { text-align: center; }
.cvsl-table--player-results th:nth-child(3),
.cvsl-table--player-results td:nth-child(3) { width: auto; text-align: left }
.cvsl-table--player-results th:last-child,
.cvsl-table--player-results td:last-child { width: 5%; text-align: center; }

.cvsl-table--player-results tbody tr[data-target] > td:last-child::after {
  content: "›";
  position: absolute;
  top: 50%;
  right: 0.8rem;
  color: var(--color-subtle);
  font-size: 1.75rem;
  font-weight: 400;
  line-height: 1;
  transform: translateY(-52%);
}

.cvsl-table--player-results .result-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin-bottom: 0.15rem;
  width: auto;
}

.cvsl-table--player-results .result-win,
.cvsl-table--player-results .result-loss {
  display: inline-grid;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: var(--radius-xs);
  color: var(--color-white);
  font-weight: 800;
  place-items: center;
}

.cvsl-table--player-results .result-win { background: var(--color-snooker-green); }
.cvsl-table--player-results .result-loss { background: var(--color-ball-red); }
.cvsl-table--player-results .result-score { font-weight: 800; }

.cvsl-table--player-high-breaks th:first-child,
.cvsl-table--player-high-breaks td:first-child { width: 30%; text-align: center; }
.cvsl-table--player-high-breaks th:nth-child(2),
.cvsl-table--player-high-breaks td:nth-child(2) { width: 35%;   text-align: center;   font-weight: 800; }
.cvsl-table--player-high-breaks th:nth-child(3),
.cvsl-table--player-high-breaks td:nth-child(3) { width: 30%;   text-align: center; }
.cvsl-table--player-high-breaks th:last-child,
.cvsl-table--player-high-breaks td:last-child { width: 5%; text-align: center; }
