/* ============================================================================
   shared/color-picker.css — the themed HSV colour-picker popup (the canonical
   swatch → picker control that replaces the native OS colour input). Paired with
   shared/color-picker.js, which builds the popup DOM and positions it by a swatch.
   Extracted from the scene-inspector surface (now hosted by world-workspace.html) so every
   workspace's colour control shares one themed picker. SPEC tokens only.
   ========================================================================== */
/* THE PICKER IS A LEAF SURFACE, so it sits above everything that can open it.
   It is never opened on its own — a swatch somewhere else always opens it, and
   that swatch may live inside a popover (the curve/gradient sub-editor), a menu,
   or a modal. Sitting below any of them means rendering behind the very surface
   that summoned it. The editor's layer order, lowest to highest:

     in-pane chrome (chips, palettes, hints)      1 –  40
     modal mask + dialog                          120
     popovers & sub-editors (.crve, menus)        200 – 240
     the colour picker                            300   ← opened FROM those
     the shell toast                              9999  ← always legible

   A new popover belongs in the 200–240 band; nothing else belongs above it
   except a surface that is likewise opened from everything. */
.cpick{position:fixed;z-index:300;background:var(--panel);border:1px solid var(--line);border-radius:10px;box-shadow:0 14px 40px rgba(0,0,0,.6);padding:8px;width:168px}
.cpick[hidden]{display:none}
.cp-sv{position:relative;height:120px;border-radius:6px;cursor:crosshair;touch-action:none;background-image:linear-gradient(to top,#000,rgba(0,0,0,0)),linear-gradient(to right,#fff,rgba(255,255,255,0))}
.cp-svd{position:absolute;width:11px;height:11px;border-radius:50%;border:2px solid #fff;box-shadow:0 0 3px rgba(0,0,0,.7);transform:translate(-50%,-50%);pointer-events:none}
.cp-hue{position:relative;height:12px;border-radius:6px;margin-top:8px;cursor:pointer;touch-action:none;background:linear-gradient(to right,#f00,#ff0,#0f0,#0ff,#00f,#f0f,#f00)}
.cp-hd{position:absolute;top:-2px;width:4px;height:16px;border-radius:2px;border:1px solid #fff;box-shadow:0 0 3px rgba(0,0,0,.7);transform:translateX(-50%);pointer-events:none}
.cp-hex{width:100%;margin-top:8px;background:var(--well);border:1px solid var(--line);border-radius:6px;color:var(--ink);padding:3px 7px;font:11.5px Consolas,monospace;text-transform:uppercase;box-sizing:border-box}
.cp-hex:focus{outline:none;border-color:var(--accent)}
/* the reusable clickable colour chip that opens the picker (replaces native <input type=color>) */
.cpchip{display:inline-block;width:34px;height:20px;border-radius:6px;border:1px solid var(--line);cursor:pointer;box-shadow:inset 0 0 0 1px rgba(0,0,0,.25);vertical-align:middle;flex:0 0 auto}
.cpchip:hover{border-color:var(--accent)}
.cpchip.dis{opacity:.45;cursor:not-allowed;pointer-events:none}
