/* Dock controls other than the stream presets: labels with an info tip, and the sliders with preset marks. */
.group {
  position: relative;
}
.gl-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 18px;
}
.gl-row .val {
  margin-left: auto;
  color: var(--fg);
  font: 600 12px var(--mono);
  font-variant-numeric: tabular-nums;
}

/* The small "i" and the short sentence it shows on hover or keyboard focus. */
.info {
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font:
    italic 600 11px / 1 Georgia,
    "Times New Roman",
    serif;
  cursor: help;
  transition:
    color var(--fast),
    border-color var(--fast);
}
.info:hover,
.info:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
}
.tip {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 0;
  z-index: 6;
  width: max-content;
  max-width: 100%; /* never wider than its group, so it cannot push the page sideways */
  padding: 6px 10px;
  border-radius: 8px;
  background: var(--fg);
  color: var(--bg);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  pointer-events: none;
  transition:
    opacity var(--fast) var(--ease),
    transform var(--fast) var(--ease),
    visibility 0s var(--fast);
}
.info:hover + .tip,
.info:focus-visible + .tip {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition-delay: 0s;
}

/* Sliders: a thin track that fills up to a pill-shaped thumb carrying the value, and small marks at the presets. */
.slide {
  flex: 1 1 190px;
  min-width: 190px;
  max-width: 360px;
}
.slide:has(.rand) {
  flex-basis: 270px;
  max-width: 460px;
}
.slide-row {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  width: 100%;
  height: 52px;
}
.slider {
  position: relative;
  flex: 1 1 176px;
  min-width: 176px;
  height: 52px;
  border-radius: 12px;
  cursor: pointer;
  touch-action: none;
  user-select: none;
}
.slider:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.rail {
  position: absolute;
  top: 0;
  left: 26px;
  width: calc(100% - 52px);
  height: 52px;
  overflow: visible;
}
.track,
.fill {
  stroke-width: 4;
  stroke-linecap: round;
}
.track {
  stroke: var(--line-strong);
}
.fill {
  stroke: var(--accent);
}
.thumb rect {
  fill: var(--accent);
  stroke: var(--surface);
  stroke-width: 2;
}
.thumb text {
  fill: var(--accent-ink);
  font: 600 11px var(--mono);
  font-variant-numeric: tabular-nums;
  text-anchor: middle;
  pointer-events: none;
}
.tick rect {
  fill: transparent;
  cursor: pointer;
}
.tick line {
  stroke: var(--line-strong);
  stroke-width: 1.5;
  stroke-linecap: round;
  pointer-events: none;
  transition: stroke var(--fast);
}
.tick:hover line {
  stroke: var(--accent);
}
.tick text {
  fill: var(--muted);
  font: 500 10px var(--mono);
  text-anchor: middle;
  pointer-events: none;
  transition: fill var(--fast);
}
.tick:hover text {
  fill: var(--fg);
}
.tick.on text {
  fill: var(--accent);
  font-weight: 700;
}
.tick.on line {
  stroke: var(--accent);
  stroke-width: 2;
}
.rand,
.tg {
  height: 30px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition:
    background-color var(--fast),
    color var(--fast),
    border-color var(--fast);
}
.rand {
  align-self: flex-start;
  margin-top: 1px;
}
.rand:hover,
.tg:hover {
  color: var(--fg);
}
.rand[aria-pressed="true"],
.tg[aria-pressed="true"] {
  border-color: transparent;
  background: var(--accent-soft);
  color: var(--accent);
}

@media (prefers-reduced-motion: reduce) {
  .tip,
  .info,
  .rand,
  .tick line {
    transition: none;
  }
}
