/* ============================================================================
   shared/scene-panels.css — styling for the two shared scene-editing panels:
   the HIERARCHY outliner (hierarchy-standard.mdc / SPEC §5 HierarchyTree) and the
   component INSPECTOR (component-inspector-standard.mdc). Imported by every
   workspace that hosts a scene (World today; lighting/others as they converge).
   Ported from the scene-inspector surface (now hosted by world-workspace.html) so the
   shared modules stay in parity with it. SPEC tokens only.
   ========================================================================== */

/* ---- hierarchy outliner (SPEC §5 delegate: row 26 · radius 6 · 20% tint) ---
   The filter field IS the `.inp.sm` atom (components.css); only its placement in the
   rail is local — the well, the radius, the accent focus ring come from the atom. */
/* THE HOST IS THE SCROLL BOUNDARY, the tree is what scrolls. `Hierarchy.mount` stamps this class
   on whatever pane it is given, because it owns both children and therefore their arrangement.
   Without it the filter is an ordinary sibling of the rows inside a pane with `overflow:auto`, so
   the pair scrolls together and the control you use to find something in a long list is the first
   thing to leave the screen once the list is long enough to need it. `min-height:0` on both is what
   lets a flex child shrink below its content — without it the tree refuses to scroll and pushes the
   pane instead. */
