/*! appearance.css 1.0.0 | DJ2000-UK/app-workbench */
/* The Vibrancy and Contrast sliders that appearance.js mount() draws. Every colour
   comes from the app's own tokens (Kaizen's accent is --cyan), so the sliders follow
   the palette and the settings they change. The input is 44 px tall for the finger;
   the track is drawn thin inside it. */

.djcns-appearance {
  --ap-accent: var(--accent, var(--cyan));
  --ap-thumb-shadow: color-mix(in srgb, var(--void) 70%, transparent);
  display: grid;
  gap: 18px;
  margin-top: 20px;
  color: var(--ink);
}
.djcns-appearance__control { display: grid; gap: 2px; }
.djcns-appearance__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.djcns-appearance__label { font-size: 14px; font-weight: 650; }  /* a span, not a <label>: the 44 px slider is the target */
.djcns-appearance__head output { color: var(--muted-bright); font-size: 13px; font-variant-numeric: tabular-nums; }
.djcns-appearance__ends { display: flex; justify-content: space-between; margin-top: -4px; color: var(--muted); font-size: 12px; }
.djcns-appearance__help { margin: 6px 0 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.djcns-appearance__foot { display: grid; gap: 10px; justify-items: start; }
.djcns-appearance__note { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.djcns-appearance__reset:disabled { opacity: .45; cursor: default; }

/* The track shows what the slider does: from a softened accent to the full one, and
   from the muted grey to the ink. */
.djcns-appearance__range {
  --ap-track: linear-gradient(90deg, color-mix(in oklab, var(--ap-accent) 35%, var(--muted)), var(--ap-accent));
  width: 100%;
  height: 44px;
  margin: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
}
.djcns-appearance__range--contrast { --ap-track: linear-gradient(90deg, var(--muted), var(--ink)); }
.djcns-appearance__range:focus { outline: none; }
.djcns-appearance__range:focus-visible { outline: 2px solid var(--ap-accent); outline-offset: 2px; border-radius: 12px; }
.djcns-appearance__range::-webkit-slider-runnable-track { height: 6px; border-radius: 999px; background: var(--ap-track); }
.djcns-appearance__range::-moz-range-track { height: 6px; border-radius: 999px; background: var(--ap-track); }
.djcns-appearance__range::-webkit-slider-thumb {
  width: 28px;
  height: 28px;
  margin-top: -11px;
  border: 0;
  border-radius: 50%;
  background: var(--ink);
  box-shadow: 0 0 0 1px var(--line-strong), 0 3px 10px var(--ap-thumb-shadow);
  -webkit-appearance: none;
  appearance: none;
}
.djcns-appearance__range::-moz-range-thumb {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: var(--ink);
  box-shadow: 0 0 0 1px var(--line-strong), 0 3px 10px var(--ap-thumb-shadow);
}
@media (prefers-reduced-motion: no-preference) {
  .djcns-appearance__range::-webkit-slider-thumb { transition: transform var(--dur-quick, 140ms) ease-out; }
  .djcns-appearance__range:active::-webkit-slider-thumb { transform: scale(1.08); }
}
