/* Guide walkthrough F102 (mockup round-17/f102-mockups): the public Draw tab (Views/Publication/Categories.cshtml) at the
   normal page width. The four ways are one segmented row (two rows of two on a phone). Every choice list is a list in
   aligned columns that reads down, then on in the next column, never chips thrown left to right; a chosen item is the
   brand fill with --brand-on text (round 29, F170). A draw card has a head (path, short name, place and fight numbers)
   and a body that the page script fills when it comes into view. In the fight table a finished fight is light green
   with a dark green left edge and the running fight blue with a dark blue edge ("Now"); the rest stay plain. Gaps
   follow the compact layout (F42). */

.draw-tabs-page { min-width: 0; }
.dtabs { min-width: 0; }
.dtabs__ways { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); width: 100%; }
.dtabs__ways > a { min-height: var(--tap); padding: 0 var(--sp-2); white-space: normal; text-align: center; line-height: 1.15; }
.dtabs__head { margin: 0; align-items: baseline; }
.dtabs__head h2 { margin: 0; overflow-wrap: anywhere; }

/* The choice: sections, each a list in aligned columns. */
.dchooser { display: flex; flex-direction: column; gap: var(--sp-1); padding: var(--sp-1); }
.dsec { display: grid; grid-template-columns: 4px minmax(0, 1fr); border-radius: var(--r-md); background: var(--surface-2); }
.dsec::before { content: ""; border-radius: var(--r-md) 0 0 var(--r-md); background: var(--line-strong); }
.dsec > * { grid-column: 2; }
.dsec--cats { background: var(--tree-lv2-bg); }
.dsec--cats::before { background: var(--tree-lv2-bar); }
.dcols { columns: 4 200px; column-gap: var(--sp-1); margin: 0; padding: var(--sp-1); list-style: none; }
.dcols--wide { columns: 3 280px; }
.dcols > li { break-inside: avoid; padding: 1px 0; }
.ditem { display: flex; align-items: center; gap: 6px; min-height: 36px; padding: 4px 10px; border: 1px solid transparent; border-radius: var(--r-sm); color: var(--text); font-weight: 600; text-decoration: none; }
.ditem:hover { background: var(--surface); border-color: var(--line-strong); color: var(--text); }
.ditem__name { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.ditem__sub { flex: none; color: var(--muted); font-size: var(--fs-sm); font-weight: 500; white-space: nowrap; }
.ditem__nums { flex: none; width: 64px; color: var(--muted); font-size: var(--fs-sm); font-weight: 700; }
.ditem--all .ditem__name { font-weight: 800; }
/* Guide walkthrough round 29 (F170, decisions.md): a chosen item is the brand fill with --brand-on text, its border the
   fill colour so no frame shows, in both themes; hover keeps the brand fill (--brand-hover). Its small numbers, sub text
   and the ring of a state dot take --brand-on too. */
.ditem[aria-current="true"] { background: var(--brand); border-color: var(--brand); color: var(--brand-on); }
.ditem[aria-current="true"]:hover { background: var(--brand-hover); border-color: var(--brand-hover); color: var(--brand-on); }
.ditem[aria-current="true"] .ditem__sub, .ditem[aria-current="true"] .ditem__nums, .ditem[aria-current="true"] .dcard__mine { color: var(--brand-on); }
.ditem[aria-current="true"] .ddot { box-shadow: 0 0 0 2px var(--brand-on); }
.ddot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); }
.ddot--done { background: var(--st-ok-fg); }
.ddot--live { background: var(--st-done-fg); }
@media (forced-colors: active) {
  .ditem[aria-current="true"] { border: 2px solid CanvasText; }
  .ddot { forced-color-adjust: none; border: 1px solid CanvasText; }
}

