/* A table's standings and hands (table-hands.js): on the table page, and on a club event's results. */
/* The table page: points at this table, and its hands, newest first. */
.table-section { margin-top: 18px; display: grid; gap: 8px; }
.table-section-head { margin: 0; font-size: 16px; }
.table-scores, .table-hands { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.table-scores li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px; background: var(--paper-2); font-size: 14px; }
.table-scores li.is-you { background: #eaf5ee; box-shadow: inset 0 0 0 1px var(--bamboo); }
.ts-name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ts-meta { font-size: 12px; color: var(--ink-3); }
.ts-points, .th-points { font-weight: 800; font-variant-numeric: tabular-nums; color: var(--felt); }
.ts-points.neg, .th-points.neg { color: var(--cinnabar); }
.ts-note { margin: 0; font-size: 12.5px; color: var(--ink-3); }
.table-hands li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--paper-edge); font-size: 14px; color: var(--ink-2); }
.table-hands li:last-child { border-bottom: 0; }
.th-what { min-width: 0; }
.th-tag { display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 4px; background: #fff6e6; border: 1px solid #f2a33a; color: #8a5a00; font-size: 11px; font-weight: 700; }
.th-tag.th-exec { background: #eaf1fb; border-color: #8fb0dc; color: #2c4f80; }
.th-tag.th-disputed { background: #fdf0ed; border-color: #e3a59a; color: var(--cinnabar); }
.th-tag.th-cancelling { background: #f3eefb; border-color: #b9a4dc; color: #55388a; }
.th-tag.th-changed { background: #fff3c4; border-color: #f2c94c; color: #5b4300; }
.th-tag.th-resolved { background: #eaf5ee; border-color: var(--bamboo); color: var(--felt); }
.th-tag + .th-tag { margin-left: 4px; }
.th-tag.th-confirmed { background: #eaf5ee; border-color: #a8cdb6; color: var(--felt); }
/* A hand an exec has settled: every tag on it is green, Changed included. */
.table-hands li:not(.is-waiting) .th-tag { background: #eaf5ee; border-color: #a8cdb6; color: var(--felt); }
.th-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.th-tags .th-tag { margin-left: 0; }
.th-tags .th-tag + .th-tag { margin-left: 0; }
/* A hand taken off: its points struck through, counting for nothing. */
.th-points.th-void { text-decoration: line-through; color: var(--ink-3); font-weight: 600; }
/* A hand at the table, tap to open: tiles, everyone's points, who said what. */
.table-hands li { display: block; }
.th-hand > summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; cursor: pointer; list-style: none; }
.th-hand > summary::-webkit-details-marker { display: none; }
.th-hand > summary .th-what::before { content: "▸"; display: inline-block; width: 1em; color: var(--ink-3); transition: transform .15s; }
.th-hand[open] > summary .th-what::before { transform: rotate(90deg); }
.th-details { display: grid; gap: 8px; margin: 8px 0 4px 1em; padding: 10px; border-radius: 8px; background: var(--paper-2); font-size: 13.5px; }
.th-details .th-meta { margin: 0; color: var(--ink-3); }
.th-details ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; }
.th-scores li { display: flex; justify-content: space-between; gap: 10px; }
.th-said li { color: var(--ink-2); }
.th-said li.th-said-no { color: var(--cinnabar); }
.th-note { display: block; margin-top: 1px; font-style: italic; color: var(--ink-2); }
.th-timeline li { font-size: 12.5px; color: var(--ink-3); }
.th-patterns { margin: 0; font-size: 13px; color: var(--ink-2); }
.table-hands .th-details li { padding: 0; border: 0; display: block; font-size: 13.5px; }
.table-hands .th-details .th-scores li { display: flex; justify-content: space-between; }
.th-details .hand-row, .th-details .tiles { margin: 0; }
/* The hand's tiles, small: the sets in a line, the pair (and any flowers) under them. */
.th-tiles .hand-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 5px; margin: 0; }
.th-tiles .hand-group { display: inline-flex; gap: 1px; }
.th-tiles .hand-row .hand-sets { gap: 5px; }
.th-tiles .tile-sm, .th-tiles .hand-row .hand-sets .tile-sm { width: 18px; height: 25px; flex: none; aspect-ratio: auto; border-radius: 3px 3px 2px 2px; box-shadow: 0 1.5px 0 var(--tile-base); }
.th-tiles .tile-sm.win { box-shadow: 0 0 0 1.5px var(--cinnabar), 0 1.5px 0 var(--tile-base); }
