/* vt-0849 — Session Replay scrubber styling.
   Tokens from themes.css (refined design system). Mirrors the visual
   weight of #sdetail + .viewer so the replay page reads as part of
   the session-detail family of views. */

.sr-root {
  display: flex;
  flex-direction: column;
  gap: 0.8em;
  padding: 1em 1.4em 1.4em;
}

.sr-head {
  display: flex;
  align-items: baseline;
  gap: 1em;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.6em;
}
.sr-head .sr-sid {
  font-family: var(--font-mono);
  color: var(--accent);
  font-weight: 600;
}
.sr-back {
  margin-left: auto;
  color: var(--muted-strong);
  text-decoration: none;
  font-size: 0.85em;
  letter-spacing: 0.04em;
}
.sr-back:hover { color: var(--accent); }

/* ── two-column layout: terminal + scrubber on the left, bookmarks right ── */
.sr-layout {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 1em;
  align-items: stretch;
}
@media (max-width: 980px) {
  .sr-layout { grid-template-columns: 1fr; }
}

.sr-main {
  display: flex;
  flex-direction: column;
  gap: 0.5em;
  min-width: 0;            /* let xterm shrink in a grid cell */
}

/* ── xterm host ── */
.sr-term {
  background: var(--term-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-height: 360px;
  height: 50vh;
  padding: 0.5em;
  overflow: hidden;        /* xterm.js owns its own scroll */
}
.sr-term:focus { outline: 1px solid var(--accent); outline-offset: 1px; }

.sr-status {
  font-family: var(--font-mono);
  font-size: 0.78em;
  color: var(--muted);
  padding: 0 0.2em;
}

/* ── scrubber row (video-player style) ── */
.sr-scrubber {
  display: flex;
  align-items: center;
  gap: 0.6em;
  padding: 0.5em 0.6em;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.sr-btn-play, .sr-btn-bm {
  width: 2.2em;
  height: 2.2em;
  font-size: 0.95em;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.sr-time {
  font-family: var(--font-mono);
  font-size: 0.85em;
  color: var(--fg-soft);
  min-width: 3.5em;
  text-align: center;
}
.sr-bar {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  outline: none;
  cursor: pointer;
}
.sr-bar::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  border: 1px solid var(--accent-strong);
  box-shadow: 0 0 0 3px var(--accent-soft);
  cursor: pointer;
}
.sr-bar::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  border: 1px solid var(--accent-strong);
  box-shadow: 0 0 0 3px var(--accent-soft);
  cursor: pointer;
}
.sr-speed {
  background: var(--surface);
  color: var(--fg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.25em 0.5em;
  font-family: var(--font-mono);
  font-size: 0.78em;
}

/* ── keyframe tick marks (rendered below the slider) ── */
.sr-kf-marks {
  position: relative;
  height: 4px;
  pointer-events: none;
}
.sr-kf-tick {
  position: absolute;
  top: 0;
  width: 2px;
  height: 4px;
  background: var(--accent-strong);
  opacity: 0.55;
  transform: translateX(-1px);
}

/* ── sidebar: bookmarks + share ── */
.sr-side {
  display: flex;
  flex-direction: column;
  gap: 0.5em;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.8em;
  min-height: 200px;
}
.sr-side-h {
  font-family: var(--font-display);
  font-size: 0.7em;
  letter-spacing: 0.12em;
  color: var(--muted-strong);
  margin: 0.4em 0 0.2em;
  text-transform: uppercase;
}
.sr-bookmarks {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25em;
  max-height: 36vh;
  overflow: auto;
}
.sr-bm {
  padding: 0.35em 0.5em;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 0.1em;
}
.sr-bm:hover { background: var(--surface-2); }
.sr-bm a {
  color: var(--fg);
  text-decoration: none;
  font-size: 0.88em;
}
.sr-bm .lbl {
  font-family: var(--font-mono);
  font-size: 0.7em;
  color: var(--muted);
}
.sr-share-url {
  word-break: break-all;
  font-family: var(--font-mono);
  font-size: 0.72em;
  padding: 0.4em 0.5em;
  background: var(--surface-2);
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  cursor: copy;
  min-height: 1.5em;
}