/* The club choice: the chosen club with its remove link, the search box (only with the script) and the count. */
.dclub { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-1); padding: var(--sp-1); }
/* Guide walkthrough round 29 (F172, mockup round-29/mockups/f172.html variant A): the chosen club is shown as a field
   with the club as its value (the frame, fill, height and radius of .input, components.css), the name in normal text cut
   by width, and the remove link a small round x with a solid --btn-bg fill (decisions.md F3) and a 1px --control-border
   ring (3:1 against the field fill, as the x of the club search, club-search.css): 28px, 44px on a touch screen, where
   it covers the right end of the field from edge to edge (the negative margins keep the field height). */
.dclub__chosen { display: inline-flex; flex: 0 1 320px; align-items: center; gap: var(--sp-2); min-width: 0; min-height: var(--control-h); padding: 0 7px 0 var(--sp-3); border: 1px solid var(--control-border); border-radius: var(--r-md); background-color: var(--field-bg); color: var(--text); font-size: var(--fs-md); font-weight: 500; }
.dclub__chosen-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dclub__clear { display: grid; flex: none; place-items: center; width: 28px; height: 28px; border: 1px solid var(--control-border); border-radius: 50%; background: var(--btn-bg); color: var(--text-2); text-decoration: none; }
.dclub__clear:hover { background: var(--btn-bg-hover); color: var(--text); }
.dclub__clear svg { display: block; width: 12px; height: 12px; }
@media (pointer: coarse) {
  .dclub__chosen { padding-right: 0; }
  .dclub__clear { width: var(--tap); height: var(--tap); margin: -1px -1px -1px 0; }
}
@media (forced-colors: active) {
  .dclub__chosen { border-color: CanvasText; }
  .dclub__clear { border-color: LinkText; }
}
.dclub__search { flex: 1 1 280px; min-width: 0; }
.dclub__count { font-size: var(--fs-sm); }
.dclub__none { margin: 0; padding: var(--sp-1) var(--sp-3); }
.dclub-table { padding: var(--sp-3); }
.dclub-table .section-head { margin-bottom: var(--sp-1); }
/* The scroll boxes of the club table and the fight table take focus, so their edge is a control line (3:1), as in a draw
   (draw.css), and the links in the club table are at least 24px tall. Each box is positioned, so the screen reader words
   of a winner (.sr-only, absolutely placed) in a column out of view stay inside it and never widen the page. */
.dclub-table .table-wrap, .dfights .table-wrap { position: relative; border-color: var(--control-border); }
.dclub-table .table a { display: inline-flex; align-items: center; min-height: 24px; }

/* The name search of the fight table. */
.dname { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--sp-1); padding: var(--sp-2) var(--sp-3); grid-template-columns: none; }
.dname::before { display: none; }
.dname .field { flex: 1 1 280px; }
.dname__actions { display: flex; gap: var(--sp-1); }

/* A draw card. Public redesign, decision 2026-10-25 (spec 4.1): a frameless, rounded translucent surface over the photo,
   so its head, the counts and the draw never stand straight on the fighter. It is the blur group of everything inside it
   (components.css draws the one blur on its ::before layer); the bracket box and the placings strip inside only carry
   their translucent colour. */
.dcards { min-width: 0; }
.dcard { margin-bottom: var(--sp-4); padding: 4px 10px 10px; overflow: hidden; border-radius: 12px; background: var(--surface-glass); }
.dcard[hidden] { display: none; }
.dcard__head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-1) var(--sp-3); padding: var(--sp-2) var(--sp-4); border-bottom: 1px solid var(--line); }
.dcard__title { margin: 0; font: 800 var(--fs-xl)/1.1 var(--font-display); text-transform: uppercase; letter-spacing: .01em; overflow-wrap: anywhere; }
.dcard__path { display: block; color: var(--muted); font: 600 var(--fs-sm)/1.2 var(--font-body); text-transform: none; letter-spacing: 0; }
.dcard__facts { display: flex; flex-wrap: wrap; gap: 2px var(--sp-3); margin: 0 0 0 auto; color: var(--muted); font-size: var(--fs-sm); }
.dcard__mine { color: var(--brand-text); font-weight: 700; }
.dcard__body { display: flex; flex-direction: column; gap: var(--sp-2); padding: var(--sp-2) var(--sp-4) var(--sp-4); min-width: 0; }
.dcard__state { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-1) var(--sp-2); }
.dcard__fights { display: inline-flex; align-items: center; min-height: 24px; margin-left: auto; font-weight: 600; }
.dcard__wait { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: var(--sp-2); min-height: 120px; border-radius: var(--r-md); background: repeating-linear-gradient(-45deg, var(--surface), var(--surface) 10px, var(--surface-2) 10px, var(--surface-2) 20px); color: var(--muted); }
.dcard__wait.is-loading .btn { display: none; }

