/* canvas.css */
#canvas-container {
    flex: 1;
    position: relative;
    overflow: auto;
    background: #ffffff;  /* Default white background for empty state */
    z-index: 1; /* Add explicit z-index lower than dropdown */
}

#canvas-container.has-content {
    background: #bcbcbc;  /* Gray background only when project is loaded */
}

#canvas {
    position: absolute;
    top: 0;
    left: 0;
    transform-origin: top left;
    background: #ffffff;  /* White canvas background */
    image-rendering: pixelated;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

#canvas-overlays {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2; /* Ensure overlays are above canvas but below dropdowns */
}

.node-icon {
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px dotted #4CAF50;
    border-radius: 50%;
    pointer-events: none;
    display: none;
}

.pixel-grid {
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: none;
    opacity: 0.3;
    display: none;
    background-size: 40px 40px;
    background-image:
        linear-gradient(to right, gray 1px, transparent 1px),
        linear-gradient(to bottom, gray 1px, transparent 1px);
}

.pixel-grid.visible {
    display: block;
}