/**
 * OYROPA Audio & Video Player Styles
 * Professionelles Navy/Gold Design
 */

/* Accessibility Badge */
.accessibility-badge {
    display: inline-flex;
    align-items: center;
    background: #F7FAFC;
    border: 2px solid #D69E2E;
    border-radius: 8px;
    padding: 8px 16px;
    margin-bottom: 16px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #1A365D;
}

/* Audio Player Container */
.audio-player-container {
    margin: 24px 0;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.audio-player-container.visible {
    opacity: 1;
    transform: translateY(0);
}

.audio-player-box {
    background: white;
    border: 2px solid #D69E2E;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(26, 54, 93, 0.1);
}

.audio-player-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #E2E8F0;
}

.audio-player-header h3 {
    flex: 1;
    margin: 0;
    font-size: 1.1rem;
    color: #1A365D;
}

.audio-language {
    background: #1A365D;
    color: white;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* Audio Element Styling */
audio {
    width: 100%;
    height: 40px;
    border-radius: 8px;
    outline: none;
}

audio::-webkit-media-controls-panel {
    background: linear-gradient(135deg, #F7FAFC 0%, #EDF2F7 100%);
    border-radius: 8px;
}

audio::-webkit-media-controls-play-button,
audio::-webkit-media-controls-pause-button {
    background-color: #1A365D;
    border-radius: 50%;
}

.audio-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    font-size: 0.9rem;
    color: #666;
}

.audio-duration,
.audio-size {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Video Player Container */
.video-player-container {
    margin: 32px 0;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.video-player-container.visible {
    opacity: 1;
    transform: translateY(0);
}

.video-player-box {
    background: white;
    border: 2px solid #D69E2E;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 6px 12px rgba(26, 54, 93, 0.15);
}

.video-player-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #D69E2E;
}

.video-player-header h3 {
    flex: 1;
    margin: 0;
    font-size: 1.2rem;
    color: #1A365D;
}

.video-badge {
    background: linear-gradient(135deg, #D69E2E 0%, #CFAE70 100%);
    color: #1A365D;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Video Processing Animation */
.video-processing {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 20px;
}

.video-spinner {
    position: relative;
    width: 80px;
    height: 80px;
    margin-bottom: 24px;
}

.spinner-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 4px solid transparent;
    border-top-color: #D69E2E;
    border-radius: 50%;
    animation: spin 1.5s cubic-bezier(0.5, 0, 0.5, 1) infinite;
}

.spinner-ring:nth-child(1) {
    animation-delay: -0.45s;
    border-top-color: #D69E2E;
}

.spinner-ring:nth-child(2) {
    animation-delay: -0.3s;
    border-top-color: #CFAE70;
}

.spinner-ring:nth-child(3) {
    animation-delay: -0.15s;
    border-top-color: #1A365D;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.video-status-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1A365D;
    margin: 0 0 16px 0;
}

.video-progress-bar {
    width: 100%;
    max-width: 400px;
    height: 8px;
    background: #E2E8F0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.video-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #D69E2E 0%, #CFAE70 100%);
    border-radius: 4px;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.video-progress-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: #D69E2E;
    margin: 8px 0;
}

.video-eta-text {
    font-size: 0.9rem;
    color: #666;
    margin: 8px 0 0 0;
}

/* Video Element */
video {
    max-width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transform: scale(0.95);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

video.video-loaded {
    opacity: 1;
    transform: scale(1);
}

/* Video Error State */
.video-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 20px;
}

.video-error p {
    font-size: 1.1rem;
    font-weight: 600;
    color: #DC2626;
    margin: 16px 0;
}

.retry-button {
    background: linear-gradient(135deg, #D69E2E 0%, #CFAE70 100%);
    color: #1A365D;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.retry-button:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

/* Mobile Optimierung */
@media (max-width: 768px) {
    .audio-player-box,
    .video-player-box {
        padding: 16px;
    }

    .audio-player-header h3,
    .video-player-header h3 {
        font-size: 1rem;
    }

    .accessibility-badge {
        font-size: 0.85rem;
        padding: 6px 12px;
    }

    .audio-language,
    .video-badge {
        font-size: 0.75rem;
        padding: 4px 10px;
    }

    .video-spinner {
        width: 60px;
        height: 60px;
    }

    .video-progress-bar {
        max-width: 300px;
    }

    .video-progress-text {
        font-size: 1.2rem;
    }
}

/* Dark Mode Support (optional) */
@media (prefers-color-scheme: dark) {
    .audio-player-box,
    .video-player-box {
        background: #2D3748;
        border-color: #D69E2E;
    }

    .audio-player-header h3,
    .video-player-header h3,
    .video-status-text {
        color: white;
    }

    audio::-webkit-media-controls-panel {
        background: linear-gradient(135deg, #2D3748 0%, #1A202C 100%);
    }

    .audio-info,
    .video-eta-text {
        color: #A0AEC0;
    }
}

/* Accessibility Improvements */
.audio-player-box:focus-within,
.video-player-box:focus-within {
    outline: 2px solid #D69E2E;
    outline-offset: 2px;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .audio-player-container,
    .video-player-container,
    .video-progress-fill,
    video {
        transition: none;
    }

    .spinner-ring {
        animation: none;
    }
}

/* Print Styles */
@media print {
    .audio-player-container,
    .video-player-container {
        display: none;
    }
}
