/* Euchre Scoreboard — app-specific styles.
   Framework (header/footer/buttons/tokens) comes from https://style.trzeciak.cloud/tl.css.
   Only the bespoke 24×12 sticky scoreboard table + a danger button live here. */

.eu-main { padding: 2rem; }

/* ── Admin controls ─────────────────────────────────────────────────── */
.eu-admin { margin-bottom: 1rem; display: flex; gap: 0.75rem; flex-wrap: wrap; }

/* Compact button sizing (the old Bootstrap .btn-sm) */
.eu-btn-sm { font-size: 0.65rem; padding: 0.35rem 0.9rem; }

/* Danger variant — framework has no danger button, so build one on --color-tl-red */
.eu-btn-danger { border-color: var(--color-tl-red); color: var(--color-tl-red); }
.eu-btn-danger:hover { background-color: var(--color-tl-red); color: var(--color-tl-bg); }

/* ── Final-score column: hidden until an admin reveals it ───────────── */
.final-score-col, .final-score { display: none; }
.final-score-visible .final-score-col,
.final-score-visible .final-score { display: table-cell; }

/* ── Scrollable wrapper — single scroll context for both axes ───────── */
.scoreboard-wrap {
  overflow: auto;
  max-height: 78vh;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--color-tl-border);
}

/* ── Compact scoreboard table with sticky header + first column ──────── */
.scoreboard-sticky {
  border-collapse: separate;
  border-spacing: 0;
  table-layout: auto;
  white-space: nowrap;
  width: 100%;
}

.scoreboard-sticky th,
.scoreboard-sticky td {
  padding: 0.25rem 0.35rem;
  text-align: center;
  vertical-align: middle;
  border-bottom: 1px solid var(--color-tl-border);
  border-right: 1px solid var(--color-tl-border);
}
.scoreboard-sticky th:last-child,
.scoreboard-sticky td:last-child { border-right: none; }

/* Subtle zebra striping */
.scoreboard-sticky tbody tr:nth-child(even) td { background-color: var(--color-tl-bg-mid); }

/* Header row text — Jost, uppercase, structural gold */
.scoreboard-sticky thead th {
  font-family: var(--font-tl-sans);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--tl-structure);
}

/* Sticky header row */
.scoreboard-sticky thead th {
  position: sticky;
  top: 0;
  z-index: 10;
  background-color: var(--color-tl-bg-mid);
}

/* Sticky first column */
.scoreboard-sticky th.sticky-col,
.scoreboard-sticky td.sticky-col {
  position: sticky;
  left: 0;
  z-index: 11;
  background-color: var(--color-tl-surface);
}

/* Top-left corner cell: sticky in both directions */
.scoreboard-sticky thead th.sticky-col { z-index: 12; }

/* ── Compact cell inputs — the key to narrow columns ────────────────── */
.scoreboard-sticky td input {
  width: 3.5em;
  padding: 0.15rem 0.25rem;
  font-size: 0.8rem;
  line-height: 1.2;
  text-align: center;
}
/* Name column slightly wider, left-aligned */
.scoreboard-sticky td.sticky-col input { width: 7em; text-align: left; }

/* ── Total column: live computed value → Space Mono + teal ──────────── */
.final-score {
  font-family: var(--font-tl-mono);
  color: var(--color-tl-teal);
  font-weight: 700;
  text-align: right;
}
