/**
 * 3D Viewer Styles
 */

.configurator-3d-viewer {
    position: relative;
    width: 100%;
    min-height: 400px;
    /* Default styles removed - allow Elementor/container styles to take precedence */
    /* border-radius, box-shadow, and background controlled via Elementor Style tab */
}

.configurator-3d-viewer canvas {
    display: block;
    width: 100%;
    height: 100%;
    /* Ensure canvas doesn't override container styles */
    position: relative;
    z-index: 1;
}

/* Loading state */
.configurator-3d-viewer.loading::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 100;
}

.configurator-3d-viewer.loading::after {
    content: 'Loading 3D model...';
    position: absolute;
    top: calc(50% + 40px);
    left: 50%;
    transform: translateX(-50%);
    font-size: 14px;
    color: #666;
    z-index: 100;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

.viewer-error {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 100%;
    height: 100%;
    min-height: 200px;
    font-size: 14px;
    color: #d32f2f;
    background: rgba(255, 235, 235, 0.95);
    padding: 20px;
    border: 2px solid #d32f2f;
    border-radius: 4px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .configurator-3d-viewer {
        min-height: 300px;
    }
}
