/**
 * IDF Video Player Styles
 * Professional video player styling for IDF Telegram videos
 * Seamlessly blends with article text content
 */

/* Video Wrapper - Full width, responsive container */
.idf-video-wrapper {
    width: 100%;
    max-width: 100%;
    margin: 2rem 0;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Video Player - Responsive, maintains aspect ratio */
.idf-video-player {
    width: 100%;
    height: auto;
    max-height: 600px;
    display: block;
    background: #000;
    outline: none;
}

/* Video Player on mobile - optimize for smaller screens */
@media (max-width: 768px) {
    .idf-video-wrapper {
        margin: 1.5rem -15px; /* Full bleed on mobile */
        border-radius: 0;
    }
    
    .idf-video-player {
        max-height: 400px;
    }
}

/* Video Caption - Styled like photo caption */
.idf-video-caption {
    padding: 12px 16px;
    margin: 0;
    background: #f8f9fa;
    color: #6c757d;
    font-size: 13px;
    font-style: italic;
    border-top: 1px solid #dee2e6;
    text-align: center;
}

/* RTL Support for Hebrew site */
[dir="rtl"] .idf-video-caption {
    text-align: center;
}

/* Dark mode support (if your theme has it) */
@media (prefers-color-scheme: dark) {
    .idf-video-caption {
        background: #1a1a1a;
        color: #adb5bd;
        border-top-color: #333;
    }
}

/* Video controls customization for better UX */
.idf-video-player::-webkit-media-controls {
    /* Default browser controls are fine, but you can customize */
}

/* Ensure video doesn't overflow on very small screens */
@media (max-width: 480px) {
    .idf-video-player {
        max-height: 300px;
    }
    
    .idf-video-caption {
        font-size: 12px;
        padding: 10px 12px;
    }
}

/* Loading state for video */
.idf-video-player:not([src]) {
    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;
    }
}

/* Focus state for accessibility */
.idf-video-player:focus {
    outline: 3px solid #007bff;
    outline-offset: 2px;
}

/* Ensure video wrapper doesn't break article flow */
.article-content .idf-video-wrapper {
    clear: both;
}

/* Make sure video is centered in wide layouts */
@media (min-width: 1200px) {
    .idf-video-wrapper {
        max-width: 900px;
        margin-left: auto;
        margin-right: auto;
    }
}
