/* MouseView CSS - Simulates Eye Tracking with Mouse Spotlight */

/* MouseView Overlay */
.mouseview-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
    background: radial-gradient(circle at 50% 50%, 
        transparent 0px, 
        transparent 120px, 
        rgba(0, 0, 0, 0.85) 180px);
}

/* Active state for mouseview */
.mouseview-overlay.active {
    opacity: 1;
}

/* Different spotlight sizes for different contexts */
.mouseview-overlay.spotlight-small {
    background: radial-gradient(circle at 50% 50%, 
        transparent 0px, 
        transparent 80px, 
        rgba(0, 0, 0, 0.9) 120px);
}

.mouseview-overlay.spotlight-medium {
    background: radial-gradient(circle at 50% 50%, 
        transparent 0px, 
        transparent 120px, 
        rgba(0, 0, 0, 0.85) 180px);
}

.mouseview-overlay.spotlight-large {
    background: radial-gradient(circle at 50% 50%, 
        transparent 0px, 
        transparent 160px, 
        rgba(0, 0, 0, 0.8) 220px);
}

/* Smooth spotlight movement */
.mouseview-overlay.smooth {
    transition: background 0.1s ease-out;
}

/* Calibration-specific styling */
.mouseview-overlay.calibration {
    background: radial-gradient(circle at 50% 50%, 
        transparent 0px, 
        transparent 60px, 
        rgba(0, 0, 0, 0.7) 100px);
}

/* Fixation-specific styling (smaller spotlight) */
.mouseview-overlay.fixation {
    background: radial-gradient(circle at 50% 50%, 
        transparent 0px, 
        transparent 40px, 
        rgba(0, 0, 0, 0.95) 80px);
}

/* Mouse cursor styles for different phases */
.mouseview-cursor {
    position: fixed;
    width: 8px;
    height: 8px;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    pointer-events: none;
    z-index: 10000;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.mouseview-cursor.visible {
    opacity: 1;
}

/* Mouse trail effect (optional) */
.mouseview-trail {
    position: fixed;
    width: 4px;
    height: 4px;
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.5s ease-out;
}

/* Gaze heatmap visualization (for data visualization) */
.gaze-point {
    position: absolute;
    width: 10px;
    height: 10px;
    background-color: rgba(255, 0, 0, 0.3);
    border-radius: 50%;
    pointer-events: none;
    z-index: 1000;
    transform: translate(-50%, -50%);
}

/* Different intensity levels for heatmap */
.gaze-point.intensity-low {
    background-color: rgba(0, 255, 0, 0.2);
    width: 8px;
    height: 8px;
}

.gaze-point.intensity-medium {
    background-color: rgba(255, 255, 0, 0.3);
    width: 10px;
    height: 10px;
}

.gaze-point.intensity-high {
    background-color: rgba(255, 0, 0, 0.4);
    width: 12px;
    height: 12px;
}

/* Attention area indicators */
.attention-area {
    position: absolute;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    pointer-events: none;
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.attention-area.active {
    opacity: 1;
}

/* Mouse tracking indicator */
.tracking-indicator {
    position: fixed;
    top: 10px;
    left: 10px;
    background-color: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.8em;
    z-index: 10001;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tracking-indicator.active {
    opacity: 1;
}

.tracking-indicator.recording {
    color: #ff4444;
}

.tracking-indicator.paused {
    color: #ffaa44;
}

/* Calibration accuracy visualization */
.calibration-accuracy {
    position: absolute;
    width: 30px;
    height: 30px;
    border: 2px solid #4CAF50;
    border-radius: 50%;
    pointer-events: none;
    z-index: 1001;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: all 0.3s ease;
}

.calibration-accuracy.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.2);
}

.calibration-accuracy.error {
    border-color: #ff4444;
    background-color: rgba(255, 68, 68, 0.1);
}

.calibration-accuracy.success {
    border-color: #4CAF50;
    background-color: rgba(76, 175, 80, 0.1);
}

/* Mouse movement smoothing */
.mouseview-smooth {
    transition: all 0.05s ease-out;
}

/* Different blur levels for peripheral simulation */
.peripheral-blur-light {
    filter: blur(1px);
    opacity: 0.9;
}

.peripheral-blur-medium {
    filter: blur(3px);
    opacity: 0.7;
}

.peripheral-blur-heavy {
    filter: blur(8px);
    opacity: 0.4;
}

/* Focus area (clear vision) */
.focus-area {
    filter: none;
    opacity: 1;
}

/* Animation for smooth transitions */
@keyframes spotlight-appear {
    from {
        opacity: 0;
        transform: scale(0.5);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes spotlight-disappear {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(1.2);
    }
}

.mouseview-overlay.appearing {
    animation: spotlight-appear 0.5s ease-out;
}

.mouseview-overlay.disappearing {
    animation: spotlight-disappear 0.3s ease-in;
}

/* Disable mouseview during UI interactions */
.mouseview-disabled .mouseview-overlay {
    opacity: 0;
    pointer-events: none;
}

/* Screen reader and accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-style: none;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .mouseview-overlay {
        background: radial-gradient(circle at 50% 50%, 
            transparent 0px, 
            transparent 120px, 
            rgba(0, 0, 0, 0.95) 180px);
    }
    
    .mouseview-cursor {
        background-color: #fff;
        border: 1px solid #000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .mouseview-overlay,
    .mouseview-cursor,
    .mouseview-trail {
        transition: none;
    }
    
    .mouseview-overlay.appearing,
    .mouseview-overlay.disappearing {
        animation: none;
    }
}