/**
 * ExploreXR Mouse3D Styles
 * 
 * Frontend styles for Mouse3D functionality
 */

/* Mouse3D Debug Panel */
.explorexr-mouse3d-debug {
    position: fixed;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 15px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 12px;
    z-index: 9999;
    border-radius: 8px;
    min-width: 220px;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.explorexr-mouse3d-debug h4 {
    margin: 0 0 12px 0;
    color: #61dafb;
    font-size: 14px;
    font-weight: bold;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 8px;
}

.explorexr-mouse3d-debug .debug-row {
    margin: 5px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.explorexr-mouse3d-debug .debug-label {
    color: #ffd700;
    font-weight: bold;
    margin-right: 10px;
}

.explorexr-mouse3d-debug .debug-value {
    color: #90ee90;
    font-weight: normal;
    text-align: right;
    min-width: 60px;
}

/* Mouse3D Container Styles */
.explorexr-mouse3d-container {
    position: relative;
    overflow: hidden;
}

.explorexr-mouse3d-container.mouse3d-active {
    cursor: crosshair;
}

.explorexr-mouse3d-container .mouse3d-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 1;
}

/* Smooth transitions for 3D viewers */
.explorexr-mouse3d-container model-viewer,
.explorexr-mouse3d-container .three-viewer,
.explorexr-mouse3d-container .explorexr-viewer {
    transition: transform 0.1s ease-out;
}

/* Mouse3D Accessibility */
@media (prefers-reduced-motion: reduce) {
    .explorexr-mouse3d-container model-viewer,
    .explorexr-mouse3d-container .three-viewer,
    .explorexr-mouse3d-container .explorexr-viewer {
        transition: none !important;
        transform: none !important;
    }
    
    .explorexr-mouse3d-debug {
        display: none !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .explorexr-mouse3d-debug {
        background: black;
        border: 2px solid white;
        color: white;
    }
    
    .explorexr-mouse3d-debug .debug-label {
        color: yellow;
    }
    
    .explorexr-mouse3d-debug .debug-value {
        color: lime;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .explorexr-mouse3d-container.mouse3d-active {
        cursor: default;
    }
}

/* Loading state */
.explorexr-mouse3d-loading {
    position: relative;
}

.explorexr-mouse3d-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid #fff;
    border-radius: 50%;
    animation: mouse3d-spin 1s linear infinite;
}

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

/* Error state */
.explorexr-mouse3d-error {
    position: relative;
    border: 2px dashed #ff6b6b;
}

.explorexr-mouse3d-error::after {
    content: 'Mouse3D Error';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 107, 107, 0.9);
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 12px;
    z-index: 10;
}

/* Responsive design */
@media (max-width: 768px) {
    .explorexr-mouse3d-debug {
        top: 5px;
        right: 5px;
        padding: 10px;
        min-width: 180px;
        font-size: 11px;
    }
    
    .explorexr-mouse3d-debug h4 {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .explorexr-mouse3d-debug {
        position: relative;
        top: auto;
        right: auto;
        margin: 10px;
        width: calc(100% - 20px);
        box-sizing: border-box;
    }
}

/* Print styles */
@media print {
    .explorexr-mouse3d-debug {
        display: none !important;
    }
}
