/* 
Video Upload CSS Styles - SEPARATED MOBILE/DESKTOP
File: /css/bunny-stream.css
Mobile-first with distinct desktop overrides
*/

/* ========================================
   MOBILE-FIRST VIDEO HANDLING
   ======================================== */

/* Default mobile video wrapper */
.video-wrapper {
    position: relative;
    width: 100%;
    background: #000;
    border-radius: 12px;
    margin: 20px 0;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.2);
    border: 2px solid #10b981;
    overflow: hidden;
}

/* Mobile video element - native controls work better */
.video-wrapper video {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 10px;
    background: #000;
    /* Mobile: Let native controls handle everything */
    pointer-events: auto;
    -webkit-playsinline: true;
    playsinline: true;
}

/* Mobile: Keep native video controls simple */
.video-wrapper video::-webkit-media-controls {
    display: flex;
}

/* ========================================
   DESKTOP-SPECIFIC OVERRIDES
   ======================================== */

@media (min-width: 769px) {
    
    /* Desktop video wrapper - fixed aspect ratio */
    .video-wrapper {
        aspect-ratio: 16/9;
        max-height: 400px;
        height: auto;
        position: relative;
        background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    }
    
    /* Desktop video element - CRITICAL FIXES */
    .video-wrapper video {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        /* DESKTOP: Force controls to be accessible */
        pointer-events: auto !important;
        cursor: pointer !important;
        z-index: 10 !important;
    }
    
    /* DESKTOP: Webkit control fixes */
    .video-wrapper video::-webkit-media-controls {
        display: flex !important;
        opacity: 1 !important;
        pointer-events: auto !important;
        background: rgba(0, 0, 0, 0.8) !important;
    }
    
    .video-wrapper video::-webkit-media-controls-panel {
        display: flex !important;
        opacity: 1 !important;
        background: rgba(0, 0, 0, 0.8) !important;
        pointer-events: auto !important;
    }
    
    .video-wrapper video::-webkit-media-controls-play-button {
        display: block !important;
        opacity: 1 !important;
        pointer-events: auto !important;
        cursor: pointer !important;
        background: rgba(255, 255, 255, 0.9) !important;
        border-radius: 50% !important;
        width: 48px !important;
        height: 48px !important;
    }
    
    /* DESKTOP: Force control visibility on hover */
    .video-wrapper:hover video::-webkit-media-controls {
        opacity: 1 !important;
        display: flex !important;
    }
    
    /* DESKTOP: Firefox controls */
    .video-wrapper video::-moz-media-controls {
        display: block !important;
        opacity: 1 !important;
    }
    
    /* DESKTOP: Override any framework restrictions */
    .video-wrapper video[controls] {
        controls: auto !important;
    }
    
    /* DESKTOP: Ensure no CSS interference */
    .video-wrapper video {
        -webkit-appearance: auto !important;
        appearance: auto !important;
    }
}

/* ========================================
   UPLOAD INTERFACE STYLING
   ======================================== */

/* --- URL Input Section --- */
.url-input-section {
    margin-bottom: 30px;
}

.url-header {
    text-align: center;
    margin-bottom: 15px;
    padding: 15px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.url-title {
    margin: 0 0 5px 0;
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
}

.url-subtitle {
    margin: 0;
    font-size: 14px;
    color: #64748b;
}

/* Enhanced video input with platform indicators */
.enhanced-video-input {
    transition: all 0.3s ease !important;
    padding: 12px 50px 12px 16px !important;
}

.enhanced-video-input:focus {
    border-color: #10b981 !important;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1) !important;
}

.enhanced-video-input.video-url {
    border-left: 4px solid #10b981 !important;
    background: linear-gradient(90deg, rgba(16, 185, 129, 0.05) 0%, transparent 100%) !important;
}

.enhanced-video-input.youtube-url {
    border-left: 4px solid #ff0000 !important;
    background: linear-gradient(90deg, rgba(255, 0, 0, 0.05) 0%, transparent 100%) !important;
}

.enhanced-video-input.vimeo-url {
    border-left: 4px solid #1ab7ea !important;
    background: linear-gradient(90deg, rgba(26, 183, 234, 0.05) 0%, transparent 100%) !important;
}

/* --- Divider --- */
.upload-divider {
    text-align: center;
    margin: 30px 0;
    position: relative;
}

.upload-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e2e8f0;
    z-index: 0;
}

.divider-text {
    background: #fff;
    padding: 0 20px;
    color: #64748b;
    font-weight: 600;
    font-size: 14px;
    position: relative;
    z-index: 1;
}

