/* ═══════════════════════════════════════════
   CONTROLS TOOLBAR
═══════════════════════════════════════════ */

#controls {
  height: var(--controls-h);
  padding: 0 var(--sp-4);
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-panel);
  flex-shrink: 0;
  position: relative;
}

.ctrl-group {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.ctrl-sep {
  width: 1px;
  height: 24px;
  background: var(--border-subtle);
  flex-shrink: 0;
}

/* ── Control Buttons ── */
.ctrl-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--r-md);
  border: 1px solid var(--border-default);
  background: var(--bg-card);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--t-fast) var(--ease);
  flex-shrink: 0;
}
.ctrl-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--border-strong);
}
.ctrl-btn:active { transform: scale(0.96); }
.ctrl-btn:disabled { opacity: 0.35; cursor: not-allowed; pointer-events: none; }

/* ── Play Button ── */
.ctrl-play {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--accent-purple);
  border-color: var(--accent-purple);
  color: #fff;
  box-shadow: 0 0 0 0 var(--accent-purple-glow);
  transition: all var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease);
}
.ctrl-play:hover {
  background: #7c7ff7;
  border-color: #7c7ff7;
  color: #fff;
  box-shadow: 0 0 0 6px var(--accent-purple-glow);
  transform: scale(1.06);
}
.ctrl-play.playing {
  background: var(--accent-amber);
  border-color: var(--accent-amber);
  box-shadow: 0 0 0 0 rgba(245,158,11,0.3);
}
.ctrl-play.playing:hover { box-shadow: 0 0 0 6px rgba(245,158,11,0.25); }

/* ── Sliders ── */
.ctrl-label {
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  flex-shrink: 0;
}

.ctrl-slider {
  -webkit-appearance: none;
  appearance: none;
  height: 3px;
  border-radius: 2px;
  outline: none;
  cursor: pointer;
  position: relative;
}

.slider-purple {
  width: 90px;
  background: linear-gradient(
    to right,
    var(--accent-purple) 0%,
    var(--accent-purple) calc(var(--pct, 44%) * 1%),
    var(--bg-active) calc(var(--pct, 44%) * 1%),
    var(--bg-active) 100%
  );
}

.slider-cyan {
  width: 80px;
  background: linear-gradient(
    to right,
    var(--accent-cyan) 0%,
    var(--accent-cyan) calc(var(--pct, 30%) * 1%),
    var(--bg-active) calc(var(--pct, 30%) * 1%),
    var(--bg-active) 100%
  );
}

.ctrl-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  cursor: pointer;
  transition: transform var(--t-fast);
}
.ctrl-slider::-webkit-slider-thumb:hover { transform: scale(1.2); }
.ctrl-slider::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
}

.slider-purple::-webkit-slider-thumb {
  background: var(--accent-purple);
  box-shadow: 0 0 0 3px var(--accent-purple-dim);
}
.slider-cyan::-webkit-slider-thumb {
  background: var(--accent-cyan);
  box-shadow: 0 0 0 3px var(--accent-cyan-dim);
}

/* ── Step Counter ── */
.step-counter {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  min-width: 70px;
  text-align: center;
}

/* ── Progress Bar (shown below controls on mobile) ── */
.progress-bar-container {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--border-subtle);
}
.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-purple), var(--accent-cyan));
  transition: width 0.1s linear;
  border-radius: 1px;
}
