/* css/repexplore.css - Repertoire explorer (on top of prepare.css and repertoire.css) */
/* the file picker sits on the title line, to the right (below the title on narrow screens) */
/* (the picker on the title line: .tpick in prepare.css) */
/* page tabs (explorer | gaps): .itabs and .tab-off are in prepare.css */
#ptabs { margin-bottom: 0; }
.pl { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--muted); }
.goform { display: flex; gap: 6px; margin-top: 10px; }
.goform input { flex: 1; min-width: 0; font-size: 13px; padding: 6px 9px; }
#goError:empty { display: none; }
#exBox .lmoves { font-size: 13px; }
/* where the position stands in your prep */
.pstat { border-radius: 10px; padding: 10px 12px; margin: 8px 0 12px; font-size: 14px; line-height: 1.5; border: 1px solid var(--border); }
.pstat.in { border-left: 4px solid var(--end); background: rgba(74,222,128,.06); }
.pstat.out { border-left: 4px solid var(--me); background: rgba(251,191,36,.06); }
.pstat.none { border-left: 4px solid var(--muted); }
.pstat b { color: #f0d9a8; }
.pstat .acts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.pstat .note { margin: 6px 0 0; }
/* the move table */
.rep.ex td.prep { white-space: nowrap; }
.pm { font-size: 11.5px; font-weight: 600; border-radius: 999px; padding: 1px 8px; border: 1px solid currentColor; white-space: nowrap; }
.pm.main { color: #ffd60a; } .pm.alt { color: #7ee2a8; } .pm.cov { color: var(--end); }
.pm.dev { color: var(--me); } .pm.gap { color: var(--opp); }
.rep.ex tbody tr.notprep td:first-child b { color: #fde68a; }
.rep.ex td.rates { white-space: nowrap; }
.rep.ex td small.cn { color: var(--muted); }
.exsec { margin-top: 16px; }
.exsec h3 { margin: 0 0 6px; font-size: 14px; color: #e6edf3; }
.exsec h3 small { font-weight: 400; margin-left: 6px; }
.chlist { display: flex; flex-direction: column; }
.chrow { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 6px 4px; border-top: 1px solid var(--border); font-size: 13px; }
.chrow span { min-width: 0; overflow-wrap: anywhere; }
.chrow small { color: var(--muted); }
.legend { font-size: 12px; color: var(--muted); margin: 8px 0 0; line-height: 1.7; }
@media (max-width: 600px) {
  .rep.ex th:nth-child(4), .rep.ex td:nth-child(4), .rep.ex th:nth-child(6), .rep.ex td:nth-child(6) { display: none; }
}
/* ---------- repertoire builder ---------- */
.nfform { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.nfform .pl label { display: inline-flex; gap: 4px; align-items: center; color: #e6edf3; }
.nfform input[type="text"], .nfform #nfName { min-width: 220px; }
#nfError:empty { display: none; }
.nfform #nfError { flex-basis: 100%; margin: 0; }
.edbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { border: 1px solid var(--border); background: transparent; color: var(--muted); border-radius: 999px; padding: 3px 11px; font: 500 12.5px 'Poppins', sans-serif; cursor: pointer; }
.chip:hover { color: #e6edf3; }
.firsts { display: inline-flex; gap: 4px; flex-wrap: wrap; align-items: center; margin-left: 6px; padding-left: 10px; border-left: 1px solid var(--border); }
.fm { display: inline-flex; gap: 4px; align-items: center; font: 500 12.5px 'Poppins', sans-serif; color: #e6edf3; cursor: pointer; padding: 2px 6px; border-radius: 6px; }
.fm.off { color: var(--muted); text-decoration: line-through; }
.fm input { margin: 0; cursor: pointer; }
#gapBox .chips { margin: 6px 0; align-items: center; }
#gapBox .firsts { margin-left: 0; padding-left: 0; border-left: 0; }
.chip.on { background: rgba(255,214,10,.14); border-color: var(--gold); color: #ffd60a; }
.svbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; min-height: 30px; }
.svst { font-size: 12.5px; color: var(--muted); }
.svst.dirty { color: #fbbf24; font-weight: 600; }
.svst.ok { color: var(--end); }
.flash { font-size: 13px; padding: 6px 10px; border-radius: 8px; background: rgba(255,255,255,.04); border: 1px solid var(--border); margin-bottom: 8px; }
.rep.ex td.acts { white-space: nowrap; text-align: right; width: 1%; }
.ed { border: 1px solid var(--border); background: transparent; color: #e6edf3; border-radius: 6px; padding: 1px 7px; margin-left: 4px; cursor: pointer; font-size: 13px; line-height: 1.5; }
.ed:hover { border-color: var(--gold); color: #ffd60a; }
.ed.add { color: #7ee2a8; }
.ed.del:hover { border-color: #f87171; color: #f87171; }
.addbox { margin-top: 8px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.addbox .row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.addbox input { font-size: 13px; padding: 4px 8px; min-width: 240px; }
.addbox select, #edCh { max-width: 320px; }
.pstat .hint { color: var(--muted); align-self: center; }
.noted { margin-top: 8px; }
.noted textarea { width: 100%; box-sizing: border-box; font: 13px 'Poppins', sans-serif; padding: 6px 8px; resize: vertical; }
#gapBox h2 { margin: 0 0 4px; font-size: 18px; }
#gapBox h2 small { color: var(--muted); font-weight: 400; font-size: 14px; margin-left: 6px; }
.gaplist { display: flex; flex-direction: column; margin: 8px 0; }
.gap { display: grid; grid-template-columns: minmax(0, 1fr) 80px 100px; gap: 10px; align-items: center; text-align: left; width: 100%;
  background: none; border: 0; border-top: 1px solid var(--border); color: inherit; padding: 7px 6px; cursor: pointer; font: 13px 'Poppins', sans-serif; }
.gap:hover { background: rgba(255,255,255,.05); }
.gap .gl { font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; overflow-wrap: anywhere; }
.gap .gl b { color: #f87171; }
.gap .gn { color: #e6edf3; }
.gap .gd { color: var(--muted); }
@media (max-width: 600px) {
  .gap { grid-template-columns: minmax(0, 1fr) 64px; }
  .gap .gd { display: none; }
  .addbox input { min-width: 0; width: 100%; }
}
/* the board as large as in the trainer (css/train.css): sized to the screen height, it stays in view while you scroll */
body[data-page="repexplore"] .exgrid { --exb: clamp(320px, calc(100vh - var(--hdr, 84px) - 160px), 860px); }
/* the other chapters' notes on a position (repexplore.js), folded away behind ＋ */
.morenotes { margin: 2px 0 6px; }
.morenotes > summary { cursor: pointer; list-style: none; font-size: 13px; color: var(--gold); display: inline-block; padding: 2px 0; }
.morenotes > summary::-webkit-details-marker { display: none; }
.morenotes[open] > summary { color: var(--muted); }
.morenotes .note { margin: 4px 0; }
/* the section tabs and the side tabs on one row (repexplore.html .secrow): the side tabs are smaller pills on the right,
   only with the explorer (the gaps have their own side choice) */
.secrow { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; column-gap: 12px; row-gap: 6px; margin: 14px 0 0; border-bottom: 1px solid var(--border); }
.secrow > .itabs { margin: 0; border-bottom: 0; }
.secrow > .sidetabs { margin: 0 0 4px; gap: 6px; }
.secrow > .sidetabs .tab { padding: 4px 12px; font-size: 13px; }
.secrow.one > .sidetabs, .secrow:has(#ptabs[hidden]) > .sidetabs, .secrow:has(#ptab-gaps[aria-selected="true"]) > .sidetabs { display: none; }
