/* =========================================================================
   Make My — 3D dimension overlay

   Chrome for CoreDimensionOverlay: the CSS2DRenderer label chips drawn over
   the 3D canvas, and the ruler toggle button that drives tier visibility.

   Product-agnostic, like the engine itself — Door is the first consumer but
   nothing here knows what a door is. Light-only, matching the rest of the
   configurator (core-configurator.css); there is deliberately no
   prefers-color-scheme block.
   ========================================================================= */

/* --- Line colour token ---------------------------------------------------
   Read by the engine off the preview container. Ink, drawn at 60% by the
   engine — the same line the 2D drawings use (Design.md §11.7). Kept on the
   container (not :root) so two configurators on one page can differ. */

.core-preview-container {
    --core-dim-line: var(--ink);
}

/* --- Label chip ----------------------------------------------------------
   One CSS2DObject element per dimension: a bare number on a Paper chip, with
   the 1px Rule border §11.7 gives a 3D chip so it survives over a rendered
   model. Upright, and moved beside its line by the engine through the
   `translate` property. Floats above the canvas, so it must never intercept
   orbit drags — hence pointer-events: none on the chip itself (the
   CSS2DRenderer host element is also non-interactive). */

.core-dim-label {
    font-family: var(--font-sans);
    font-size: var(--fs-11);
    font-weight: var(--fw-regular);
    line-height: 1.3;
    color: var(--ink);
    background: var(--paper);
    border: 1px solid var(--rule);
    border-radius: 0;
    padding: 2px;
    white-space: nowrap;
    pointer-events: none;
    user-select: none;
    /* Load-bearing: de-clutter fades colliding labels via .--hidden rather
       than toggling display, because popping reads as a rendering bug while
       the model orbits. CoreDimensionOverlay.update() depends on this. */
    transition: opacity var(--dur-fast) var(--ease);
}

.core-dim-label--hidden {
    opacity: 0;
}

/* --- Ruler toggle button -------------------------------------------------
   A tool in the top-right .core-preview-toggle strip. Everything about it —
   box, Paper divider from its neighbour, 3D-only gate and its on / partial
   states — is written once for every tool in core-configurator.css
   ("Preview toolbar" and "Tool states"), so this sheet carries no rule for
   the button. Dimensions are a 3D affordance; the 2D drawing has its own
   conventions. */