/* --- Main Upload Section --- */
.video-upload-section {
    padding: 25px;
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border-radius: 16px;
    border: 2px solid #10b981;
    transition: all 0.3s ease;
}

.video-upload-section:hover {
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.2);
}

/* Upload Header & Badges */
.upload-header {
    text-align: center;
    margin-bottom: 25px;
}

.upload-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 15px;
    color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.admin-badge {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: #92400e;
}

.premium-badge {
    background: linear-gradient(135deg, #10b981, #059669);
}

.trial-badge {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
}

.blocked-badge {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.upload-title {
    margin: 0 0 8px 0;
    font-size: 20px;
    font-weight: 700;
    color: #1e293b;
}

.upload-subtitle {
    margin: 0;
    font-size: 14px;
    color: #059669;
}

/* Upload Drop Zone */
.upload-zone.video-zone {
    text-align: center;
    padding: 40px 20px;
    border: 2px dashed #10b981;
    border-radius: 12px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.upload-zone.video-zone:hover,
.upload-zone.video-zone.drag-over {
    border-color: #059669;
    background: #f0fdf4;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.15);
}

.upload-main-text {
    margin: 15px 0 8px 0;
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
}

.upload-sub-text {
    margin: 0 0 15px 0;
    font-size: 14px;
    color: #059669;
}

.video-features {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}

.feature-badge {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

/* Upload Controls & Buttons */
.upload-controls {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 20px;
}

.upload-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.upload-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.upload-button.select-file {
    background: linear-gradient(135deg, #6b7280, #4b5563);
    color: white;
}

.upload-button.upload-file {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.upload-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
}

/* File Info & Progress */
.file-info, .upload-progress {
    margin: 20px 0;
}

.file-details.video-file, .upload-progress {
    padding: 12px;
    background: white;
    border-radius: 8px;
    border: 2px solid #10b981;
}

.file-details.video-file {
    display: flex;
    align-items: center;
    gap: 12px;
}

.file-details.video-file .file-icon {
    font-size: 24px;
    color: #10b981;
}

.file-meta { flex: 1; }
.file-name { font-weight: 600; color: #1e293b; margin-bottom: 4px; }
.file-size { font-size: 12px; color: #64748b; }
.file-details.video-file .file-status { color: #10b981; font-weight: 600; font-size: 12px; }

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981, #059669);
    transition: width 0.3s ease;
    border-radius: 4px;
}

.progress-text { text-align: center; font-weight: 600; color: #1e293b; margin-bottom: 5px; }
.status-message { text-align: center; font-size: 14px; color: #059669; }

/* Error Styling */
.upload-error.video-error {
    padding: 20px;
    text-align: center;
    border: 2px solid #ef4444;
    background: #fef2f2;
    color: #dc2626;
    border-radius: 8px;
}

.upload-error.video-error .error-icon {
    font-size: 24px;
    margin-bottom: 10px;
}

.retry-button {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    margin-top: 10px;
    transition: all 0.3s ease;
}

.retry-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

/* Enhanced embed wrapper */
.enhanced-embed-wrapper.video-container {
    border: 2px solid #10b981 !important;
    border-radius: 12px !important;
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%) !important;
    overflow: hidden !important;
    margin: 20px 0 !important;
    padding: 8px !important;
}

.enhanced-embed-wrapper.video-container .video-wrapper {
    margin: 0 !important;
    border: none !important;
    box-shadow: none !important;
}

/* Loading and badge states */
.video-wrapper.loading::before {
    content: '🎬 Chargement de la vidéo...';
    color: #fff;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: 600;
    z-index: 5;
}

.video-wrapper::after {
    content: '🎬 Vidéo HD';
    position: absolute;
    bottom: 8px;
    right: 10px;
    background: rgba(16, 185, 129, 0.9);
    color: #fff;
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 6px;
    font-weight: 600;
    z-index: 15;
    pointer-events: none;
}

/* ========================================
   ANIMATIONS & HELPERS
   ======================================== */

@keyframes videoBounce {
    0%, 20%, 53%, 80%, 100% { transform: translate3d(0,0,0); }
    40%, 43% { transform: translate3d(0, -8px, 0); }
    70% { transform: translate3d(0, -4px, 0); }
    90% { transform: translate3d(0, -2px, 0); }
}

.video-upload-section:hover .upload-icon {
    animation: videoBounce 1s ease-in-out;
}

/* Help and login sections */
.help-section, .login-section { margin-top: 20px; }
.help-card, .login-card {
    text-align: center;
    padding: 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}
.help-icon, .login-icon { font-size: 32px; margin-bottom: 10px; display: block; }
.help-card h4, .login-card h4 { margin: 0 0 8px 0; color: #1e293b; font-size: 16px; font-weight: 600; }
.help-card p, .login-card p { margin: 0; color: #64748b; font-size: 14px; }
.login-button {
    display: inline-block;
    margin-top: 15px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}
.login-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
    color: white;
}

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

@media (max-width: 768px) {
    .upload-controls { flex-direction: column; align-items: center; }
    .upload-button { width: 100%; max-width: 300px; justify-content: center; }
    .video-upload-section { padding: 20px 15px; }
    .upload-title { font-size: 18px; }
    
    /* Mobile: Simpler video handling */
    .video-wrapper {
        margin: 15px 0;
    }
}

@media (max-width: 480px) {
    .url-title { font-size: 16px; }
    .video-features { flex-direction: column; gap: 6px; }
    .file-details.video-file { flex-direction: column; text-align: center; gap: 8px; }
}

/* Accessibility */
.upload-button:focus, .retry-button:focus, .login-button:focus, .upload-zone.video-zone:focus {
    outline: 2px solid #10b981;
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .upload-button, .retry-button, .login-button, .video-upload-section, .upload-zone.video-zone {
        transition: none;
    }
    .video-upload-section:hover .upload-icon {
        animation: none;
    }
}

/* ========================================
   DARK MODE SUPPORT
   ======================================== */

@media (prefers-color-scheme: dark) {
    .url-header, .help-card, .login-card {
        background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
        border-color: #475569;
    }
    .url-title, .upload-title, .upload-main-text, .file-name, .progress-text, .help-card h4, .login-card h4 {
        color: #f1f5f9;
    }
    .url-subtitle, .file-size, .help-card p {
        color: #94a3b8;
    }
    .video-upload-section {
        background: linear-gradient(135deg, #064e3b 0%, #065f46 100%);
        border-color: #10b981;
    }
    .upload-zone.video-zone, .file-details.video-file, .upload-progress {
        background: #1e293b;
        border-color: #10b981;
    }
    .upload-zone.video-zone:hover, .upload-zone.video-zone.drag-over {
        background: #0f172a;
    }
    .divider-text {
        background: #0f172a;
        color: #94a3b8;
    }
}

/* 
AGGRESSIVE DESKTOP VIDEO FIXES - Add to END of bunny-stream.css
These fixes target the specific desktop video control issues
*/

/* ========================================
   DESKTOP-ONLY AGGRESSIVE FIXES
   ======================================== */

@media (min-width: 769px) {
    
    /* CRITICAL: Desktop video wrapper must not hide content */
    .video-wrapper {
        position: relative !important;
        width: 100% !important;
        height: auto !important;
        max-height: none !important;
        aspect-ratio: auto !important;
        overflow: visible !important;
        background: transparent !important;
    }
    
    /* CRITICAL: Desktop video element - simplified positioning */
    .video-wrapper video {
        position: static !important;
        top: auto !important;
        left: auto !important;
        width: 100% !important;
        height: auto !important;
        max-height: 400px !important;
        object-fit: contain !important;
        display: block !important;
        /* FORCE controls to be visible */
        z-index: 999999 !important;
        pointer-events: auto !important;
        cursor: pointer !important;
        background: #000 !important;
    }
    
    /* FORCE video controls to appear */
    .video-wrapper video[controls] {
        -webkit-appearance: auto !important;
        appearance: auto !important;
    }
    
    /* WEBKIT CONTROL OVERRIDES - More aggressive */
    .video-wrapper video::-webkit-media-controls {
        display: flex !important;
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
        background: rgba(0, 0, 0, 0.9) !important;
        border-radius: 0 !important;
        width: 100% !important;
        height: auto !important;
        position: relative !important;
        z-index: 999999 !important;
    }
    
    .video-wrapper video::-webkit-media-controls-panel {
        display: flex !important;
        opacity: 1 !important;
        visibility: visible !important;
        background: rgba(0, 0, 0, 0.9) !important;
        pointer-events: auto !important;
        width: 100% !important;
        height: 40px !important;
        position: relative !important;
        z-index: 999999 !important;
    }
    
    .video-wrapper video::-webkit-media-controls-play-button {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
        cursor: pointer !important;
        background: rgba(255, 255, 255, 0.9) !important;
        border-radius: 50% !important;
        width: 48px !important;
        height: 48px !important;
        position: relative !important;
        z-index: 999999 !important;
        margin: 5px !important;
    }
    
    .video-wrapper video::-webkit-media-controls-timeline {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
        background: rgba(255, 255, 255, 0.3) !important;
        height: 6px !important;
        border-radius: 3px !important;
    }
    
    .video-wrapper video::-webkit-media-controls-current-time-display,
    .video-wrapper video::-webkit-media-controls-time-remaining-display {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
        color: white !important;
        font-size: 12px !important;
    }
    
    .video-wrapper video::-webkit-media-controls-volume-slider {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
    }
    
    .video-wrapper video::-webkit-media-controls-mute-button {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
        cursor: pointer !important;
    }
    
    .video-wrapper video::-webkit-media-controls-fullscreen-button {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
        cursor: pointer !important;
    }
    
    /* FORCE controls to stay visible */
    .video-wrapper:hover video::-webkit-media-controls,
    .video-wrapper video:hover::-webkit-media-controls,
    .video-wrapper video:focus::-webkit-media-controls {
        opacity: 1 !important;
        display: flex !important;
        visibility: visible !important;
    }
    
    /* Firefox controls */
    .video-wrapper video::-moz-media-controls {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
        background: rgba(0, 0, 0, 0.9) !important;
    }
    
    /* Remove any overlays that might interfere */
    .video-wrapper::before,
    .video-wrapper::after {
        pointer-events: none !important;
        z-index: 1 !important;
    }
    
    /* Ensure wrapper doesn't interfere with clicks */
    .video-wrapper {
        pointer-events: none !important;
    }
    
    .video-wrapper video {
        pointer-events: auto !important;
    }
    
    /* Enhanced embed wrapper desktop fixes */
    .enhanced-embed-wrapper.video-container {
        overflow: visible !important;
        background: transparent !important;
        padding: 0 !important;
        border: none !important;
    }
    
    .enhanced-embed-wrapper.video-container .video-wrapper {
        background: transparent !important;
        border: 1px solid #10b981 !important;
        border-radius: 8px !important;
        overflow: visible !important;
    }
    
    /* Remove any CSS that might hide video controls */
    .video-wrapper video {
        -webkit-user-select: auto !important;
        user-select: auto !important;
        -webkit-touch-callout: auto !important;
    }
}

/* ========================================
   EMERGENCY DESKTOP FALLBACK
   ======================================== */

@media (min-width: 769px) {
    /* If all else fails, create a visible play button overlay */
    .video-wrapper.needs-fallback {
        position: relative;
    }
    
    .video-wrapper.needs-fallback::before {
        content: '▶️';
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        font-size: 48px;
        background: rgba(0, 0, 0, 0.8);
        color: white;
        border-radius: 50%;
        width: 80px;
        height: 80px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        z-index: 999999;
        pointer-events: auto;
        opacity: 1;
        visibility: visible;
    }
    
    .video-wrapper.needs-fallback.playing::before {
        display: none;
    }
}

/* ========================================
   LISTIVO COMPATIBILITY OVERRIDES
   ======================================== */

@media (min-width: 769px) {
    /* Override any Listivo CSS that might interfere */
    .listivo-panel-form__embed .video-wrapper,
    .listivo-panel-form__embed .video-wrapper video {
        position: static !important;
        height: auto !important;
        max-height: 400px !important;
        overflow: visible !important;
    }
    
    .listivo-panel-form__embed video::-webkit-media-controls {
        display: flex !important;
        opacity: 1 !important;
    }
}

/* ========================================
   DEBUGGING HELPERS (Remove in production)
   ======================================== */

@media (min-width: 769px) {
    /* Add red border to identify desktop videos */
    .video-wrapper video[data-desktop-video="true"] {
        border: 2px solid red !important;
        box-sizing: border-box !important;
    }
    
    /* Add debug info */
    .video-wrapper[data-debug="true"]::after {
        content: 'DESKTOP VIDEO - Controls should be visible';
        position: absolute;
        top: 5px;
        left: 5px;
        background: rgba(255, 0, 0, 0.8);
        color: white;
        padding: 5px;
        font-size: 12px;
        z-index: 999999;
        pointer-events: none;
    }
}

@media (max-width: 768px) {
    .upload-video-preview-container {
        overflow: visible !important;
    }
    
    .video-aspect-container {
        aspect-ratio: unset !important;
        height: auto !important;
        overflow: visible !important;
    }
    
    .enhanced-video-element,
    .upload-video-preview-container video {
        aspect-ratio: unset !important;
        height: auto !important;
        object-fit: contain !important;
    }
}

/* Add spacing between upload and URL sections */
@media (max-width: 768px) {
    .url-input-section {
        margin-top: 40px !important;
        padding-top: 20px !important;
        border-top: 1px solid #e2e8f0 !important;
    }
}

/* Universal video container fix - no black bars on any device */
.video-aspect-container {
    width: 100% !important;
    aspect-ratio: 16/9 !important;
    background: #000 !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    position: relative !important;
}

.video-aspect-container iframe {
    width: 100% !important;
    height: 100% !important;
    border: none !important;
    background: #000 !important;
    object-fit: cover !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
}

/* Ensure proper video fitting in all preview containers */
.upload-video-preview-container .video-aspect-container iframe {
    object-fit: cover !important;
    object-position: center !important;
}

/* iOS-specific black bar minimization - targets iOS Safari only */
@media only screen 
and (-webkit-min-device-pixel-ratio: 2) 
and (orientation: portrait) 
and (max-device-width: 896px) {
    
    /* iOS iframe adjustments */
    .video-aspect-container iframe {
        transform: scale(1.1) !important;
        transform-origin: center !important;
        border-radius: 8px !important;
    }
}

/* iOS landscape orientation */
@media only screen 
and (-webkit-min-device-pixel-ratio: 2) 
and (orientation: landscape) 
and (max-device-height: 896px) {
    
    .video-aspect-container iframe {
        transform: scale(1.05) !important;
        transform-origin: center !important;
    }
}

/* Quick fix - make videos bigger */
.video-aspect-container,
.upload-video-preview-container .video-aspect-container {
    width: 95% !important;
    max-width: 1200px !important;
    margin: 25px auto !important;
    min-height: 250px !important;
}

@media (max-width: 768px) {
    .video-aspect-container {
        width: 98% !important;
        min-height: 280px !important;
    }
}


/* Hidden field specific styles */
.hidden-fv-fields {
    position: absolute;
    left: -9999px;
    opacity: 0;
    pointer-events: none;
}

.existing-video-notice {
    animation: slideInDown 0.5s ease-out;
}

/* Platform badges */
.video-platform-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: white;
    z-index: 10;
}

/* ========================================
   YOUTUBE SERVICE SECTION STYLES
   File: bunny-stream.css
   ======================================== */

.bunny-youtube-service-info {
    background: -webkit-linear-gradient(315deg, #f0f9ff 0%, #e0f2fe 100%);
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 2px solid #0ea5e9;
    border-radius: 12px;
    padding: 25px;
    margin: 25px 0;
    text-align: center;
    font-family: system-ui, -apple-system, sans-serif;
    position: relative;
    overflow: hidden;
    -webkit-box-shadow: 0 4px 15px rgba(14, 165, 233, 0.15);
    box-shadow: 0 4px 15px rgba(14, 165, 233, 0.15);
}

.bunny-youtube-service-info--blocked {
    background: -webkit-linear-gradient(315deg, #fef3c7 0%, #fde68a 100%);
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-color: #f59e0b;
    -webkit-box-shadow: 0 4px 15px rgba(245, 158, 11, 0.15);
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.15);
}

.bunny-youtube-service-info__decoration {
    position: absolute;
    top: -20px;
    right: -20px;
    width: 80px;
    height: 80px;
    background: rgba(14, 165, 233, 0.1);
    border-radius: 50%;
    pointer-events: none;
}

.bunny-youtube-service-info--blocked .bunny-youtube-service-info__decoration {
    background: rgba(245, 158, 11, 0.1);
}

.bunny-youtube-service-info__content {
    position: relative;
    z-index: 1;
}

.bunny-youtube-service-info__header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.bunny-youtube-service-info__icon {
    font-size: 24px;
}

.bunny-youtube-service-info__title {
    color: #0369a1;
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    line-height: 1.3;
}

.bunny-youtube-service-info--blocked .bunny-youtube-service-info__title {
    color: #92400e;
}

.bunny-youtube-service-info__value-prop {
    background: rgba(255, 255, 255, 0.7);
    padding: 18px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #0ea5e9;
}

.bunny-youtube-service-info--blocked .bunny-youtube-service-info__value-prop {
    border-left-color: #f59e0b;
}

.bunny-youtube-service-info__value-prop-main {
    color: #075985;
    font-size: 16px;
    margin: 0 0 8px 0;
    font-weight: 500;
    line-height: 1.4;
}

.bunny-youtube-service-info--blocked .bunny-youtube-service-info__value-prop-main {
    color: #92400e;
}

.bunny-youtube-service-info__value-prop-sub {
    color: #0c4a6e;
    font-size: 14px;
    margin: 0;
    line-height: 1.4;
}

.bunny-youtube-service-info--blocked .bunny-youtube-service-info__value-prop-sub {
    color: #a16207;
}

.bunny-youtube-service-info__benefits {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}

/* Fallback for older browsers that don't support gap */
.bunny-youtube-service-info__benefits > .bunny-youtube-service-info__benefit {
    margin: 6px;
}

.bunny-youtube-service-info__benefit {
    background: rgba(16, 185, 129, 0.1);
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    color: #065f46;
    font-weight: 500;
    -webkit-box-flex: 0;
    -ms-flex: 0 0 auto;
    flex: 0 0 auto;
    min-width: 160px;
    text-align: center;
}

.bunny-youtube-service-info--blocked .bunny-youtube-service-info__benefit {
    background: rgba(245, 158, 11, 0.15);
    color: #92400e;
}

.bunny-youtube-service-info__cta {
    display: -webkit-inline-box;
    display: -ms-inline-flexbox;
    display: inline-flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    padding: 12px 24px;
    background: -webkit-linear-gradient(315deg, #0ea5e9, #0284c7);
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
    color: #ffffff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 15px;
    -webkit-transition: all 0.3s ease;
    transition: all 0.3s ease;
    -webkit-box-shadow: 0 2px 8px rgba(14, 165, 233, 0.3);
    box-shadow: 0 2px 8px rgba(14, 165, 233, 0.3);
}

.bunny-youtube-service-info--blocked .bunny-youtube-service-info__cta {
    background: -webkit-linear-gradient(315deg, #f59e0b, #d97706);
    background: linear-gradient(135deg, #f59e0b, #d97706);
    -webkit-box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

.bunny-youtube-service-info__cta:hover {
    background: -webkit-linear-gradient(315deg, #0284c7, #0369a1);
    background: linear-gradient(135deg, #0284c7, #0369a1);
    -webkit-transform: translateY(-2px);
    transform: translateY(-2px);
    -webkit-box-shadow: 0 4px 12px rgba(14, 165, 233, 0.4);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.4);
}

.bunny-youtube-service-info--blocked .bunny-youtube-service-info__cta:hover {
    background: -webkit-linear-gradient(315deg, #d97706, #b45309);
    background: linear-gradient(135deg, #d97706, #b45309);
    -webkit-box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

.bunny-youtube-service-info__cta-icon {
    font-size: 16px;
    margin-right: 8px;
}

.bunny-youtube-service-info__note {
    font-size: 12px;
    color: #64748b;
    margin: 12px 0 0 0;
    font-style: italic;
}

.bunny-youtube-service-info--blocked .bunny-youtube-service-info__note {
    color: #a16207;
    font-weight: 500;
}

.bunny-youtube-service-info__free-tier-message {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid #f87171;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    color: #991b1b;
    font-size: 14px;
    line-height: 1.5;
}

.bunny-youtube-service-info__free-tier-highlight {
    font-weight: 600;
    color: #7f1d1d;
}

.bunny-youtube-service-info__upgrade-link {
    color: #dc2626;
    font-weight: 600;
    text-decoration: underline;
}

.bunny-youtube-service-info__upgrade-link:hover {
    color: #b91c1c;
    text-decoration: none;
}

/* ========================================
   OTHER EMBED TEMPLATE STYLES
   ======================================== */

.hidden-fv-fields {
    position: absolute;
    left: -9999px;
    opacity: 0;
    pointer-events: none;
}

.existing-video-notice {
    animation: slideInDown 0.5s ease-out;
}

.existing-video-preview {
    animation: fadeInUp 0.6s ease-out;
}

.video-platform-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: white;
    z-index: 10;
    pointer-events: none;
}

.youtube-badge {
    background: linear-gradient(135deg, #ff0000, #cc0000);
}

.vimeo-badge {
    background: linear-gradient(135deg, #1ab7ea, #0d8bb8);
}

.bunny-badge {
    background: linear-gradient(135deg, #10b981, #059669);
}

.video-upsell-message {
    transition: all 0.3s ease;
}

.video-upsell-message:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.3);
}

.upload-divider {
    position: relative;
    margin: 30px 0;
    text-align: center;
}

.upload-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #e2e8f0, transparent);
}

.divider-text {
    background: white;
    padding: 0 20px;
    color: #6b7280;
    font-weight: 600;
    font-size: 14px;
    position: relative;
    z-index: 1;
}

.upload-disabled {
    opacity: 0.7;
}

.size-limit-info {
    text-align: center;
    font-style: italic;
}

@keyframes slideInDown {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .video-upsell-message {
        padding: 12px;
        font-size: 13px;
    }
    
    .upload-divider {
        margin: 20px 0;
    }
    
    .existing-video-notice {
        padding: 10px;
        font-size: 14px;
    }
    
    .bunny-youtube-service-info {
        padding: 20px 15px;
        margin: 20px 0;
    }
    
    .bunny-youtube-service-info__header {
        flex-direction: column;
        gap: 8px;
    }
    
    .bunny-youtube-service-info__title {
        font-size: 16px;
        text-align: center;
    }
    
    .bunny-youtube-service-info__value-prop {
        padding: 15px;
    }
    
    .bunny-youtube-service-info__benefits {
        -webkit-box-orient: vertical;
        -webkit-box-direction: normal;
        -ms-flex-direction: column;
        flex-direction: column;
    }
    
    /* Mobile fallback margins */
    .bunny-youtube-service-info__benefits > .bunny-youtube-service-info__benefit {
        margin: 4px 0;
    }
    
    .bunny-youtube-service-info__benefit {
        padding: 10px;
        text-align: center;
        min-width: auto;
        width: 100%;
    }
    
    .bunny-youtube-service-info__cta {
        padding: 14px 20px;
        font-size: 14px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .bunny-youtube-service-info {
        background: -webkit-linear-gradient(315deg, #1e293b 0%, #334155 100%);
        background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
        border-color: #3b82f6;
    }
    
    .bunny-youtube-service-info--blocked {
        background: -webkit-linear-gradient(315deg, #451a03 0%, #78350f 100%);
        background: linear-gradient(135deg, #451a03 0%, #78350f 100%);
        border-color: #f59e0b;
    }
    
    .bunny-youtube-service-info__value-prop {
        background: rgba(255, 255, 255, 0.1);
    }
    
    .bunny-youtube-service-info__title {
        color: #93c5fd;
    }
    
    .bunny-youtube-service-info--blocked .bunny-youtube-service-info__title {
        color: #fbbf24;
    }
    
    .bunny-youtube-service-info__value-prop-main {
        color: #bfdbfe;
    }
    
    .bunny-youtube-service-info--blocked .bunny-youtube-service-info__value-prop-main {
        color: #fcd34d;
    }
    
    .bunny-youtube-service-info__value-prop-sub {
        color: #dbeafe;
    }
    
    .bunny-youtube-service-info--blocked .bunny-youtube-service-info__value-prop-sub {
        color: #fde68a;
    }
}

/* ========================================
   CUSTOM ENHANCEMENTS – VIDEO UPLOAD UX IMPROVEMENTS
   Author: ChatGPT | Date: 2025-08-01
   Purpose: Better contrast, animated badges, tooltips, and accessibility
   ======================================== */

/* 1. Better Contrast for File Format Info */
.format-info-text {
    color: #1e293b;
    font-weight: 600;
    font-size: 14px;
    margin: 12px 0;
    text-align: center;
}
@media (prefers-color-scheme: dark) {
    .format-info-text {
        color: #f1f5f9;
    }
}

/* 2. Animated Feature Badges (e.g. HD Quality, Streaming Rapide) */
.upload-feature-tag {
    display: inline-block;
    background-color: rgba(16, 185, 129, 0.1);
    color: #059669;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 12px;
    margin: 4px;
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 9999px;
    transition: all 0.3s ease;
}
.upload-feature-tag:hover {
    transform: scale(1.05);
    background-color: rgba(16, 185, 129, 0.15);
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

/* 3. Tooltip Helper for Icon Labels */
.tooltip {
    position: relative;
    cursor: help;
}
.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background: #1e293b;
    color: #fff;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 20;
}
.tooltip:hover::after {
    opacity: 1;
}
.enhanced-embed-wrapper.video-container {
    position: relative !important;
    width: 100% !important;
    max-width: 100% !important;
    aspect-ratio: 16 / 9 !important;
    overflow: visible !important;
    padding: 0 !important;
    background: #000 !important;
    border-radius: 12px !important;
    display: block !important;
}

.enhanced-embed-wrapper.video-container iframe {
    position: static !important;
    width: 100% !important;
    height: 100% !important;
    max-height: none !important;
    aspect-ratio: 16 / 9 !important;
    display: block !important;
    object-fit: contain !important;
    border: none !important;
    background: transparent !important;
    pointer-events: auto !important;
    z-index: 10 !important;
}

/* Wrapper containing video + badges */
.youtube-preview-wrapper {
  position: relative;
  display: block;
  margin-bottom: 20px; /*  adds spacing below video */
  width: 100%;
}

/* Make sure nothing is overlapping button */
.youtube-upload-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Blue button */
.youtube-upload-button {
  margin-top: 10px;
  width: 100%;
  z-index: 1;
  position: relative; /* ensures stacking doesn't conflict */
}

/* Force HD badge and "Vérifiée" badge to stay inside frame */
.youtube-preview-wrapper .youtube-badge,
.youtube-preview-wrapper .hd-badge {
  position: absolute;
  z-index: 2;
  padding: 6px 10px;
  font-size: 12px;
  border-radius: 6px;
  color: white;
  font-weight: bold;
}
.youtube-badge {
  top: 10px;
  right: 10px;
  background: #dc2626; /* red */
}
.hd-badge {
  bottom: 10px;
  right: 10px;
  background: #10b981; /* green */
}

/* Mobile fix */
@media (max-width: 768px) {
  .youtube-upload-section {
    padding: 12px;
  }

  .youtube-preview-wrapper iframe {
    width: 100% !important;
    aspect-ratio: 16 / 9;
    display: block;
  }

  .youtube-upload-button {
    margin-top: 16px;
  }
}



/* ==========================================================================
   🟣 MarketNoba Guest Upload Styles – Signup Prompt for Non-Logged-In Users
   File: bunny-stream.css
   Location: /wp-content/themes/listivo-child/css/bunny-stream.css
   Applies To: embed.php – Bunny Stream uploader fallback block
   Purpose:
   - Style the signup call-to-action for guest users
   - Center it, apply modern card layout, and make features responsive
   Last Updated: 2025-08-04
   ========================================================================== */

body:not(.logged-in) .marketnoba-signup-container {
  max-width: 720px !important;
  margin: 30px auto !important;
  padding: 40px 30px !important;
  text-align: center !important;
  border-radius: 16px !important;
  border: 1px solid #e5e7eb !important;
  background: #f0f4ff !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04) !important;
}

body:not(.logged-in) .marketnoba-signup-icon {
  font-size: 48px !important;
  margin-bottom: 20px !important;
}

body:not(.logged-in) .marketnoba-signup-title {
  font-size: 32px !important;
  font-weight: bold !important;
  margin-bottom: 20px !important;
  color: #4338ca !important;
  line-height: 1.3 !important;
}

body:not(.logged-in) .marketnoba-signup-subtitle {
  font-size: 18px !important;
  margin-bottom: 30px !important;
  color: #374151 !important;
  line-height: 1.4 !important;
}

body:not(.logged-in) .marketnoba-features-grid {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 20px !important;
  justify-content: center !important;
  margin-bottom: 30px !important;
}

body:not(.logged-in) .marketnoba-feature-box {
  flex: 1 1 45% !important;
  min-width: 140px !important;
  max-width: 220px !important;
  background: white !important;
  border: 1px solid #e5e7eb !important;
  border-radius: 12px !important;
  padding: 20px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  text-align: center !important;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03) !important;
}

body:not(.logged-in) .marketnoba-feature-icon {
  width: 48px !important;
  height: 48px !important;
  border-radius: 12px !important;
  display: inline-block !important;
  text-align: center !important;
  line-height: 48px !important;
  margin-bottom: 10px !important;
  font-size: 24px !important;
  color: white !important;
}

body:not(.logged-in) .marketnoba-feature-icon--green { background: #10b981 !important; }
body:not(.logged-in) .marketnoba-feature-icon--orange { background: #f59e0b !important; }
body:not(.logged-in) .marketnoba-feature-icon--purple { background: #8b5cf6 !important; }
body:not(.logged-in) .marketnoba-feature-icon--cyan { background: #06b6d4 !important; }

body:not(.logged-in) .marketnoba-feature-text {
  color: #1f2937 !important;
  font-size: 16px !important;
  font-weight: bold !important;
  margin: 0 !important;
}

body:not(.logged-in) .marketnoba-signup-btn {
  display: block !important;
  background: #4338ca !important;
  color: white !important;
  padding: 15px 30px !important;
  border-radius: 9999px !important;
  text-decoration: none !important;
  font-weight: bold !important;
  font-size: 16px !important;
  margin: 0 auto 20px auto !important;
  text-transform: uppercase !important;
  box-shadow: 0 2px 6px rgba(67, 56, 202, 0.25) !important;
}

body:not(.logged-in) .marketnoba-login-section {
  background: white !important;
  padding: 15px 25px !important;
  border-radius: 10px !important;
  border: 1px solid #e5e7eb !important;
  display: inline-block !important;
  margin: 0 auto !important;
}

body:not(.logged-in) .marketnoba-login-text {
  color: #6b7280 !important;
  font-size: 16px !important;
}

body:not(.logged-in) .marketnoba-login-link {
  color: #4338ca !important;
  font-weight: bold !important;
  text-decoration: none !important;
  font-size: 16px !important;
  margin-left: 4px !important;
}

/* Optional Dev Border Debug – remove in production */
/*
body:not(.logged-in) .marketnoba-signup-container,
body:not(.logged-in) .marketnoba-feature-box {
  outline: 1px dashed #ccc !important;
}
*/