/* Guide walkthrough F101 (mockup round-17/f101-mockups, lower layout 1 "Tablica"; depth mockup option 2; replaces the
   F40 index layout): the public Registered tab (Views/Tournaments/PublicRegistered.cshtml, _RegisteredRoot.cshtml). The
   level chooser and the club search bring their own stylesheets. The level chooser, the search, the summary line, then
   one section per discipline with a big heading and a gap before the next one, each with one table: a heading row per
   level 2 block, a sub-heading row per run of deeper levels, and per final category its short name once at the left and
   its entries at the right.
   Every colour is a token of sb/tokens.css; the level tints are the category tree tokens (--tree-lv1..3, decisions.md:
   level 1 blue, 2 violet, 3 magenta). Every gap is compact (decisions.md F42). */

.registered-main { min-width: 0; }

/* The help line under the search form. */
.registered-help { margin: 0; }

/* The summary line: the chosen level and the counts. */
.registered-summary { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--sp-1) var(--sp-3); }
.registered-summary > h2 { margin: 0; min-width: 0; font: 800 var(--fs-d1)/1.05 var(--font-display); text-transform: uppercase; letter-spacing: .01em; overflow-wrap: anywhere; }
.registered-summary > p { margin: 0; }
.registered-meta { color: var(--muted); font-size: var(--fs-sm); font-weight: 600; }
.registered-none { color: var(--muted); font-size: var(--fs-sm); font-style: italic; }

/* One section per discipline: the big heading on the level 1 bar, a gap before the next discipline. */
.registered-disc { display: flex; flex-direction: column; gap: var(--sp-1); min-width: 0; }
.registered-disc + .registered-disc { margin-top: var(--sp-5); }
.registered-dischead { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--sp-1) var(--sp-3); padding: var(--sp-1) 2px var(--sp-2); border-bottom: 3px solid var(--tree-lv1-bar); }
.registered-dischead > h3 { margin: 0; min-width: 0; font: 800 2rem/1 var(--font-display); text-transform: uppercase; letter-spacing: .02em; overflow-wrap: anywhere; }
.registered-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }

/* The table: the category column, the competitor column and the club column. */
.registered-table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: var(--fs-md); }
.registered-table th, .registered-table td { overflow-wrap: anywhere; text-align: left; }
.registered-table thead th { padding: var(--sp-2) var(--sp-4); background: var(--surface-2); border-bottom: 1px solid var(--line); color: var(--muted); font-size: var(--fs-sm); font-weight: 700; }
.registered-table thead th:first-child { width: 28%; }
.registered-table thead th:nth-child(2) { width: 38%; }
/* The row separators are the decorative hairline (--line), as on every other table; a fill colour as a line counts as a
   drawn edge for the accessibility sweep and needs 3:1. */
.registered-table tbody td { padding: 4px var(--sp-4); border-bottom: 1px solid var(--line); vertical-align: top; }
.registered-table td.primary { font-weight: 700; }
.registered-table .flag { width: 20px; height: 15px; margin-right: var(--sp-1); border-radius: 2px; box-shadow: 0 0 0 1px var(--line-strong); vertical-align: -2px; }
.registered-cat > tr:last-child > td { border-bottom: 1px solid var(--line-strong); }
.registered-catcell { padding: 7px var(--sp-4) 4px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line-strong); vertical-align: top; font-weight: 400; }
.registered-catname { display: block; font-size: var(--fs-md); font-weight: 800; color: var(--text); }
.registered-catcell > .registered-meta { display: block; margin-top: 1px; font-weight: 500; }
.registered-cat--empty td.registered-none { padding-block: 7px; font-size: var(--fs-md); }

/* The heading row of a level 2 block (level 2 tint) and the sub-heading row of deeper levels (level 3 tint). */
.registered-table .registered-block td { padding: 0; border-bottom: 0; }
.registered-blockhead { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--sp-1) var(--sp-3); padding: var(--sp-2) var(--sp-4) var(--sp-2) calc(var(--sp-4) + 4px); background: var(--tree-lv2-bg); box-shadow: inset 4px 0 0 var(--tree-lv2-bar); }
.registered-blockhead > h4 { margin: 0; min-width: 0; font: 800 var(--fs-xl)/1.1 var(--font-display); text-transform: uppercase; letter-spacing: .02em; overflow-wrap: anywhere; }
.registered-table .registered-sub td { padding: 6px var(--sp-4) 4px calc(var(--sp-4) + 8px); background: var(--tree-lv3-bg); box-shadow: inset 4px 0 0 var(--tree-lv3-bar); border-bottom: 1px solid var(--line); color: var(--text-2); font: 800 var(--fs-md)/1.2 var(--font-display); text-transform: uppercase; letter-spacing: .02em; }

/* A phone: each category is a block with its name on top, then each entry as two lines (the name in bold, then the flag
   and the club). The column heads are not drawn. */
@media (max-width: 760px) {
  .registered-dischead > h3 { font-size: var(--fs-d1); }
  .registered-table thead { display: none; }
  .registered-table, .registered-table tbody, .registered-table tr, .registered-table th, .registered-table td { display: block; width: auto; }
  .registered-catcell { border-right: 0; background: var(--surface-2); }
  .registered-table td.primary { padding-bottom: 0; border-bottom: 0; }
  .registered-table td.primary + td { padding-top: 0; color: var(--muted); font-size: var(--fs-sm); }
  .registered-table .flag { margin-right: var(--sp-1); }
}
