/* Hand navigation (browse, left column): read top to bottom, one row per action taken, draw rounds as separators,
   the current decision's options at the bottom. Theme tokens with dark fallbacks. */
.studybar {
  --sb-bg: var(--bar-bg, #111111);
  --sb-tile: var(--bar-tile, #1c1c1c);
  --sb-tile-hover: var(--bar-tile-hover, #2a2a2a);
  --sb-current: var(--bar-current, #252525);
  --sb-text: var(--bar-text, #f2f2f2);
  --sb-muted: var(--bar-muted, #9a9a9a);
  --sb-sel: var(--bar-sel, #3d3d3d);
  --sb-accent: var(--bar-accent, var(--accent, #a3a9ff));
  --sb-warn: var(--bar-warn, #f0a93b);
  display: flex; flex-direction: column; gap: 6px; background: var(--sb-bg); color: var(--sb-text); border-radius: 8px; padding: 6px;
  font: 13px/1.25 var(--font-ui); box-sizing: border-box; height: calc(100vh - 118px); min-height: 420px; position: sticky; top: 10px;
  z-index: 20; /* its popups open over the table beside it */
}
.sb-strip { display: flex; flex-direction: column; gap: 4px; overflow-y: auto; overflow-x: hidden; flex: 1; min-height: 0;
  scrollbar-width: thin; scrollbar-color: #3a3d45 transparent; }
/* The tree's plaque: "2-7 Triple PL · 100bb · 2.2 ante · v6-last2" on as few lines as it takes. */
.studybar .sb-summary { display: flex; flex-direction: row; flex-wrap: wrap; gap: 2px 8px; align-items: baseline; text-align: left; flex: none;
  background: var(--sb-tile); color: var(--sb-text); border: 1px solid #3a3b42; border-radius: 5px; padding: 7px 9px;
  font: inherit; cursor: pointer; white-space: normal; }
.studybar .sb-summary:hover { background: var(--sb-tile-hover); border-color: #5c5e68; }
.studybar .sb-context { margin: 0; flex: none; line-height: 1.4; }
.sb-sum-title { font-weight: 600; font-size: 13px; }
.sb-sum-part { color: var(--sb-muted); font-size: 12px; }
.sb-sum-part::before { content: "·"; margin-right: 8px; color: var(--sb-accent); font-weight: 900; }
.sb-sum-version { color: var(--sb-text); font-weight: 600; }
.sb-cell { display: contents; }
/* Draw round separator ("2 DRAWS LEFT") before the first draw of a round. */
.sb-round { margin: 8px 2px 2px; padding: 0 6px; color: var(--sb-muted); font-size: 10px; font-weight: 700; letter-spacing: .09em;
  line-height: 18px; border-radius: 3px; background: #262629; white-space: nowrap; }

/* One row per decision: who and the action taken (coloured mark); the whole row views that decision. */
/* Rows and options are buttons with a visible edge; hover brightens it, the viewed row takes the accent. */
.sb-tile { position: relative; flex: none; border-radius: 5px; border: 1px solid #3a3b42; background: var(--sb-tile); }
.sb-tile:not(.viewed):not(.current):hover { border-color: #5c5e68; }
.studybar .sb-head { display: flex; align-items: center; gap: 8px; width: 100%; height: 28px; padding: 0 8px; background: none;
  border: none; color: var(--sb-text); font: inherit; text-align: left; cursor: pointer; border-radius: 4px; }
.studybar .sb-head:hover { background: var(--sb-tile-hover); border: none; }
.sb-head .pos { font-weight: 600; font-size: 13px; min-width: 30px; color: var(--sb-muted); }
.sb-taken { font-weight: 700; font-size: 13px; padding-left: 7px; box-shadow: inset 3px 0 0 var(--c); white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; }
.sb-to-act { color: var(--sb-muted); font-size: 12px; }
/* Draw rows stand out from betting with an accent tint; the round's band above them stays quiet grey text. */
.sb-tile.draw { background: color-mix(in srgb, var(--sb-accent) 16%, var(--sb-tile)); border-color: color-mix(in srgb, var(--sb-accent) 45%, #3a3b42); }
.sb-round { background: none; }
.sb-head .stack { margin-left: auto; color: var(--sb-muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.sb-adj { display: inline-block; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--sb-warn);
  box-shadow: 0 0 0 2px rgba(240, 169, 59, .25); }
.sb-tile.viewed { border-color: var(--sb-accent); background: var(--sb-current); }
.sb-tile.viewed .sb-head .pos, .sb-tile.viewed .sb-taken { color: var(--sb-accent); }
/* The viewed decision's continuation in the line: not played yet, so dashed and muted instead of a solid chip. */
.studybar .sb-tile.viewed .sb-taken.pending { color: var(--sb-muted); font-weight: 500; font-style: italic; box-shadow: none;
  border: 1px dashed var(--sb-muted); border-radius: 3px; padding: 0 6px; }
.sb-tile.future { opacity: .45; }
.sb-tile.future:hover { opacity: .9; }
.sb-tile.pending { opacity: .3; }
.sb-tile.pop-open:not(.viewed) { border-color: color-mix(in srgb, var(--sb-accent) 45%, transparent); }

/* The current decision: its options listed below the row, one click adds the action. */
.sb-tile.current { background: var(--sb-current); }
.sb-tile.inline { padding-bottom: 6px; }
.sb-tile.current .sb-head .pos { color: var(--sb-text); }
.sb-opts { display: flex; flex-direction: column; gap: 2px; padding: 0 6px; }
/* The player to act: three actions per row (more rows when there are more). */
.sb-tile.inline .sb-opts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3px; }
.studybar .sb-opt { display: block; width: 100%; text-align: left; background: #26272c; border: 1px solid #45464e; border-radius: 4px;
  padding: 0 10px; color: var(--sb-text); font: inherit; font-size: 13px; font-weight: 600; line-height: 26px; cursor: pointer;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.studybar .sb-tile.inline .sb-opt { text-align: center; padding: 0 4px; font-size: 12px; }
.studybar .sb-opt:hover { background: #30313a; border: 1px solid #6b6d78; }
.studybar .sb-opt.sel { background: var(--sb-sel); color: #fff; }
.studybar .sb-opt.next { outline: 1px dashed #55575e; outline-offset: -1px; }

/* Popup beside a past row (hover): the other actions of that decision, and "Make X the opener" for a folded player. */
.sb-pop { display: none; position: fixed; z-index: 40; width: 190px; background: #161618; border: 1px solid var(--border-strong);
  border-radius: 6px; padding: 6px 0 8px; box-shadow: 0 10px 28px rgba(0,0,0,.6); }
.sb-tile.pop-open .sb-pop { display: block; }
.sb-pop-title { padding: 0 10px 6px; color: var(--sb-muted); font-size: 11px; font-weight: 600; }
.sb-move { padding: 6px 6px 0; margin-top: 6px; border-top: 1px solid #2c2c30; }
.studybar .sb-move-seat { width: 100%; text-align: left; background: none; border: 1px dashed #4a4b52; border-radius: 4px; padding: 0 10px;
  color: var(--sb-text); font: inherit; font-size: 12px; font-weight: 600; line-height: 24px; cursor: pointer; }
.studybar .sb-move-seat:hover { border-color: var(--sb-accent); }
html.hide-stacks .sb-head .stack { visibility: hidden; }

/* Strategy area: old content stays until the new one is there; a thin bar after a short delay. */
.strategy-area { position: relative; }
/* The loading bar sits just above the charts (the table and action row above it never wait). */
.sa-progress-slot { position: relative; height: 0; }
.sa-progress { position: absolute; top: -5px; left: 0; height: 2px; width: 0; background: var(--sb-accent, #a3a9ff);
  opacity: 0; border-radius: 1px; pointer-events: none; }
.strategy-area.loading .sa-progress { opacity: 1; animation: sa-progress 1.2s ease-out infinite; }
.strategy-area.loading .sa-content { opacity: .72; transition: opacity .2s; }
@keyframes sa-progress { 0% { width: 0; left: 0; } 60% { width: 70%; left: 10%; } 100% { width: 10%; left: 100%; } }

/* Compact table of the viewed spot (components/table.js mounts into it). */
/* Spot panel (GTO Wizard Study "table" card): compact table left, the spot summary right. */
.spot-panel { display: flex; flex-direction: column; gap: 8px; background: #1c1c1e; border-radius: 8px; padding: 0 0 12px; }
.spot-panel:has(.browse-table-slot:empty) { display: none; }
.browse-table-slot { width: 100%; height: 300px; flex: none; }
.browse-table-slot .ptable.compact { width: 100%; height: 300px; }
/* "BB to act · Total pot 5.5 · Odds to call 1:3.7" above the action pills: one line of fixed height. */
/* Blockers overview checkbox at the right end of that line, laid over it: the line keeps its size either way. */
.head-row { position: relative; }
.head-opts { position: absolute; top: 0; right: 0; display: flex; align-items: center; height: 22px; font-size: 13px; }
.spot-info { height: 22px; line-height: 22px; color: var(--text-muted); font-size: 14px; white-space: nowrap; overflow: hidden;
  font-variant-numeric: tabular-nums; }
.spot-info b { color: var(--text); }
.spot-info .dot { margin: 0 9px; color: var(--accent); font-weight: 900; }
#play-link.disabled { opacity: .45; cursor: not-allowed; }

/* × on a row: cut the line there (top right corner, clear of the stack number). */
.studybar .sb-tile > .sb-head { padding-right: 24px; }
.studybar .sb-cut { position: absolute; top: 5px; right: 4px; width: 18px; height: 18px; padding: 0; display: grid; place-items: center;
  border: none; border-radius: 3px; background: none; color: #6c6e76; font-size: 15px; line-height: 1; cursor: pointer; z-index: 1; }
.studybar .sb-cut:hover { color: #fff; background: #3a3b42; border: none; }
