/**
 * Professional News Video Player
 * Used in single.php for article pages with embedded video
 * 
 * Inspired by CNN, AP News, and JPost video players.
 * Dark theme, custom controls overlay, responsive.
 *
 * @package Israel_News_Theme
 * @since 1.4.0
 */

/* ==========================================================================
   PRO VIDEO CONTAINER
   ========================================================================== */
.news-pro-video {
    width: 100%;
    max-width: 100%;
    margin: 0 auto 2rem;
    font-family: "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

.news-pro-video-wrapper {
    position: relative;
    width: 100%;
    background: #000;
    border-radius: 10px;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    box-shadow: 0 4px 24px rgba(0,0,0,0.18);
}

/* Video element */
.news-pro-video-el {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    cursor: pointer;
}

/* Custom Chrome: hide native controls until playing
   Once playing, native controls appear */
.news-pro-video-el::-webkit-media-controls-panel {
    background: linear-gradient(transparent, rgba(0,0,0,0.7)) !important;
}

/* ==========================================================================
   PLAY OVERLAY (shown before/after playback)
   ========================================================================== */
.news-pro-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0.45) 100%);
    cursor: pointer;
    transition: opacity 0.35s ease;
    z-index: 5;
}

.news-pro-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.news-pro-play-btn {
    background: none;
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease;
    padding: 0;
    position: relative;
    z-index: 6;
}

.news-pro-play-btn:hover {
    transform: scale(1.08);
}

.news-pro-play-btn:focus-visible {
    outline: 2px solid #0055ff;
    outline-offset: 4px;
    border-radius: 50%;
}

/* Duration badge */
.news-pro-duration {
    position: absolute;
    bottom: 16px;
    right: 16px;
    background: rgba(0,0,0,0.8);
    color: #fff;
    padding: 5px 12px;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.3px;
    backdrop-filter: blur(4px);
    z-index: 6;
}

/* ==========================================================================
   TOP BAR (source label + share)
   ========================================================================== */
.news-pro-top-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(180deg, rgba(0,0,0,0.6) 0%, transparent 100%);
    z-index: 7;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.news-pro-video-wrapper:hover .news-pro-top-bar,
.news-pro-video-wrapper.playing .news-pro-top-bar {
    opacity: 1;
    pointer-events: auto;
}

.news-pro-source {
    display: flex;
    align-items: center;
    gap: 6px;
    color: rgba(255,255,255,0.9);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.news-pro-source-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #0033cc;
    display: flex;
    align-items: center;
    justify-content: center;
}

.news-pro-source-icon svg {
    width: 10px;
    height: 10px;
}

/* ==========================================================================
   VIDEO CAPTION
   ========================================================================== */
.news-pro-caption {
    margin-top: 12px;
    padding: 0 4px;
    font-size: 14px;
    color: #6b7280;
    line-height: 1.5;
    font-style: italic;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 768px) {
    .news-pro-video-wrapper {
        border-radius: 6px;
        box-shadow: 0 2px 12px rgba(0,0,0,0.12);
    }

    .news-pro-play-btn svg {
        width: 48px;
        height: 48px;
    }

    .news-pro-duration {
        font-size: 12px;
        padding: 3px 8px;
        bottom: 10px;
        right: 10px;
    }

    .news-pro-top-bar {
        padding: 8px 12px;
    }

    .news-pro-caption {
        font-size: 13px;
        margin-top: 10px;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .news-pro-video-wrapper {
        max-height: 500px;
    }
}

@media (min-width: 1025px) {
    .news-pro-video-wrapper {
        border-radius: 12px;
        max-height: 620px;
    }
}

/* ==========================================================================
   DARK MODE (if user has prefers-color-scheme: dark, enhance contrast)
   ========================================================================== */
@media (prefers-color-scheme: dark) {
    .news-pro-caption {
        color: #9ca3af;
    }
}