/* Guide walkthrough F124 (mockup round-20/f124-mockups, variant A): the final places of a finished bracket in one quiet
   strip right under the diagram, the title at the left and the places side by side (disc, name, club with flag); two
   columns on a phone. Each place is positioned, so the screen reader words in it stay inside it. Names and clubs wrap,
   never cut. The chosen club's competitors (club way) have the light brand tint, as their sides in the draw. The strip
   is only on public pages, so its discs are the public coins (components.css). */
.placings-strip { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--sp-2); align-items: center; padding: var(--sp-2) var(--sp-3); border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface-glass); }
.placings-strip__label { margin: 0; color: var(--text-2); font: 700 var(--fs-sm)/1.2 var(--font-body); }
.placings-strip__list { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: var(--sp-1) var(--sp-3); margin: 0; padding: 0; list-style: none; }
/* Public redesign task 6 (spec 6.1): the disc column is as wide as the public coin, the first three places have a light
   tint in their medal colour (found by the disc, so two shared bronzes are both tinted) and the winner's name is a little
   larger. The club mark comes after the tints, so the chosen club's places keep the brand tint. */
.placings-strip__item { position: relative; display: grid; grid-template-columns: var(--coin-size) minmax(0, 1fr); gap: var(--sp-1) var(--sp-2); align-items: center; padding: 4px 6px; border-radius: var(--r-sm); }
.placings-strip__item:has(> .medal--1) { background: var(--coin-1-tint); }
.placings-strip__item:has(> .medal--2) { background: var(--coin-2-tint); }
.placings-strip__item:has(> .medal--3) { background: var(--coin-3-tint); }
.placings-strip__item:has(> .medal--1) .placings-strip__name { font-size: var(--fs-lg); }
.placings-strip__item.is-mine { background: var(--brand-tint-2); }
/* Marko, 2026-10-25: hover, focus or tap on a place (or on the competitor in the draw) marks the place as the draw marks
   its sides (is-hl, js/sb/portal.js). */
.placings-strip__item.is-hl { outline: 2px solid var(--brand-line); outline-offset: -2px; background: var(--brand-tint); }
.placings-strip__text { display: grid; min-width: 0; }
.placings-strip__name { color: var(--text); font-weight: 700; line-height: 1.2; overflow-wrap: anywhere; }
.placings-strip__item.is-mine .placings-strip__name { color: var(--brand-text); }
.placings-strip__club { color: var(--muted); font-size: var(--fs-xs); line-height: 1.3; overflow-wrap: anywhere; }
.placings-strip__flag { width: 16px; height: 12px; margin-right: 4px; vertical-align: -1px; }
@media (forced-colors: active) {
  .placings-strip__item.is-mine { outline: 1px solid CanvasText; }
}

/* The fight table. Guide walkthrough F174 B (round 31): the head, the legend and the table stand apart with the normal
   stack gap, and the legend is at body size in the text colour with larger swatches (the shared .legend of the draw
   keeps its size). */
