/* The Royal Game of Ur. Copyright (C) 2026 MrSuttonmann. GNU AGPL-3.0 or later; see LICENSE. */

/* The Stats window: tiles, comparison table, roll chart and landing heatmap. */

#stats-body { display: flex; flex-direction: column; gap: 10px; }
#stats-body h3 { font-family: var(--f-display); font-weight: 400; font-size: 19px; margin: 8px 0 0; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
.tile-s { display: flex; flex-direction: column; padding: 8px 12px; background: var(--paper); border: 1.5px solid var(--ink-soft); border-radius: var(--hand); }
.tile-s span { font-family: var(--f-note); font-size: 14px; color: var(--ink-soft); }
.tile-s b { font-family: var(--f-display); font-weight: 400; font-size: 26px; line-height: 1.15; font-variant-numeric: tabular-nums; }
.race { margin: 0; font-family: var(--f-note); font-size: 16px; }
.scroll-x { overflow-x: auto; }
table.cmp { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.cmp th, .cmp td { padding: 5px 8px; border-bottom: 1px solid var(--paper-deep); text-align: right; }
.cmp thead th { font-weight: 600; border-bottom: 1.5px solid var(--ink-soft); white-space: nowrap; }
.cmp thead th i, .legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: 0; }
.cmp tbody th, .cmp thead th:first-child { text-align: left; }
.cmp tbody th { font-weight: 400; }
.cmp tbody th small { display: block; font-family: var(--f-note); font-style: italic; font-size: 13px; color: var(--ink-soft); }
.cmp td.lead { font-weight: 600; }
.cmp td.lead::before { content: "◆ "; font-size: 10px; color: var(--vermilion); vertical-align: 2px; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 14px; }
.legend .exp-key { width: 0; height: 12px; border-left: 2px dashed var(--ink); border-radius: 0; margin-right: 8px; vertical-align: -1px; }
/* each side's colour in the charts: legend keys, table headings and roll bars */
.swatch-sun { background: var(--c-sun); }
.swatch-moon { background: var(--c-moon); }
.rc { display: grid; grid-template-columns: 22px 1fr; gap: 6px 8px; align-items: center; }
.rc-v { font-family: var(--f-display); font-size: 17px; text-align: center; }
.rc-track { position: relative; display: flex; flex-direction: column; gap: 2px; padding-block: 3px; background: linear-gradient(90deg, var(--paper-deep) 1px, transparent 1px) 0 0 / 25% 100%; }
.rc-bar { display: block; height: 10px; min-width: 2px; border-radius: 0 4px 4px 0; }
.rc-exp { position: absolute; top: -2px; bottom: -2px; width: 12px; margin-left: -6px; z-index: 1; }
.rc-exp::after { content: ""; position: absolute; left: 5px; top: 0; bottom: 0; border-left: 2px dashed var(--ink); }
.rc-axis { position: relative; height: 18px; font-size: 12px; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.rc-axis span { position: absolute; transform: translateX(-50%); }
.rc-axis span:first-child { transform: none; }
.rc-axis span:last-child { transform: translateX(-100%); }
.cap, .empty { margin: 0; font-family: var(--f-note); font-size: 14px; color: var(--ink-soft); }
details.tbl { border: 0; padding: 0; background: none; font-size: 14px; }
details.tbl summary { font-family: var(--f-note); font-size: 14px; color: var(--ink-soft); }
details.tbl table { border-collapse: collapse; margin-top: 6px; font-variant-numeric: tabular-nums; }
details.tbl th, details.tbl td { padding: 2px 10px; text-align: right; border-bottom: 1px solid var(--paper-deep); }
.heat { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 3px; max-width: 420px; }
.hc, .hg { aspect-ratio: 1; display: grid; place-items: center; border-radius: 5px; font-size: 13px; font-variant-numeric: tabular-nums; }
.hc { background: rgba(182, 67, 42, var(--a)); border: 1px solid var(--ink-soft); }
.hc.rose { box-shadow: inset 0 0 0 2px var(--ochre); }
/* the count stays readable on the darkest squares */
.hc.busy { color: var(--bone); }
.reset { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-family: var(--f-note); }

.tip {
  position: fixed; z-index: 10; pointer-events: none; max-width: 260px; padding: 5px 9px;
  background: var(--ink); color: var(--bone); font-size: 13px; border-radius: 6px; line-height: 1.35;
}
