/* Mobile-specific optimizations for video hover preview */

/* Touch Device Handling */
@media (hover: none) and (pointer: coarse) {
    .video-preview-container {
        /* Disable hover effects on touch devices by default */
    }
    
    .video-preview-container.touch-enabled:active .item-thumb {
        opacity: 0.7;
    }
    
    .video-preview-container.touch-enabled:active .preview-video {
        opacity: 0.3;
    }
}

/* Small screens */
@media (max-width: 576px) {
    .video-preview-container {
        margin-bottom: 15px;
    }
    
    .video-preview-container:hover {
        transform: translateY(-2px); /* Reduced lift effect */
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    }
    
    /* Removed play icon styles as not needed */
    
    .time-duration {
        font-size: 11px;
        padding: 3px 6px;
    }
}

/* Very small screens */
@media (max-width: 375px) {
    .video-preview-container:hover {
        transform: none; /* No lift effect on very small screens */
    }
}

/* Landscape mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .video-preview-container:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .preview-video {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    .video-preview-container,
    .video-preview-container *,
    .preview-video,
    .play-icon {
        transition: none !important;
        animation: none !important;
        transform: none !important;
    }
    
    .video-preview-container:hover {
        transform: none !important;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .time-duration {
        background: rgba(0, 0, 0, 0.9);
        border: 1px solid rgba(255, 255, 255, 0.1);
    }
}

/* Battery optimization for mobile */
@media (max-width: 768px) {
    .video-preview-container.battery-saver .preview-video {
        display: none !important;
    }
    
    .video-preview-container.battery-saver .preview-overlay {
        opacity: 1 !important;
    }
    
    .video-preview-container.battery-saver::after {
        content: '🔋';
        position: absolute;
        top: 10px;
        right: 10px;
        font-size: 16px;
        z-index: 4;
    }
}

/* Connection-aware loading */
.video-preview-container.slow-connection .preview-video {
    display: none !important;
}

.video-preview-container.slow-connection::after {
    content: '📶';
    position: absolute;
    top: 10px;
    left: 10px;
    font-size: 16px;
    z-index: 4;
}

/* Touch feedback */
.video-preview-container.touch-feedback:active {
    transform: scale(0.98);
    transition: transform 0.1s ease;
}

/* Accessibility improvements for mobile */
@media (max-width: 768px) {
    .video-preview-container:focus {
        outline: 3px solid #007bff;
        outline-offset: 3px;
    }
    
    /* Removed play icon accessibility styles as not needed */
}
