/* Additional custom styles for Kiosk Media Player */

/* Smooth transitions for all interactive elements */
* {
    transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

/* Focus styles for accessibility */
.focus-ring:focus {
    outline: 2px solid transparent;
    outline-offset: 2px;
    box-shadow: 0 0 0 2px #3b82f6;
}

/* Custom scrollbar for webkit browsers */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Loading animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Drag and drop styles */
.drag-over {
    border-color: #3b82f6 !important;
    background-color: #eff6ff !important;
}

.drag-active {
    transform: scale(1.02);
}

/* File upload progress */
.upload-progress {
    background: linear-gradient(90deg, #3b82f6 var(--progress, 0%), #e5e7eb var(--progress, 0%));
}

/* Media grid responsive layout */
.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

@media (min-width: 640px) {
    .media-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media (min-width: 1024px) {
    .media-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

/* Media item hover effects */
.media-item {
    transition: all 0.2s ease;
}

.media-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Upload drop zone animations */
.upload-drop-zone {
    transition: all 0.3s ease;
}

.upload-drop-zone.drag-over {
    transform: scale(1.02);
    border-color: #3b82f6;
    background-color: #eff6ff;
}

/* Progress bar animations */
.upload-progress-bar {
    transition: width 0.3s ease;
}

/* Media thumbnail aspect ratio */
.aspect-video {
    aspect-ratio: 16 / 9;
}

/* Video overlay play button */
.video-overlay {
    background: linear-gradient(45deg, rgba(0,0,0,0.1), rgba(0,0,0,0.3));
}

/* Toast notification positioning */
.toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 50;
    max-width: 24rem;
    width: 100%;
}

/* Media filter dropdown styling */
select:focus {
    outline: none;
    box-shadow: 0 0 0 2px #3b82f6;
    border-color: #3b82f6;
}

/* Delete button hover effect */
.delete-media-btn {
    transition: all 0.2s ease;
}

.delete-media-btn:hover {
    transform: scale(1.1);
}

/* File input styling when dragging */
.file-input-drag {
    border: 2px dashed #3b82f6;
    background-color: #eff6ff;
}

/* Media grid loading skeleton */
.media-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Playlist editor styles */
.playlist-item {
    cursor: move;
}

.playlist-item:hover {
    background-color: #f8fafc;
}

.playlist-item.dragging {
    opacity: 0.5;
    transform: rotate(5deg);
}

.playlist-drop-zone {
    min-height: 100px;
    border: 2px dashed #d1d5db;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.playlist-drop-zone.drag-over {
    border-color: #3b82f6;
    background-color: #eff6ff;
    color: #1d4ed8;
}

/* Modal backdrop */
.modal-backdrop {
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

/* Toast notifications */
.toast {
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
}

.toast.show {
    transform: translateX(0);
}

/* Button loading state */
.btn-loading {
    position: relative;
    color: transparent !important;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Responsive utilities */
@media (max-width: 640px) {
    .mobile-full-width {
        width: 100vw;
        margin-left: calc(-50vw + 50%);
    }
}

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