/* =========================================================================
   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 so the annotation accent can
   be re-pointed per module without touching JS. Kept on the container (not
   :root) so two configurators on one page can differ. */

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

/* --- Label chip ----------------------------------------------------------
   One CSS2DObject element per dimension. 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: rgba(255, 255, 255, 0.88);
    border: 1px solid var(--rule);
    border-radius: var(--r-sm);
    padding: 1px 5px;
    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. */
