/* Skate Bud web demo: the Shifts and Session tabs (js/screens-tabs.js). Both stand on the video page of
   css/review.css. Rules that touch its rv- parts are scoped under .tb-shifts, .tb-session or our own row class.
   Class prefix tb-. Light mode only. */

.tb-shifts, .tb-session { height: 100%; }

/* ======================= Shifts ======================= */

/* the start card, on the dark stage */
.tb-start { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 100%; color: #fff; text-align: center; }
.tb-start.is-wide { gap: 14px; padding: 0 12px; }
.tb-nums { display: flex; justify-content: center; align-items: baseline; gap: 20px; flex-wrap: nowrap; }
.tb-start.is-wide .tb-nums { gap: 30px; }
.tb-stat { display: flex; flex-direction: column; align-items: center; }
.tb-sv { font-size: 20px; line-height: 25px; font-weight: 600; color: #fff; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tb-start.is-wide .tb-sv { font-size: 22px; line-height: 28px; }
.tb-sw { font-size: 12px; line-height: 16px; color: rgba(255, 255, 255, 0.7); white-space: nowrap; }
.tb-chart { max-width: 100%; }
.tb-lrow { display: flex; align-items: center; gap: 6px; }
.tb-lhead { flex: none; width: 54px; text-align: left; font-size: 12px; line-height: 16px; font-weight: 600; color: rgba(255, 255, 255, 0.8); }
.tb-lane { position: relative; flex: 1 1 auto; min-width: 4px; height: 12px; cursor: pointer; }
.tb-chart.is-wide .tb-lane { height: 18px; }
.tb-lane::after { content: ""; position: absolute; left: 0; right: 0; top: -10px; bottom: -10px; }
.tb-ctrack { position: absolute; left: 0; right: 0; top: 0; bottom: 0; border-radius: 999px; background: rgba(255, 255, 255, 0.10); }
.tb-cbar { position: absolute; top: 2px; bottom: 2px; border-radius: 2px; background: rgba(255, 255, 255, 0.85); }
.tb-cbar.is-long { background: #4fc683; }
.tb-clab {
  position: absolute; top: 50%; transform: translateY(-50%); font-size: 11px; line-height: 13px; font-weight: 700;
  color: #4fc683; white-space: nowrap; pointer-events: none; font-variant-numeric: tabular-nums;
}
.tb-avg { margin: 0; font-size: 12px; line-height: 16px; color: rgba(255, 255, 255, 0.7); white-space: nowrap; }
.tb-skeys { display: flex; justify-content: center; gap: 10px; max-width: 100%; }
.tb-start.is-wide .tb-skeys { padding-top: 4px; }
.tb-skeys .sb-glass { min-width: 0; overflow: hidden; }
.tb-start.is-wide .tb-skeys .sb-glass { padding: 12px 18px; }
.tb-watch { font-weight: 600; }
.tb-watch span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.tb-start-icon { color: rgba(255, 255, 255, 0.6); }
.tb-start-t { margin: 0; font-size: 20px; line-height: 25px; font-weight: 700; }
.tb-start-l { margin: 0; max-width: 320px; font-size: 15px; line-height: 20px; color: rgba(255, 255, 255, 0.75); }

/* the shift card under the video (the page's now-card, with our own arrows and count) */
.tb-shifts .rv-now-count { display: none; }
.tb-nav {
  flex: none; display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px;
  border-radius: 50%; border: 1px solid var(--sb-border2); color: var(--sb-blue); background: var(--sb-panel);
}
.tb-nav:active { background: var(--sb-fill3); }
.tb-nav:disabled { color: var(--sb-label3); border-color: var(--sb-border); cursor: default; background: var(--sb-panel); }
.tb-n1 { font-size: 15px; line-height: 20px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.tb-n2 { font-size: 12px; line-height: 16px; color: var(--sb-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.tb-ncount { flex: none; font-size: 12px; line-height: 16px; color: var(--sb-muted); font-variant-numeric: tabular-nums; }

/* a shift row: the still is the page's 76 wide thumbnail, the length badge sits on its bottom-right corner */
.rv-row.tb-srow { position: relative; padding: 6px 12px; gap: 10px; }
.tb-r1 { font-size: 15px; line-height: 20px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.tb-r2 { font-size: 12px; line-height: 16px; color: var(--sb-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.tb-r3 { font-size: 11px; line-height: 13px; color: var(--sb-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.tb-badge {
  position: absolute; left: 85px; top: 50%; transform: translate(-100%, calc(18.5px - 100%));
  padding: 0 4px; border-radius: 999px; background: rgba(0, 0, 0, 0.6); color: #fff; pointer-events: none;
  font-size: 11px; line-height: 14px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap;
}
/* with the start card up, no row counts as open */
.tb-startmark { display: none; }
.rv-row.tb-srow.is-open:has(.tb-startmark) { background: var(--sb-panel); }

/* ======================= Session ======================= */

/* the page's own clip bar, now-card and list give way to ours */
.tb-session .rv-page > .rv-scrub, .tb-session .rv-left > .rv-scrub { display: none; }
.tb-session .rv-now { display: none; }
.tb-session .rv-list-col { display: none; }
.tb-session .rv-col { width: 236px; }
.tb-session .rv-status .rv-step { display: none; }
.tb-session.is-making .rv-keyrows, .tb-session.is-making .rv-keys-row, .tb-session.is-making .rv-keys-wide { display: none; }

/* over the video */
.tb-ov-bl {
  position: absolute; left: 8px; bottom: 8px; z-index: 3; display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
  pointer-events: none;
}
.tb-ov-bl > * { pointer-events: auto; }
.tb-snote {
  padding: 3px 8px; border-radius: 999px; background: var(--sb-accent); color: #fff; pointer-events: none;
  font-size: 12px; line-height: 16px; font-weight: 700; white-space: nowrap;
}
.tb-ov-bl > .tb-snote { pointer-events: none; }
.tb-ov-br { position: absolute; right: 8px; bottom: 8px; z-index: 3; }
.tb-corner { flex-direction: column; align-items: flex-end; gap: 0; text-align: right; }
.tb-corner b { font-size: 13px; line-height: 17px; font-weight: 600; }
.tb-corner span { font-size: 11px; line-height: 13px; opacity: 0.8; font-variant-numeric: tabular-nums; }

/* the strip, the two-minute bar and row 1, between the video and the page's keys */
.tb-sblock { flex: none; display: flex; flex-direction: column; background: var(--sb-bg); }
.tb-strip-wrap { padding: 6px 6px 0; }
.tb-strip { display: block; width: 100%; touch-action: none; cursor: pointer; }
.tb-zoom-wrap { padding: 4px 6px 0; }
.tb-zoom { display: block; width: 100%; height: 30px; touch-action: none; cursor: ew-resize; }
.tb-row1 { display: flex; align-items: center; gap: 4px; padding: 6px 10px 0; }
.tb-session.is-wide .tb-row1 { gap: 6px; }
.tb-row1 .sb-glass { height: 32px; font-variant-numeric: tabular-nums; }
.tb-session.is-compact .tb-row1 .tb-stepk { flex: 1 1 0; min-width: 22px; padding: 0 4px; }
.tb-edge { flex: none; gap: 4px; }
.tb-session.is-compact .tb-edge { width: 34px; padding: 0; }
.tb-steps { display: flex; align-items: center; gap: 4px; }
.tb-steps .tb-stepk { min-width: 40px; padding: 0 8px; }
.tb-play { min-width: 26px; }
.tb-sp { flex: 1 1 auto; min-width: 0; }

/* the New clip row, in row 2's place */
.tb-ncrow { display: flex; align-items: center; gap: 6px; min-height: 52px; padding: 4px 10px; }
.tb-ncrow .sb-glass { height: 34px; }
.tb-ncx { flex: none; width: 34px; padding: 0; }
.tb-ncend { flex: 1 1 0; min-width: 0; overflow: hidden; font-variant-numeric: tabular-nums; }
.tb-ncend.is-set { background: rgba(183, 121, 31, 0.18); color: #b7791f; font-weight: 600; }
.tb-nclen { flex: none; min-width: 40px; text-align: center; font-size: 15px; line-height: 20px; font-weight: 700; color: #b7791f; font-variant-numeric: tabular-nums; }
.tb-ncstar { flex: none; width: 38px; padding: 0; }
.tb-ncstar.is-lit { background: rgba(234, 179, 8, 0.92); color: #fff; }
.tb-ncsave { flex: none; font-weight: 600; }

/* the list of marks (the wide column, or the sheet) */
.tb-slist { position: relative; background: var(--sb-panel); }
.tb-slist.is-col { flex: 1 1 auto; min-height: 0; overflow-x: hidden; overflow-y: auto; }
.tb-slist.is-sheet { padding-bottom: 8px; }
.tb-sec {
  position: sticky; top: 0; z-index: 1; min-height: 22px; padding: 3px 12px 1px; background: var(--sb-panel);
  font-size: 13px; line-height: 18px; font-weight: 600; font-variant: small-caps; color: var(--sb-label2);
}
.tb-mrow {
  display: flex; align-items: center; gap: 8px; width: 100%; min-height: 30px; padding: 2px 12px;
  font-size: 15px; line-height: 20px; text-align: left; color: var(--sb-text); background: var(--sb-panel);
}
.tb-mrow:active { background: var(--sb-fill3); }
.tb-mrow.is-under { background: var(--sb-sel); }
.tb-micon { flex: none; width: 18px; display: flex; align-items: center; justify-content: center; }
.tb-rect { display: block; width: 14px; height: 10px; border-radius: 2px; background: currentColor; }
.tb-mtime { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tb-slist.is-col .tb-mtime { font-size: 14px; }
.tb-msp { flex: 1 1 auto; min-width: 0; }
.tb-mstate { flex: none; font-size: 12px; line-height: 16px; font-weight: 700; white-space: nowrap; }
.tb-lempty { margin: 0; padding: 10px 12px; font-size: 15px; line-height: 20px; color: var(--sb-muted); }

/* the status line, filtered */
.rv-status.tb-filtered, .tb-sstatus.tb-filtered { color: var(--sb-accent); background: rgba(0, 122, 255, 0.075); }
.tb-fkey.is-line { flex: none; width: 28px; height: 22px; padding: 0; }

/* the list sheet's bar: the title, then Filter and Done */
.tb-shead { grid-template-columns: 96px 1fr 96px; }
.tb-shead-keys { justify-self: end; display: flex; align-items: center; gap: 6px; }
.tb-done { display: inline-flex; align-items: center; gap: 3px; }

/* the Filter box */
.tb-filter { width: 320px; max-height: 360px; padding: 8px 0; }
.tb-fhead { display: flex; align-items: center; justify-content: space-between; padding: 6px 16px; }
.tb-fhead b { font-size: 17px; line-height: 22px; font-weight: 600; }
.tb-fall { font-size: 13px; line-height: 18px; font-weight: 600; color: var(--sb-blue); min-height: 32px; }
.tb-fgroup { margin: 4px 12px; border-radius: 12px; background: rgba(255, 255, 255, 0.75); overflow: hidden; }
.tb-frow { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 36px; padding: 4px 16px; font-size: 15px; line-height: 20px; text-align: left; color: var(--sb-text); }
.tb-frow + .tb-frow { box-shadow: inset 0 0.5px 0 rgba(60, 60, 67, 0.2); }
.tb-frow:active { background: var(--sb-fill3); }
.tb-fdot { flex: none; width: 12px; height: 12px; border-radius: 50%; }
.tb-fname { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tb-fcount { flex: none; color: var(--sb-muted); font-variant-numeric: tabular-nums; }
.tb-ftick { flex: none; width: 18px; display: flex; justify-content: center; color: var(--sb-blue); }
.tb-ffoot { display: flex; align-items: center; gap: 8px; margin: 6px 16px; font-size: 12px; line-height: 16px; color: var(--sb-muted); }
.tb-fswatch { flex: none; width: 12px; height: 9px; border-radius: 2px; background: #1f8a4c; }

/* focus */
.tb-mrow:focus-visible, .tb-frow:focus-visible, .tb-nav:focus-visible, .tb-lane:focus-visible, .tb-fall:focus-visible,
.tb-strip:focus-visible, .tb-zoom:focus-visible {
  outline: 2px solid var(--sb-accent); outline-offset: -2px;
}
