/* Shader Canvas Module Styles */

/* Layout Components */
.code-panel {
    display: flex;
    height: 100%;
    width: 100%;
}

.code-editor-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #ccc;
}

.canvas-panel {
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 0 0 auto;
    position: relative;
    aspect-ratio: 1;
}

/* Responsive layout for smaller screens */
@media (max-width: 768px) {
    .code-panel {
        flex-direction: column;
        height: 100%;
    }
    
    .code-editor-container {
        flex: 1;
        border-right: none;
        border-bottom: 1px solid #ccc;
        max-height: 50vh;
    }
    
    .canvas-panel {
        flex: 0 0 auto;
        aspect-ratio: 1;
        width: 100%;
        height: auto;
    }
}

/* Code Editor */
.code-editor {
    flex: 1;
    width: 100%;
    border: none;
    background-color: transparent;
    color: inherit;
    font-size: 14px;
    line-height: 1.5;
    resize: none;
    outline: none;
}

/* Canvas */
.shader-canvas {
    width: auto;
    height: 100%;
    aspect-ratio: 1;
    background-color: #000000;
    user-select: none;
    pointer-events: none;
    outline: none !important;
    border: none !important;
    box-shadow: none !important;
}

/* Responsive canvas styling */
@media (max-width: 768px) {
    .shader-canvas {
        width: 100%;
        height: 100%;
        max-width: 100%;
        max-height: 100%;
    }
}

/* Remove any focus/selection styles */
.shader-canvas:focus,
.shader-canvas:focus-visible,
.shader-canvas:active {
    outline: none !important;
    border: none !important;
    box-shadow: none !important;
}

/* Status Indicator */
.shader-status {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 0.25rem 0.5rem;
    background-color: #dc3545;
    color: #ffffff;
    font-size: 11px;
    border-radius: 4px;
    opacity: 0;
    pointer-events: auto;
    z-index: 10;
    cursor: help;
    max-width: 300px;
    word-wrap: break-word;
    white-space: pre-wrap;
    line-height: 1.3;
}

.shader-status.show {
    opacity: 1;
}

.shader-status:hover {
    background-color: #c82333;
    transform: scale(1.02);
    max-width: 500px;
    font-size: 10px;
    padding: 0.5rem;
}