/* =============================================================================
   appearance.css — the colour rows and the hue wheel on the Appearance page
   ============================================================================= */
/* The Appearance page's *theme* half reuses `.segmented` from settings.css —
   this file is only the colour half. See src/js/appearance.js for the model:
   a pick is a hue and a saturation, and each theme supplies its own lightness,
   which is why there is no lightness slider here to style. */

/* ── A colour row ── */
.color-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
}
.color-row-name {
  flex: 0 0 74px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text);
}

/* The circle. It is the control as well as the readout, so it gets the ring and
   lift a button gets — a flat disc reads as a label. */
.color-swatch {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid var(--border2);
  box-shadow: inset 0 1px 0 var(--emboss-hi), 0 1px 3px var(--emboss-lo);
  cursor: pointer;
  transition: transform 0.12s, box-shadow 0.12s;
}
.color-swatch:hover { transform: scale(1.08); }
.color-row.open .color-swatch {
  box-shadow: 0 0 0 2px var(--panel), 0 0 0 4px var(--accent);
}

.color-row-value {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  color: var(--text-dim);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* An untouched role reads as the palette's own rather than as a choice. */
.color-row-value.is-default { font-style: italic; opacity: 0.75; }

.color-clear { flex: 0 0 auto; }
.color-clear:disabled { opacity: 0.4; cursor: default; }

/* ── The wheel panel ── */
/* Moved under whichever row was clicked (see `openColorWheel`), so it reads as
   that row opening. Inline rather than floating: this modal can scroll on a
   short window, and a popover would need positioning and clipping logic to
   survive that for no gain. */
#color-wheel-pop {
  margin: 4px 0 10px;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 5px;
  box-shadow: inset 0 1px 0 var(--emboss-hi);
}
.wheel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent);
}

/* The face itself is painted from JS — a conic hue ring over a grey centre, at
   the lightness the role will actually be given, so the wheel previews the
   result rather than a nominal 50%.

   **The only literal colours in the app are in that gradient, and they belong
   there.** Everything else must be a token or it is wrong in one of the two
   palettes; a spectrum is not themed, it *is* the colours, and it means the
   same thing in both. */
.color-wheel {
  position: relative;
  width: 100%;
  max-width: 190px;
  aspect-ratio: 1;
  margin: 0 auto;
  border-radius: 50%;
  border: 1px solid var(--border2);
  box-shadow: inset 0 0 0 1px var(--emboss-hi), 0 2px 8px var(--emboss-lo);
  cursor: crosshair;
  touch-action: none;   /* the wheel is dragged, not scrolled */
}

/* Rides the point that produced the current hue and saturation. Hidden while
   the role is still the palette's default: there is no pick to mark. */
.wheel-knob {
  position: absolute;
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;   /* centred on its own left/top */
  border-radius: 50%;
  border: 2px solid var(--paper);
  box-shadow: 0 0 0 1px var(--ink), 0 1px 4px var(--emboss-lo);
  pointer-events: none;    /* the wheel underneath owns the drag */
}

.wheel-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
}
.wheel-hex {
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  color: var(--text-dim);
}