.dfights { display: flex; flex-direction: column; gap: var(--sp-3); min-width: 0; }
.dfights__legend { align-items: center; gap: var(--sp-1) var(--sp-4); color: var(--text); font-size: var(--fs-md); }
.dswatch { display: inline-block; width: 22px; height: 14px; margin-right: 6px; vertical-align: middle; border: 1px solid var(--line-strong); border-radius: 3px; background: var(--surface); }
.dfights__legend .dswatch { width: 24px; height: 16px; }
.dswatch--done { background: var(--st-ok-bg); box-shadow: inset 4px 0 0 var(--st-ok-fg); }
.dswatch--now { background: var(--st-done-bg); box-shadow: inset 4px 0 0 var(--st-done-fg); }
.dft td { vertical-align: middle; }
.dft__no { width: 64px; font: 800 var(--fs-lg)/1 var(--font-display); }
.dft__cat { color: var(--text); font-size: var(--fs-sm); }
.dft__stage { white-space: nowrap; font-size: var(--fs-sm); font-weight: 600; }
.dft__row.is-done td { background: var(--st-ok-bg); }
.dft__row.is-done td.dft__no { box-shadow: inset 4px 0 0 var(--st-ok-fg); }
.dft__row.is-now td { background: var(--st-done-bg); }
.dft__row.is-now td.dft__no { box-shadow: inset 4px 0 0 var(--st-done-fg); }
.table.dft tbody tr.dft__row:hover td { filter: none; }
.dft__who { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.dft__who .flag { flex: none; width: 20px; height: 15px; }
.dft__who.is-win { font-weight: 800; }
.dft__who.is-lose { color: var(--muted); font-weight: 500; }
.dft__check { color: var(--st-ok-fg); font-weight: 800; }
.dft__out { color: var(--muted); font-weight: 500; }
.dft__src { color: var(--muted); font-style: italic; font-size: var(--fs-sm); }
.dft__win { display: inline-flex; align-items: center; min-height: 22px; padding: 0 8px; border-radius: 11px; background: var(--surface); color: var(--st-ok-fg); font-size: var(--fs-xs); font-weight: 700; white-space: nowrap; }
.dft__now { display: inline-flex; align-items: center; min-height: 22px; padding: 0 8px; border-radius: 11px; background: var(--surface); color: var(--st-done-fg); font-size: var(--fs-xs); font-weight: 700; white-space: nowrap; }
.dft__none td { padding: var(--sp-4); color: var(--muted); }
/* Guide walkthrough F162 (option A): a bye that is done says the competitor goes on without a fight; a fight that is not
   held keeps its row, muted and striped with a strong left edge, the reason across both competitor columns (the names of the
   competitors who do not compete crossed out) and "Not held" in the result column; the legend has its mark. */
.dft__pass, .dft__off { display: inline-flex; align-items: center; min-height: 22px; padding: 0 8px; border-radius: 11px; background: var(--surface); font-size: var(--fs-xs); font-weight: 700; white-space: nowrap; }
.dft__pass { color: var(--st-ok-fg); }
.dft__off { color: var(--muted); border: 1px solid var(--line-strong); }
.dft__row.is-off td { background: repeating-linear-gradient(135deg, var(--surface-2) 0 10px, var(--surface) 10px 20px); color: var(--muted); }
.dft__row.is-off td.dft__no { box-shadow: inset 4px 0 0 var(--line-strong); }
.dft__why { color: var(--text-2); font-size: var(--fs-sm); }
.dft__why s { color: var(--muted); }
.dswatch--off { background: repeating-linear-gradient(135deg, var(--surface-2) 0 5px, var(--surface) 5px 10px); box-shadow: inset 4px 0 0 var(--line-strong); }
@media (forced-colors: active) {
  .dft__row.is-done td.dft__no, .dft__row.is-now td.dft__no { border-left: 4px solid CanvasText; }
  .dswatch--done, .dswatch--now { border-left: 4px solid CanvasText; }
  /* The grey row keeps a visible edge (dashed, so it differs from a done row) and its chip a border. */
  .dft__row.is-off td.dft__no, .dswatch--off { border-left: 4px dashed CanvasText; }
  .dft__pass { border: 1px solid CanvasText; }
}

@media (max-width: 760px) {
  .dtabs__ways { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-flow: row; }
  .dcols, .dcols--wide { columns: 2 140px; }
  .dcard__head, .dcard__body { padding-inline: var(--sp-3); }
  .dcard__facts { margin-left: 0; }
  .dcard__title { font-size: var(--fs-lg); }
  .placings-strip { grid-template-columns: minmax(0, 1fr); }
  .placings-strip__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 420px) {
  .dcols--wide { columns: 1; }
}

/* A card whose draw is no longer published (its address answered 404 at a live refresh) leaves the page. */
.dcard.is-gone { display: none; }

/* Guide walkthrough F149 (decisions Q7a B and Q10 B, mockup round-26/f149-q9.html variant B): a tournament without fight
   numbers. "By fight number" stays a link, greyed and in italics like an unused tab (F104), and its page is one note. "By
   area" shows the live state of the chosen day: one box per area (setup order) in columns (one column on a phone) with
   the item on it now in the running blue ("Sada"), the queue after it ("Sljedeće") and the finished items folded; then
   the categories of the day not on an area ("Čeka") in aligned columns. A draw card head names the area of a category
   that is on one now as a small blue chip. On a phone every name is a full touch target. */
.dtabs__ways > a.tab--unused:not([aria-current="true"]) { color: var(--faint); font-weight: 500; font-style: italic; }
.dtabs__ways > a.tab--unused[aria-current="true"] { font-style: italic; }
.dfights-off { margin: 0; padding: var(--sp-3) var(--sp-4); }
.dlive { padding-bottom: var(--sp-1); }
.dlive__all { margin: 0; padding: var(--sp-1) var(--sp-1) 0; }
.dlive__areas { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: var(--sp-1); margin: 0; padding: var(--sp-1); list-style: none; }
.dlive__area { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: var(--sp-1) var(--sp-2) var(--sp-2); border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.dlive__name { margin: 0 0 2px; font: 800 var(--fs-lg)/1.1 var(--font-display); text-transform: uppercase; overflow-wrap: anywhere; }
.dlive__tag { flex: none; color: var(--muted); font-size: var(--fs-xs); font-weight: 800; text-transform: uppercase; letter-spacing: .03em; }
.dlive__label { margin: var(--sp-1) 0 0; }
.dlive__item--now { background: var(--st-done-bg); box-shadow: inset 3px 0 0 var(--st-done-fg); }
.dlive__item--now .dlive__tag { color: var(--st-done-fg); }
/* The chosen item is the brand fill (round 29, F170), so its tag ("Sada") takes the --brand-on text colour too. */
.ditem[aria-current="true"] .dlive__tag { color: var(--brand-on); }
.dlive__list { margin: 0; padding: 0; list-style: none; }
.dlive__empty { margin: 0; padding: 4px 10px; }
.dlive__done summary { display: flex; align-items: center; min-height: 36px; padding: 0 10px; color: var(--muted); font-weight: 700; cursor: pointer; }
.dlive__wait { padding: 0 var(--sp-1) var(--sp-1); }
.dlive__wait .dlive__name { padding: var(--sp-1) 10px 0; font-size: var(--fs-md); }
.dcard__area { display: inline-flex; align-items: center; padding: 0 8px; border-radius: var(--r-pill); background: var(--st-done-bg); color: var(--st-done-fg); font-weight: 800; }
@media (max-width: 760px) {
  .dlive__areas { grid-template-columns: minmax(0, 1fr); }
}
/* Every touch screen, not only a phone, gets the 44px names and "Finished" summary of the area boxes. */
@media (max-width: 760px), (pointer: coarse) {
  .dlive .ditem, .dlive__done summary { min-height: var(--tap); }
}
@media (forced-colors: active) {
  .dlive__item--now { border: 2px solid CanvasText; }
  .dcard__area { border: 1px solid CanvasText; }
}
