/* Koren Autoparts Inspectie Portal - Custom Styles */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Fade in animation for content */
.fade-in {
    animation: fadeIn 0.6s ease-out;
}

/* Video player enhancements */
video {
    background-color: #000;
}

video::-webkit-media-controls-panel {
    background-image: linear-gradient(transparent, rgba(0, 0, 0, 0.5));
}

/* Disable right-click on video to prevent download attempts */
video {
    pointer-events: auto;
}

/* Custom button hover effects */
button {
    position: relative;
    overflow: hidden;
}

button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

button:active::before {
    width: 300px;
    height: 300px;
}

/* Loading spinner */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.animate-spin {
    animation: spin 1s linear infinite;
}

/* Toast notification */
#toast {
    max-width: 400px;
}

#toast.show {
    display: flex !important;
    animation: slideIn 0.3s ease-out;
}

/* Video overlay */
#videoOverlay {
    cursor: pointer;
    transition: opacity 0.3s ease;
}

#videoOverlay:hover {
    opacity: 0.95;
}

/* Responsive video controls */
@media (max-width: 640px) {
    video::-webkit-media-controls-enclosure {
        overflow: hidden;
    }

    video::-webkit-media-controls-panel {
        width: calc(100% + 30px);
    }
}

/* Print styles */
@media print {
    header,
    footer,
    #downloadBtn,
    #shareBtn {
        display: none;
    }

    .bg-white {
        background: white !important;
    }

    .shadow-sm,
    .shadow-lg {
        box-shadow: none !important;
    }
}

/* Accessibility improvements */
button:focus,
a:focus {
    outline: 2px solid #3D9991;
    outline-offset: 2px;
}

button:focus:not(:focus-visible),
a:focus:not(:focus-visible) {
    outline: none;
}

/* Prevent text selection on UI elements */
button,
.no-select {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #3D9991;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #317A74;
}

/* Video poster placeholder */
.video-poster {
    background: linear-gradient(135deg, #3D9991 0%, #317A74 100%);
}

/* Expiry warning animation */
@keyframes warningPulse {
    0%, 100% {
        border-color: #FCD34D;
    }
    50% {
        border-color: #F59E0B;
    }
}

.expiry-warning {
    animation: warningPulse 2s ease-in-out infinite;
}

/* Skeleton loading animation */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.skeleton {
    background: linear-gradient(
        90deg,
        #f0f0f0 0%,
        #e0e0e0 50%,
        #f0f0f0 100%
    );
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
}

/* Status badge styles */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
}

.status-badge.active {
    background-color: #D1FAE5;
    color: #065F46;
}

.status-badge.expired {
    background-color: #FEE2E2;
    color: #991B1B;
}

/* Gradient backgrounds */
.gradient-koren {
    background: linear-gradient(135deg, #3D9991 0%, #47AFA7 100%);
}

/* Card hover effects */
.card-hover {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(61, 153, 145, 0.2);
}

/* Mobile optimizations */
@media (max-width: 768px) {
    /* Ensure touch targets are large enough */
    button,
    a {
        min-height: 44px;
        min-width: 44px;
    }

    /* Prevent zoom on input focus on iOS */
    input,
    select,
    textarea {
        font-size: 16px;
    }
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
    /* You can add dark mode styles here if needed */
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
