/* ========================================
   Video Manager - Frontend Styles
   ======================================== */

/* Main container - override everything */
.hvm-video-container,
div.hvm-video-container {
    width: 100% !important;
    max-width: 100% !important;
    margin: 30px auto !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    display: block !important;
    clear: both !important;
}

/* Video title - centered */
.hvm-video-title,
h3.hvm-video-title {
    text-align: center !important;
    margin: 0 0 15px 0 !important;
    padding: 0 !important;
    font-size: 1.5em !important;
    font-weight: 600 !important;
    line-height: 1.3 !important;
    color: inherit !important;
    display: block !important;
    width: 100% !important;
}

/* Video wrapper */
.hvm-video-wrapper,
div.hvm-video-wrapper {
    position: relative !important;
    width: 100% !important;
    max-width: 100% !important;
    background-color: #000 !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    display: block !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Video element - force proper sizing */
.hvm-video-player,
video.hvm-video-player {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    max-width: 100% !important;
    max-height: none !important;
    min-height: 300px !important;
    aspect-ratio: 16 / 9 !important;
    background-color: #000 !important;
    border-radius: 8px !important;
    object-fit: contain !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    outline: none !important;
}

/* Ensure video controls are visible and functional */
.hvm-video-player::-webkit-media-controls {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    z-index: 999 !important;
}

.hvm-video-player::-webkit-media-controls-panel {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.hvm-video-player::-webkit-media-controls-play-button {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    cursor: pointer !important;
    pointer-events: auto !important;
}

.hvm-video-player::-webkit-media-controls-overlay-play-button {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    cursor: pointer !important;
    pointer-events: auto !important;
}

/* Remove any overlays that might block clicks */
.hvm-video-wrapper::before,
.hvm-video-wrapper::after,
.hvm-video-container::before,
.hvm-video-container::after {
    display: none !important;
    content: none !important;
}

/* Ensure pointer events work */
.hvm-video-wrapper,
.hvm-video-wrapper *,
.hvm-video-player {
    pointer-events: auto !important;
}

/* Restricted access message */
.hvm-restricted {
    padding: 25px !important;
    background-color: #fff3cd !important;
    border: 1px solid #ffc107 !important;
    border-radius: 8px !important;
    margin: 30px 0 !important;
    text-align: center !important;
}

.hvm-restricted p {
    margin: 0 !important;
    color: #856404 !important;
    font-size: 1.1em !important;
}

.hvm-restricted a {
    color: #856404 !important;
    text-decoration: underline !important;
    font-weight: 600 !important;
}

.hvm-restricted a:hover {
    color: #533f03 !important;
}

/* Error message */
.hvm-error {
    color: #dc3545 !important;
    padding: 15px !important;
    background-color: #f8d7da !important;
    border: 1px solid #f5c6cb !important;
    border-radius: 8px !important;
    margin: 20px 0 !important;
    text-align: center !important;
}

/* Responsive adjustments */
@media screen and (max-width: 768px) {
    .hvm-video-container {
        margin: 20px 0 !important;
    }
    
    .hvm-video-title,
    h3.hvm-video-title {
        font-size: 1.2em !important;
        margin-bottom: 10px !important;
    }
    
    .hvm-video-player,
    video.hvm-video-player {
        min-height: 200px !important;
    }
}

@media screen and (max-width: 480px) {
    .hvm-video-title,
    h3.hvm-video-title {
        font-size: 1.1em !important;
    }
    
    .hvm-video-player,
    video.hvm-video-player {
        min-height: 150px !important;
    }
}