.htree-host{display:flex;flex-direction:column;min-height:0;overflow:hidden}
.htree-host>.hfilter{flex:0 0 auto}
.htree-host>.tree{flex:1 1 auto;min-height:0;overflow:auto}
.hfilter{width:calc(100% - 16px);margin:6px 8px 2px}
.tree{padding:4px 6px 12px;font-size:12.5px}
.tree .row{display:flex;align-items:center;gap:6px;height:26px;padding:0 8px;border-radius:6px;color:var(--text2);cursor:pointer}
.tree .row:hover{background:var(--card)}
.tree .row.sel{background:var(--accent-sel);color:var(--accent-text);box-shadow:inset 2px 0 0 var(--accent)}
.tree .row .chev{flex:0 0 18px;text-align:center;color:var(--faint);font-size:22px;line-height:1}/* expand/collapse chevron — engine-wide size (doubled) */
.tree .row .chev.sp{visibility:hidden}
.tree .row .ico{flex:0 0 14px;text-align:center;color:var(--muted)}
.tree .row.org .ico{color:var(--text2)}/* .org = organiser group row (NOT .gnode: that's field-components' graph node) */
.tree .row.sel .ico{color:var(--accent-text)}
.tree .row .nm{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tree .row .eye,.tree .row .del{flex:0 0 16px;height:16px;display:inline-flex;align-items:center;justify-content:center;color:var(--faint);opacity:0;cursor:pointer}
.tree .row .eye{margin-left:auto}
.tree .row .del{margin-left:1px}
.tree .row:hover .eye,.tree .row:hover .del{opacity:1}
.tree .row .eye:hover{color:var(--accent-text)}
.tree .row .del:hover{color:var(--danger)}
.tree .row.hid{color:var(--faint)}
.tree .row.hid .ico{color:var(--faint)}
.tree .row.hid .eye{opacity:1;color:var(--warn)}
.tree .row.sel .eye{color:var(--accent-text)}
.emptyTree{color:var(--faint);font-size:11.5px;padding:12px 10px;text-align:center}

/* ---- component inspector --------------------------------------------------- */
.insp-head{padding:9px 12px;border-bottom:1px solid var(--line);background:var(--panel)}
.insp-title{display:flex;align-items:center;gap:8px;font-size:14px;font-weight:600;color:var(--ink)}
.insp-title .insp-glyph{flex:0 0 20px;height:20px;border-radius:5px;background:var(--card);display:inline-flex;align-items:center;justify-content:center;color:var(--accent-text);font-size:12px}
.insp-sub{margin-top:3px;font-size:11px;color:var(--muted)}
.insp{padding:10px 12px 18px;overflow:auto}
.comp{background:var(--card);border-radius:9px;margin-bottom:9px;overflow:hidden}
.comp-h{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:7px 10px;border-bottom:1px solid var(--line)}
.comp-n{font-size:12px;font-weight:600;color:var(--ink)}
.comp-t{font-size:10px;color:var(--faint);font-family:Consolas,monospace;text-align:right}
.comp-b{padding:8px 10px 10px}
.comp-b .prow:first-child{margin-top:0}
.comp-b .sub{font-size:10px;letter-spacing:.05em;text-transform:uppercase;color:var(--faint);border-top:1px solid var(--line);padding-top:6px;margin:8px 0 2px}
/* ---- inspector rows: the .prow molecule + the ATOMS (components.css) -------
   Every control in a component card — number, enum, switch, slider, swatch, vector —
   is a component-library atom, so nothing about its fill, radius or focus ring is
   restated here. What IS local is the inspector's own proportion: a narrower panel
   than a workspace pane, so the label column is wider (a component field name like
   "Despawn when finished" must read) and the readouts are sized to it. */
.insp .prow>.lbl{flex:0 0 96px}
.insp .prow.vrow>.lbl{flex:0 0 72px}
.insp .prow>.val{flex:0 0 92px}
.insp .prow>.val.wide{flex:1}
.insp .prow>.swatch{flex:0 0 34px;height:22px}
.insp .prow .unit{flex:0 0 30px}
.insp .prow>.swt{margin-left:auto}
/* a RESOURCE row (Mesh · Material): the shared asset picker fills the control column, so a
   long asset name elides inside the control instead of pushing the row wider */
.insp .prow>.pickhost{flex:1;min-width:0}
.insp .pickhost>.aswitch-picker{width:100%}
.insp .pickhost .asel{flex:1;min-width:0}
.insp .pickhost .acur{color:var(--ink);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ref{font-size:10.5px;color:var(--faint);margin:-2px 0 6px 104px;line-height:1.45}
/* a reference row that names a REAL failure — an asset that does not resolve —
   reads as danger rather than as quiet context (fail fast, fail loud) */
.ref.err{color:var(--danger)}
.ref.err b{color:var(--danger);font-weight:600}
/* an override GROUP heading: the effect author's own grouping, carried into every
   surface that shows the exposed set, with its count (graph-canvas-standard §4) */
.grph{font-size:10px;letter-spacing:.07em;text-transform:uppercase;color:var(--faint);
  padding:8px 0 3px;display:flex;align-items:center;gap:6px}
.grph .cnt{font-family:Consolas,monospace;color:var(--faint)}
/* the ONE primary action of a reference card: go author the thing it points at.
   Provenance stays neutral above it; only this carries the accent. */
.deep{display:inline-block;margin-top:8px;font-size:11.5px;color:var(--accent-text);text-decoration:none}
.deep:hover{text-decoration:underline}
.note{font-size:11px;color:var(--muted);margin-top:6px;line-height:1.5}
.note a{color:var(--accent-text)}
.comp.generic .comp-t{color:var(--warn)}
.emptyPanel{color:var(--muted);font-size:12px;padding:22px 14px;text-align:center;line-height:1.7}
.emptyPanel b{color:var(--text2)}

/* ---- the numeric/readout details the .prow molecule leaves to its host ----- */
.insp .prow>input.ni{text-align:right}                       /* a value reads right-aligned against its unit */
.insp input[type=number]::-webkit-outer-spin-button,
.insp input[type=number]::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}
.insp input[type=number]{-moz-appearance:textfield;appearance:textfield}
.insp .prow>.val.cmir{flex:0 0 74px}                          /* the colour hex mirror beside a swatch */
.insp .prow>.val.slv{flex:0 0 56px}                           /* the live readout beside a slider */
/* A SOFT range is a slider AND a field: the slider's ends are a convenience, so a value past them
   has to be typeable. Both want horizontal room, and the atom's default `.inp{flex:1}` hands it all
   to the field — measured at 40px of slider where a plain range gets 79, which is not a draggable
   control. So the SLIDER flexes and the field is fixed: the field shows a handful of digits at any
   width, while the slider is the one element whose usefulness scales with the space it gets. The
   label tightens because these are registry parameter names (`span`, `factor`), not sentence-case
   property labels. The widths live HERE rather than with the atom because this file owns the
   inspector's column rhythm — `.insp .prow>.lbl` is 96px, which would out-specify an equal rule in
   components.css and leave the slider crushed exactly as before. */
.insp .prow.soft>.lbl{flex:0 0 62px}
.insp .prow.soft>.rng{flex:1 1 auto;min-width:40px}
.insp .prow.soft>.inp.slf{flex:0 0 54px}
.insp .prow>input[type=text].inp{text-align:right}
