/**
 * @file        canvas.css
 * @description Canvas-specific rendering styles
 * @author      Eltryus - Ricardo Marques
 * @copyright   2025-2026 Eltryus - Ricardo Marques
 * @see         {@link https://github.com/RicardoJCMarques/EasyTrace5000}
 * @license     AGPL-3.0-or-later
 */

/*
 * EasyTrace5000 - Advanced PCB Isolation CAM Workspace
 * Copyright (C) 2025-2026 Eltryus
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <https://www.gnu.org/licenses/>.
 */

/* ============================================================================
   CANVAS CONTAINER
   ============================================================================ */

.canvas-container {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-canvas-bg);
}

#preview-canvas {
    max-width: 100%;
    max-height: 100%;
    cursor: grab;
    touch-action: none;
    user-select: none;
}

#preview-canvas:active {
    cursor: grabbing;
}

/* ============================================================================
   CANVAS LOADING OVERLAY
   ============================================================================ */

.canvas-loading-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: var(--z-dropdown);
}

/* ============================================================================
   CANVAS RENDERING SETTINGS
   These control the visual appearance of rendered geometry
   ============================================================================ */

/* Grid rendering */
.canvas-container[data-grid="true"]::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image: 
        linear-gradient(var(--color-canvas-grid) 1px, transparent 1px),
        linear-gradient(90deg, var(--color-canvas-grid) 1px, transparent 1px);
    background-size: 10mm 10mm;
    opacity: 0.3;
}

/** Wireframe mode visual adjustments
.canvas-container[data-wireframe="true"] {
    Wireframe-specific adjustments applied via renderer
}*/

/* Black and white mode */
.canvas-container[data-bw="true"] {
    filter: grayscale(1);
}

/* ============================================================================
   LAYER-SPECIFIC RENDERING HINTS
   These CSS custom properties are used by the renderer
   ============================================================================ */

:root {
    /* Operation Colors - Set by theme */
    --color-op-isolation: var(--color-operation-isolation, #ff8844);
    --color-op-drill: var(--color-operation-drill, #4488ff);
    --color-op-clearing: var(--color-operation-clearing, #44ff88);
    --color-op-cutout: var(--color-operation-cutout, #ff00ff);
    --color-op-toolpath: var(--color-operation-toolpath, #00ffff);

    /* Canvas-specific colors */
    --color-canvas-origin: var(--color-canvas-origin, #ffffff);
    --color-canvas-origin-outline: var(--color-canvas-origin-outline, #000000);
    --color-canvas-bounds: var(--color-canvas-bounds, #ff0000);
    --color-canvas-ruler: var(--color-canvas-ruler, #888888);
    --color-canvas-ruler-text: var(--color-canvas-ruler-text, #cccccc);

    /* Wireframe settings */
    --wireframe-thickness-base: 0.08;
    --wireframe-thickness-min: 0.02;
    --wireframe-thickness-max: 0.2;
}

/* ============================================================================
   DEBUG VISUALIZATION
   ============================================================================ */

/** .canvas-container[data-debug-points="true"] {
    Debug point visualization enabled - handled by renderer
} */

/** .canvas-container[data-debug-paths="true"] {
    Debug path visualization enabled - handled by renderer
} */

/** .canvas-container[data-debug-holes="true"] {
    Debug hole winding enabled - handled by renderer
} */

/* ============================================================================
   CANVAS ZOOM LEVELS
   Provide visual feedback for extreme zoom levels
   ============================================================================ */

/** .canvas-container[data-zoom-level="low"] {
    Zoom < 1x - show simplified rendering
} */

/** .canvas-container[data-zoom-level="high"] {
    Zoom > 50x - show detailed rendering
} */

/** .canvas-container[data-zoom-level="extreme"] {
    Zoom > 100x - show ultra-detailed rendering
} */