/**
 * Content Protection Styles
 * Styles for video controls, overlays, and watermarks
 */

/* ============================================
   VIDEO PROTECTION STYLES
   ============================================ */

.video-protected-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
    max-width: 100%;
    background: #000;
}

.video-protected-wrapper video {
    width: 100%;
    height: auto;
    display: block;
    pointer-events: none; /* Prevent native controls */
}

/* Exclude background videos and video-container videos from protection styles */
.elementor-background-video-hosted,
.reusable-hero-fullwidth-video-hosted,
.elementor-background-video-container video,
.reusable-hero-fullwidth-video-container video,
.video-container video {
    pointer-events: auto !important;
}

/* Ensure background videos are not wrapped */
.elementor-background-video-container,
.reusable-hero-fullwidth-video-container {
    /* These should not have video-protected-wrapper */
}

.video-custom-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, transparent 100%);
    padding: 12px 16px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 10;
    pointer-events: none;
}

.video-protected-wrapper:hover .video-custom-controls {
    opacity: 1;
    pointer-events: auto;
}

.video-controls-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.video-btn {
    background: transparent;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s ease;
    flex-shrink: 0;
}

.video-btn:hover {
    opacity: 0.8;
}

.video-btn:active {
    opacity: 0.6;
}

.video-btn svg {
    width: 24px;
    height: 24px;
    display: block;
}

.video-progress-container {
    flex: 1;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.video-progress-bar {
    width: 100%;
    height: 100%;
    position: relative;
}

.video-progress-filled {
    height: 100%;
    background: #0040FF;
    border-radius: 2px;
    width: 0%;
    transition: width 0.1s linear;
}

.video-progress-container:hover .video-progress-filled {
    background: #0055ff;
}

.video-time {
    color: #fff;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
    min-width: 80px;
    text-align: right;
}

.video-time-separator {
    opacity: 0.6;
}

/* ============================================
   IMAGE PROTECTION STYLES
   ============================================ */

.image-protected-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
    max-width: 100%;
}

.image-protected-wrapper img {
    width: 100%;
    height: auto;
    display: block;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    /* Removed pointer-events: none to allow images to display properly */
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-drag: none;
}

.image-protection-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    z-index: 1;
    cursor: not-allowed;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    pointer-events: auto; /* Allow overlay to capture events for protection */
}

.image-watermark {
    position: absolute;
    bottom: 10px;
    right: 10px;
    color: rgba(255, 255, 255, 0.05);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 10px;
    font-weight: 300;
    z-index: 2;
    pointer-events: none;
    text-shadow: none;
    user-select: none;
    -webkit-user-select: none;
    opacity: 0.05;
}

/* ============================================
   PROTECTED CONTENT GENERAL
   ============================================ */

.protected-content {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-drag: none;
}

/* Allow text selection in inputs and textareas */
input,
textarea {
    user-select: text !important;
    -webkit-user-select: text !important;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .video-controls-bar {
        gap: 8px;
        padding: 8px 12px;
    }
    
    .video-btn {
        padding: 6px;
    }
    
    .video-btn svg {
        width: 20px;
        height: 20px;
    }
    
    .video-time {
        font-size: 11px;
        min-width: 60px;
    }
    
    .image-watermark {
        font-size: 10px;
        bottom: 8px;
        right: 8px;
    }
}

