/* ===================================================================
   workspace.css  –  Main canvas / model-space area
   =================================================================== */

/* ------------------------------------------------------------------ */
/*  Workspace container                                                 */
/* ------------------------------------------------------------------ */
#workspace {
    flex: 1;
    position: relative;
    overflow: hidden;
    background: var(--bg-workspace);
    cursor: crosshair;
}

/* ------------------------------------------------------------------ */
/*  Canvas layers                                                       */
/* ------------------------------------------------------------------ */
/*
 * We stack multiple <canvas> elements so that:
 *   1. grid-canvas   – static grid dots, redrawn only on resize/zoom
 *   2. scene-canvas  – DXF entities
 *   3. draft-canvas  – in-progress drawing (rubber-band lines etc.)
 *   4. overlay-canvas – selection boxes, snapping indicators, cursor cross
 *
 * All are position:absolute and fill the workspace exactly.
 * This avoids clearing expensive layers when the cursor moves.
 */
.cad-canvas {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    display: block;
}

#grid-canvas    { z-index: 1; }
#scene-canvas   { z-index: 2; }
#draft-canvas   { z-index: 3; background: transparent; }
#overlay-canvas { z-index: 4; background: transparent; }

/* ------------------------------------------------------------------ */
/*  Coordinate indicator (top-left corner of workspace)                */
/* ------------------------------------------------------------------ */
#coord-display {
    position: absolute;
    top: 8px;
    right: 12px;
    font-family: var(--font-mono);
    font-size: var(--fs-xs);
    color: var(--text-muted);
    pointer-events: none;
    z-index: 10;
    letter-spacing: 0.04em;
    background: rgba(30,30,30,0.6);
    padding: 2px 6px;
    border-radius: 2px;
}

/* ------------------------------------------------------------------ */
/*  Empty / no-drawing placeholder                                      */
/* ------------------------------------------------------------------ */
#workspace-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 5;
    gap: 12px;
}

#workspace-placeholder .placeholder-icon svg {
    width: 48px;
    height: 48px;
    stroke: var(--text-muted);
    fill: none;
    stroke-width: 1;
    opacity: 0.4;
}

#workspace-placeholder .placeholder-text {
    font-size: var(--fs-md);
    color: var(--text-muted);
    opacity: 0.5;
    text-align: center;
    line-height: 1.6;
}
