/* Games in Hand viz (WVIZ-350). Table follows the RFS/standings table
   pattern; chart styles land with the chart. */

.games-in-hand__table-wrap {
  overflow-x: auto;
}

.games-in-hand__table {
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
  width: 100%;
}

.games-in-hand__caption {
  color: var(--color-text-muted, #94a0b2);
  font-size: var(--fs-caption);
  padding-block: var(--space-2);
  text-align: left;
}

.games-in-hand__th,
.games-in-hand__td {
  border-bottom: 1px solid var(--color-border, #2a3444);
  padding: var(--space-2) var(--space-3);
  text-align: left;
}

.games-in-hand__th {
  color: var(--color-text-muted, #94a0b2);
  font-size: var(--fs-caption);
  font-weight: var(--fw-semibold);
}

.games-in-hand__th--numeric,
.games-in-hand__td--numeric {
  font-family: var(--font-tabular);
  text-align: right;
}

.games-in-hand__th--bold,
.games-in-hand__td--bold {
  font-weight: var(--fw-bold);
}

.games-in-hand__team-link {
  align-items: center;
  color: var(--color-text, #e0e4ea);
  display: inline-flex;
  gap: var(--space-2);
  text-decoration: none;
}

.games-in-hand__team-logo {
  height: 20px;
  width: 20px;
}

.games-in-hand__team-abbr {
  display: none;
}

.games-in-hand__team-link:hover .games-in-hand__team-name,
.games-in-hand__team-link:hover .games-in-hand__team-abbr {
  text-decoration: underline;
}

@media (width <= 640px) {
  .games-in-hand__team-name {
    display: none;
  }

  .games-in-hand__team-abbr {
    display: inline;
  }
}

.games-in-hand__movement--up {
  color: var(--color-status-positive);
}

.games-in-hand__movement--down {
  color: var(--color-status-negative);
}

.games-in-hand__movement--flat {
  color: var(--color-text-muted, #94a0b2);
}

.games-in-hand__no-data,
.games-in-hand__caveat,
.games-in-hand__footnote {
  color: var(--color-text-muted, #94a0b2);
  font-size: var(--fs-body-sm);
}

.games-in-hand__chart {
  margin-block-start: var(--space-6);
}

.games-in-hand__chart-title {
  font-size: var(--fs-h3);
  margin-block-end: var(--space-3);
}

.games-in-hand__svg {
  display: block;
  height: auto;
  max-width: 100%;
  width: 100%;
}

.games-in-hand__axis,
.games-in-hand__gridline {
  stroke: var(--color-border, #2a3444);
  stroke-width: 1;
}

.games-in-hand__gridline {
  opacity: 0.4;
}

.games-in-hand__tick-label {
  fill: var(--color-text-muted, #94a0b2);
  font-family: var(--font-tabular);
  font-size: 12px;
}

/* Evens label: positive-status color to match the marker, plus a background-
   colored halo (paint-order: stroke) so it stays legible over the plot lines
   and gridlines instead of blending into them. */
.games-in-hand__evens-label {
  fill: var(--color-status-positive);
  font-family: var(--font-tabular);
  font-size: 12px;
  font-weight: var(--fw-semibold);
  paint-order: stroke;
  stroke: var(--color-bg);
  stroke-linejoin: round;
  stroke-width: 3px;
}

/* Standalone callout pill above the chart (WVIZ-357). Reuses .pill--positive
   for color, sized up from the nano chip so it reads as a headline stat. */
.games-in-hand__evens-callout {
  height: auto;
  margin-block: 0 var(--space-4);
  padding: var(--space-1) var(--space-3);
  font-size: var(--fs-caption);
  border-radius: var(--radius-full);
}

.games-in-hand__evens-check {
  margin-inline-end: var(--space-1);
  font-weight: var(--fw-bold);
}

.games-in-hand__today {
  stroke: var(--color-text-muted, #94a0b2);
  stroke-dasharray: 2 3;
  stroke-width: 1;
}

.games-in-hand__evens-marker {
  fill: var(--color-status-positive);
}

.games-in-hand__line {
  fill: none;
  stroke: var(--chart-line);
  stroke-width: 2.5;
  transition: opacity var(--t-base) var(--ease);
}

[data-theme="light"] .games-in-hand__line {
  stroke: var(--chart-line-light);
}

.games-in-hand__line--future {
  stroke-dasharray: 5 4;
}

.games-in-hand__line--dim {
  opacity: 0.15;
}

.games-in-hand__legend {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-4);
  margin-block-start: var(--space-3);
}

.games-in-hand__legend-btn {
  align-items: center;
  background: none;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: inherit;
  cursor: pointer;
  display: inline-flex;
  font-size: var(--fs-body-sm);
  gap: var(--space-2);
  min-height: var(--hit-min);
  padding: var(--space-1) var(--space-2);
}

.games-in-hand__legend-btn[aria-pressed="true"] {
  border-color: var(--color-border, #2a3444);
}

.games-in-hand__legend-swatch {
  background: var(--chart-line);
  border-radius: var(--radius-full);
  display: inline-block;
  height: 10px;
  width: 10px;
}

[data-theme="light"] .games-in-hand__legend-swatch {
  background: var(--chart-line-light);
}

.games-in-hand__legend-note {
  color: var(--color-text-muted, #94a0b2);
  font-size: var(--fs-caption);
}
