/* Stats app blocks (apps/stats.js). Inlined into every page after theme.css (blocks/src/theme-files.js). */
/* stats.js hides parts with the hidden attribute (My stats without a linked Steam account, the totals' switch). */
.wc-app[data-app^="stats-"] [hidden] { display: none !important; }
.wc-stats-live:empty::before { content: "Loading…"; color: var(--muted); }
.wc-stats-name { margin: 0 0 12px; }
.wc-stats-totals:empty::before { content: "Loading…"; color: var(--muted); }
.wc-stats-shame:empty::before { content: "Loading…"; color: var(--muted); }
/* The block's own loading text (its Texts and parts), which stats.js puts into data-loading; also over theme.css's
   .wc-app:empty one for the Weapons and Recent matches blocks. */
.wc-app[data-app^="stats-"][data-loading]:empty::before, .wc-app[data-app^="stats-"] [data-loading]:empty::before { content: attr(data-loading); }

/* Bar above the leaderboard (period switch, sort, search, My stats) and the totals' own switch. */
.wc-stats-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 12px; }
.wc-stats-bar select, .wc-stats-bar input { min-height: 40px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--wc-card, var(--bg-2)); color: var(--fg); font: inherit; }
.wc-stats-bar input[type="search"] { flex: 1 1 200px; max-width: 320px; min-width: 0; }
.wc-stats-bar select:focus-visible, .wc-stats-bar input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }

/* Segmented All time / This month switch (aria-pressed marks the chosen one). */
.wc-stats-switch { display: inline-flex; gap: 3px; padding: 3px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--wc-card, var(--bg-2)); }
.wc-stats-switch button { padding: 6px 14px; border: 0; border-radius: calc(var(--radius) - 3px); background: transparent; color: var(--muted);
  font: inherit; font-size: .9rem; font-weight: 600; cursor: pointer; transition: background .2s, color .2s; }
.wc-stats-switch button:hover { color: var(--fg); }
.wc-stats-switch button[aria-pressed="true"] { background: var(--accent); color: #0b0b0b; }
.wc-stats-switch button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* Season select next to the switch: outlined in gold while a season is chosen (neither button is pressed then). */
.wc-stats-bar select.wc-stats-season.is-on { border-color: var(--accent); }

/* Paging under the leaderboard. */
.wc-stats-pager { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin-top: 12px; }
.wc-stats-pager .wc-btn:disabled, .wc-stats-pager .wc-btn:disabled:hover { opacity: .45; cursor: default; transform: none;
  background: transparent; border-color: var(--fg); color: var(--fg) !important; }

/* Recent matches: one box per match, its scoreboard folded out on click. */
.wc-stats-matches { display: grid; gap: 10px; }
.wc-stats-match { padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--wc-panel-radius, var(--radius)); background: var(--wc-panel, none), var(--wc-card, var(--bg-2)); }
.wc-stats-match summary { cursor: pointer; }
.wc-stats-match summary > * { margin-right: 8px; }
.wc-stats-match .wc-table-wrap { margin-top: 10px; }
.wc-stats-match a { color: var(--accent); text-decoration: none; }

/* Hall of shame: one tile per funny stat with its top players (the first one bigger). */
.wc-shame { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.wc-shame-tile { background: var(--wc-panel, none), var(--bg-2); border: 1px solid var(--line); border-radius: var(--wc-panel-radius, var(--radius));
  padding: 14px 16px; min-width: 0; }
.wc-shame-tile h3 { margin: 0 0 10px; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.wc-shame-tile .wc-muted { margin: 0; }
.wc-shame-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.wc-shame-list li { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.wc-shame-list li a { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wc-shame-list li b { font-family: "Black Ops One", sans-serif; font-weight: 400; color: var(--accent); }
.wc-shame-list li:first-child a { font-weight: 700; }
.wc-shame-list li:first-child b { font-size: 1.4rem; }
.wc-shame-total { margin: 10px 0 0; color: var(--muted); font-size: .8rem; }
