/* Selection chrome only. Objects keep their saved colours; geometry, handle size and pointer
   hit areas stay exactly as selection.js draws them. Styling is paint-only: no filters,
   no transitions, and `.selection-chrome` is the overlay group itself (no :has() lookups).

   Look: the cabinet's peach accent outlines the selection; handles are small "cards" in the
   panel colour with an accent edge, so they stand out on dark paper and on white slides
   alike; the rotation knob is the one solid accent dot. Lines stay 1.5 px at any zoom. */
:root,
:root[data-board-theme="dark"]{
 --sel-line:#f0b27a;              /* cabinet accent, dark theme */
 --sel-tint:rgb(240 178 122 / .07);
 --sel-marquee-tint:rgb(240 178 122 / .12);
 --sel-handle:#142120;            /* cabinet card colour */
 --sel-handle-edge:#f0b27a;
 --sel-handle-hover:#f0b27a;
 --sel-knob:#f0b27a;
 --sel-knob-edge:#0c1413;
 --sel-halo:rgb(12 20 19 / .55);  /* dark underlay: keeps the peach frame readable on white slides */
}
:root[data-board-theme="light"]{
 --sel-line:#c06a22;              /* cabinet accent, light theme */
 --sel-tint:rgb(192 106 34 / .06);
 --sel-marquee-tint:rgb(192 106 34 / .10);
 --sel-handle:#ffffff;
 --sel-handle-edge:#c06a22;
 --sel-handle-hover:#f3d9c2;
 --sel-knob:#c06a22;
 --sel-knob-edge:#ffffff;
 --sel-halo:rgb(255 255 255 / .75);
}

.selection-chrome > *{vector-effect:non-scaling-stroke}

/* Underlay under the frame (no hit area, no filter). */
.selection-chrome > [data-selection-halo]{stroke:var(--sel-halo);stroke-width:4px;fill:none}

/* Frame of the selection (and the rubber band while dragging). */
.selection-chrome > [data-selection-area]{
 stroke:var(--sel-line);stroke-width:1.5px;fill:var(--sel-tint);
}
.selection-chrome > [data-selection-area][fill="#6399d322"]{
 fill:var(--sel-marquee-tint);stroke-dasharray:5 4;
}
/* Each object inside a multiple selection: a quieter outline. */
.selection-chrome > rect:not([data-selection-area]):not([data-handle]):not([data-selection-halo]){
 stroke:var(--sel-line);stroke-width:1px;stroke-opacity:.55;fill:none;
}

/* Corner and side handles. */
.selection-chrome > rect[data-handle]{
 fill:var(--sel-handle);stroke:var(--sel-handle-edge);stroke-width:1.5px;
}
.selection-chrome > rect[data-handle]:hover{fill:var(--sel-handle-hover)}

/* Rotation: a thin stem and a solid accent knob. */
.selection-chrome > line{stroke:var(--sel-line);stroke-width:1.25px;stroke-opacity:.8}
.selection-chrome > circle[data-handle="rotate"]{
 fill:var(--sel-knob);stroke:var(--sel-knob-edge);stroke-width:1.5px;
}
.selection-chrome > circle[data-handle="rotate"]:hover{stroke:var(--sel-line);fill:var(--sel-handle)}

/* Points of a line or polyline: solid accent dots, so they read as points, not as resize handles. */
.selection-chrome > circle[data-vertex]{
 fill:var(--sel-line);stroke:var(--sel-knob-edge);stroke-width:1.5px;
}
.selection-chrome > circle[data-vertex]:hover{fill:var(--sel-handle);stroke:var(--sel-line)}
