/* Replacement builder (a guided page) and request cards (shared/builder.js), in the captain and admin areas.
   On top of assets/site.css and admin/admin.css. */
.bd-page { max-width: 820px; }
.bd.ta-form { display: grid; gap: 14px; margin: 4px 0 0; align-items: start; align-content: start; }
.bd-tiles, .bd-cands, .bd-gcards { align-content: start; }
.bd-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.bd-team { margin: 0; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.bd-team .tcell { font-size: 20px; }
.bd-rules { margin: 0; }
.bd-q { margin: 4px 0 0; font: 600 30px/1.05 var(--f-display); text-transform: uppercase; letter-spacing: .02em; }
.bd-q + .note { margin: 0; }
.bd-body { display: grid; gap: 12px; align-content: start; }
.bd-body > * { margin-top: 0; margin-bottom: 0; }
.bd-row { display: grid; gap: 10px; padding-top: 8px; }
/* stepper */
.bd-steps { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; counter-reset: none; }
.bd-sp button { width: 100%; display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 3px; background: var(--surface); color: var(--muted); cursor: pointer; text-align: left; font: 400 14px/1.2 var(--f-text); }
.bd-sp button:disabled { cursor: default; opacity: .5; }
.bd-sn { flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; border: 2px solid currentColor; font: 700 14px/1 var(--f-text); }
.bd-sl { display: grid; min-width: 0; }
.bd-sl b { font: 600 16px/1.1 var(--f-display); letter-spacing: .06em; text-transform: uppercase; }
.bd-sl small { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bd-now button { border-color: var(--ball); color: var(--ink); box-shadow: inset 0 -3px 0 var(--ball); }
.bd-done button { color: var(--ink); }
.bd-done .bd-sn { background: var(--good, #43a047); border-color: var(--good, #43a047); color: #fff; }
/* step 1: game cards */
.bd-gcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); gap: 10px; }
.bd-gcard { display: grid; gap: 4px; justify-items: start; padding: 12px 14px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface); color: var(--ink); cursor: pointer; text-align: left; font: 400 14px/1.3 var(--f-text); }
.bd-gcard:hover, .bd-tile:hover, .bd-cand:hover { border-color: var(--ball); }
.bd-gcard.bd-on, .bd-tile.bd-on, .bd-cand.bd-on { border-color: var(--ball); outline: 2px solid var(--ball); outline-offset: -1px; }
.bd-gday { font: 600 22px/1 var(--f-display); text-transform: uppercase; letter-spacing: .02em; }
.bd-gtime { font: 600 18px/1 var(--f-display); color: var(--muted); }
.bd-gopp { display: inline-flex; align-items: center; gap: 6px; }
.bd-gcard, .bd-tile, .bd-cand { min-width: 0; overflow-wrap: anywhere; }
.bd-other > summary { cursor: pointer; color: var(--muted); font-size: 14px; padding: 4px 0; }
/* step 2: player tiles */
.bd-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 8px; }
.bd-tile { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface); color: var(--ink); cursor: pointer; text-align: left; font: 400 15px/1.25 var(--f-text); min-height: 52px; }
.bd-tile > span:last-child { display: grid; }
.bd-tile small { color: var(--muted); font-size: 13px; }
.bd-tile .crest { margin-right: 6px; }
.bd-tick { flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 4px; border: 2px solid var(--line); font-weight: 700; }
.bd-tile.bd-on .bd-tick { background: var(--ball); border-color: var(--ball); color: var(--on-ball); }
/* step 3: a block per absent player, replacement cards */
.bd-line { border: 1px solid var(--line); border-radius: 4px; padding: 12px 14px; display: grid; gap: 8px; background: var(--surface); }
.bd-line.bd-set { border-color: var(--good, #43a047); }
.bd-lh { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; }
.bd-lh h3 { font: 600 22px/1.1 var(--f-display); text-transform: uppercase; letter-spacing: .02em; }
.bd-lh h3 small { font: 400 14px/1 var(--f-text); text-transform: none; color: var(--muted); letter-spacing: 0; }
.bd-search { width: 100%; }
.bd-sub-h { margin: 0; font-size: 13px; color: var(--muted); }
.bd-cands { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 8px; }
.bd-cand { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-left: 4px solid var(--good, #43a047); border-radius: 4px; background: var(--bg); color: var(--ink); cursor: pointer; text-align: left; font: 400 15px/1.25 var(--f-text); }
.bd-cand.bd-warn { border-left-color: var(--warn, #f0a500); }
.bd-cand.bd-fail { border-left-color: var(--bad, #e57373); opacity: .8; }
.bd-cn { display: flex; align-items: center; gap: 8px; min-width: 0; flex-wrap: wrap; }
.bd-ctm { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); }
.bd-cs { font: 600 20px/1 var(--f-display); font-variant-numeric: tabular-nums; }
.bd-cw { grid-column: 1 / -1; font-size: 12px; }
.bd-cand.bd-ok .bd-cw { color: var(--good, #43a047); }
.bd-cand.bd-warn .bd-cw { color: var(--warn, #f0a500); }
.bd-cand.bd-fail .bd-cw { color: var(--bad, #e57373); }
/* step 4 */
.bd-sum { border: 1px solid var(--line); border-radius: 4px; padding: 10px 14px; background: var(--surface); }
.bd-sum p { margin: 0 0 6px; }
.bd-verdict { font-size: 16px; }
.bd-verdict .bd-res { font-size: 16px; padding: 4px 12px; }
.bd .bd-check { display: flex; align-items: center; gap: 10px; font: 400 15px/1.3 var(--f-text); letter-spacing: 0; text-transform: none; color: var(--ink); }
.bd-check input { width: 20px; height: 20px; flex: none; }
.bd-notel textarea { min-height: 3.2em; resize: vertical; }
/* back / next */
.bd-nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; position: sticky; bottom: 0; padding: 10px 0 12px; background: var(--bg); border-top: 1px solid var(--line); }
.bd-nav .ta-btn:disabled { opacity: .45; cursor: default; }
.ta-back { margin: 0 0 4px; }
.bd-checks { list-style: none; display: grid; gap: 6px; margin: 4px 0; }
.bd-cl { border-top: 1px solid var(--line); padding-top: 6px; }
.bd-cl:first-child { border-top: 0; padding-top: 0; }
.bd-cl-h { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 10px; }
.bd-chks { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.bd-chk, .bd-res, .bd-st { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); font: 500 13px/1.4 var(--f-text); white-space: nowrap; }
.bd-chk i, .bd-res i { font-style: normal; font-weight: 700; }
.bd-ok { color: var(--good, #43a047); }
.bd-warn { color: var(--warn, #f0a500); }
.bd-fail { color: var(--bad, #e57373); }
.bd-chk.bd-ok, .bd-res.bd-ok { border-color: currentColor; }
.bd-chk.bd-warn, .bd-res.bd-warn { border-color: currentColor; }
.bd-chk.bd-fail, .bd-res.bd-fail { border-color: currentColor; }
.bd-why { margin: 4px 0 0; font-size: 14px; }
.bd-why.bd-ok { color: var(--muted); }
/* request cards: compact */
.bd-reqs { display: grid; gap: 8px; margin: 8px 0 14px; }
.bd-req { border: 1px solid var(--line); border-left: 5px solid var(--tc); border-radius: 3px; background: var(--surface); padding: 8px 12px; display: grid; gap: 4px; font-size: 15px; }
.bd-req-h { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.bd-req-h .bd-game { margin-right: auto; font-weight: 600; }
.bd-req-h .tcell { margin-right: 4px; }
.bd-st { font-weight: 600; }
.bd-st-pending .bd-st { border-color: var(--ball); color: var(--ink); }
.bd-st-approved .bd-st { border-color: var(--good, #43a047); color: var(--good, #43a047); }
.bd-st-refused .bd-st { border-color: var(--bad, #e57373); color: var(--bad, #e57373); }
.bd-st-cancelled { opacity: .7; }
.bd-lines { list-style: none; display: grid; gap: 0; }
.bd-lines .note { font-size: 13px; }
.bd-arrow { color: var(--muted); padding: 0 2px; }
.bd-issues { list-style: none; display: grid; gap: 2px; font-size: 14px; }
.bd-issues i { font-style: normal; font-weight: 700; }
.bd-note { margin: 0; padding: 2px 8px; border-left: 3px solid var(--line); font-size: 14px; }
.bd-dnote { border-left-color: var(--ball); }
.bd-more > summary { cursor: pointer; font-size: 13px; color: var(--muted); }
.bd-more[open] > summary { margin-bottom: 4px; }
.bd-meta { margin: 0; font-size: 12px; color: var(--muted); }
.bd-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-top: 6px; border-top: 1px solid var(--line); }
.bd-acts .ctl { flex: 1 1 220px; min-width: 0; }
@media (max-width: 600px) {
  .bd-steps { grid-template-columns: repeat(4, 1fr); gap: 4px; }
  .bd-sp button { flex-direction: column; gap: 2px; padding: 6px 2px; text-align: center; }
  .bd-sl small { display: none; }
  .bd-sl b { font-size: 13px; }
  .bd-q { font-size: 26px; }
  .bd-nav .ta-btn { flex: 1; }
}
/* league rules: a link at the top, the text in a small window */
.bd-topacts { display: flex; flex-wrap: wrap; gap: 6px 18px; justify-content: flex-end; }
.bd-rlist { display: grid; gap: 8px; padding-left: 20px; margin: 4px 0 8px; }
/* "Joueur hors-ligue": a player not on the list */
.bd-guest { border: 1px dashed var(--line); border-radius: 4px; padding: 8px 12px 10px; display: grid; gap: 10px; }
.bd-guest legend { padding: 0 6px; font: 500 13px/1 var(--f-display); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.bd-gsex { display: flex; align-items: center; gap: 10px; }
.bd-gl { font: 500 13px/1 var(--f-display); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.bd-gtag { display: inline-block; padding: 0 6px; border: 1px dashed var(--bad, #e57373); border-radius: 3px; font-size: 12px; color: var(--bad, #e57373); }
.bd-guestbtn { font-size: 14px; }
.bd-cl-team .bd-why { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 0; }
/* ---------- the actual lineup of a game (roster - absents + replacements) ---------- */
.ld-game { border: 1px solid var(--line); border-radius: 4px; background: var(--surface); padding: 10px 12px; display: grid; gap: 8px; }
.ld-gh { font-size: 15px; }
.ld-gh b { font: 600 20px/1 var(--f-display); }
.ld-cols { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: start; }
.ld-vs { align-self: center; color: var(--muted); font: 600 18px/1 var(--f-display); }
.ld-team { border-left: 4px solid var(--tc); padding-left: 10px; display: grid; gap: 4px; min-width: 0; }
.ld-h { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; }
.ld-sum { margin: 0; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.ld-sum.bd-fail { color: var(--bad, #e57373); }
.ld-list { list-style: none; display: grid; gap: 1px; font-size: 15px; }
.ld-list li { display: flex; gap: 6px; align-items: baseline; }
.ld-mark { flex: none; width: 14px; font-weight: 700; text-align: center; }
.ld-sub.ld-approved .ld-mark { color: var(--good, #43a047); }
.ld-sub.ld-pending .ld-mark { color: var(--warn, #f0a500); }
.ld-sub .note { font-size: 12px; }
.ld-g { font: 700 11px/1 var(--f-text); padding: 1px 4px; border: 1px solid var(--line); border-radius: 3px; text-decoration: none; color: var(--muted); }
.ld-abs { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.ld-dates { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 12px; }
.ld-dates button { border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 3px; padding: 6px 10px; cursor: pointer; font: 500 14px/1.1 var(--f-text); }
.ld-dates button.ld-past { color: var(--muted); }
.ld-dates button[aria-pressed="true"] { border-color: var(--ball); outline: 2px solid var(--ball); outline-offset: -1px; color: var(--ink); }
.ld-nights { display: grid; gap: 12px; }
@media (max-width: 700px) { .ld-cols { grid-template-columns: 1fr; } .ld-vs { justify-self: start; } }
.ld-none { margin: 0; font-size: 13px; color: var(--muted); }
@media (max-width: 600px) {
  .bd-req { padding: 8px 10px; }
  .bd-req-h { gap: 4px 6px; }
  .bd-meta { font-size: 11px; }
  .bd-q { font-size: 24px; }
  .bd-line { padding: 10px; }
  .bd-lh h3 { font-size: 19px; }
}
.bd-req, .bd-line, .bd-sum, .ld-team, .ld-game { min-width: 0; }
.bd-lines li, .ld-list li { overflow-wrap: anywhere; }
