/* The replay toolbar.
 *
 * Its own stylesheet for the same reason picker.css is: the chrome is being restyled in style.css
 * and windows.css by a parallel session, and a component landing in either would collide. Scoped
 * entirely to .rb, and reading the shared tokens so a theme change carries it.
 */

.rb {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 30px;
  padding: 0 8px;
  background: var(--panel);
  border-top: 1px solid var(--line);
  color: var(--ink-dim);
  font: var(--t-sm) var(--ui);
  user-select: none;
}
.rb[hidden] { display: none; }

.rb-btn {
  height: 21px;
  min-width: 26px;
  padding: 0 8px;
  border: 1px solid var(--line-2);
  border-radius: 4px;
  background: var(--panel-2);
  color: var(--ink-dim);
  font: var(--t-xs) var(--ui);
  letter-spacing: .04em;
  cursor: pointer;
}
.rb-btn:hover { color: var(--ink); border-color: #4d4d57; background: var(--panel-3); }
.rb-btn:active { background: var(--sel); }

/* Play is the one control that reports as well as acts, so it carries the state. */
.rb-play { min-width: 56px; color: var(--ink); }
.rb-play.on { background: var(--panel-3); border-color: #4d4d57; }

.rb-stop { color: var(--ink-dim); }
.rb-stop:hover { color: var(--sell-hi); border-color: var(--sell); }

.rb-sep {
  width: 1px;
  height: 15px;
  margin: 0 4px;
  background: var(--line-2);
}

.rb-speed {
  height: 21px;
  padding: 0 4px;
  border: 1px solid var(--line-2);
  border-radius: 4px;
  background: var(--panel-2);
  color: var(--ink);
  font: var(--t-xs) var(--mono);
  cursor: pointer;
}
.rb-speed:hover { border-color: #4d4d57; }
.rb-speed:focus { outline: none; border-color: var(--focus); }

/* The scrubber takes the slack, because it is the control that wants room: a wider track is
   literally more precision. */
.rb-scrub {
  -webkit-appearance: none;
  appearance: none;
  flex: 1 1 auto;
  min-width: 80px;
  height: 4px;
  margin: 0 6px;
  border-radius: 2px;
  background: var(--line-2);
  cursor: pointer;
}
.rb-scrub::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 11px;
  height: 11px;
  margin-top: -3.5px;
  border: 0;
  border-radius: 50%;
  background: var(--ink);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .5);
}
.rb-scrub::-moz-range-thumb {
  width: 11px;
  height: 11px;
  border: 0;
  border-radius: 50%;
  background: var(--ink);
}
.rb-scrub:focus { outline: none; }
.rb-scrub:focus::-webkit-slider-thumb { box-shadow: 0 0 0 2px var(--focus); }

/* Monospaced, because it is a counter that changes many times a second and a proportional font
   makes it jitter sideways while it counts. */
.rb-pos {
  flex: 0 0 auto;
  min-width: 150px;
  color: var(--ink-faint);
  font: var(--t-xs) var(--mono);
  text-align: right;
  white-space: pre;
}
