/* =========================================
   0. FIX ESPACIOS WP (ELIMINA CAJAS NEGRAS EXTRAS)
   ========================================= */
.wp-block-embed.wp-has-aspect-ratio .wp-block-embed__wrapper::before,
.wp-embed-aspect-16-9 .wp-block-embed__wrapper::before,
.wp-embed-aspect-4-3 .wp-block-embed__wrapper::before {
    content: "" !important; display: none !important; padding-bottom: 0 !important;
}

.wp-block-embed, .wp-block-embed__wrapper, figure.wp-block-embed {
    height: auto !important; padding-bottom: 0 !important; min-height: 0 !important; margin-bottom: 0 !important;
}

.wp-block-embed.is-type-video,
.wp-block-embed.is-provider-youtube,
.wp-block-embed.is-provider-vimeo,
figure.wp-block-embed {
    max-width: 100% !important; width: 100% !important; margin-left: 0 !important; margin-right: 0 !important; display: block !important;
}

.wp-block-video:has(.yvpd-player-wrapper) { width: 100% !important; }
.wp-block-video video { max-width: 100%; height: auto; display: block; }

/* =========================================
   1. ESTRUCTURA PRINCIPAL DEL REPRODUCTOR
   ========================================= */
.yvpd-player-wrapper {
    position: relative !important; display: block !important; background: #000;
    margin: 0 auto 20px auto !important; max-width: 100% !important;
    border-radius: 8px; overflow: hidden !important; line-height: 0 !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.yvpd-player-wrapper[style] { display: block !important; }
.yvpd-player-wrapper.yvpd-wrapper-short { max-width: 400px !important; margin: 0 auto !important; }

/* =========================================
   9. RESPONSIVIDAD MÓVIL (LA REGLA DEL 100%)
   ========================================= */
/* En PC respeta el tamaño del panel, pero en móviles... */
@media (max-width: 768px) {
    .yvpd-responsive-wrap {
        width: 100% !important;
        max-width: 100% !important;
        border-radius: 0 !important; /* En celular es mejor sin bordes si ocupa toda la pantalla */
    }
}

/* =========================================
   2. BARRA DE CONTROLES (BASE Y EFECTO YOUTUBE)
   ========================================= */
.video-js .vjs-control-bar {
    display: flex !important; height: 50px !important;
    background: linear-gradient(transparent, rgba(0,0,0,0.95)) !important;
    align-items: center !important; padding: 0 5px !important;
    opacity: 1; visibility: visible; transition: opacity 0.3s, visibility 0.3s;
    line-height: normal !important;
    z-index: 200 !important; 
}

.video-js .vjs-text-track-settings { z-index: 300 !important; }
.video-js.yvpd-hide-bar .vjs-control-bar { display: none !important; visibility: hidden !important; opacity: 0 !important; height: 0 !important; padding: 0 !important; pointer-events: none !important; }

/* EFECTO YOUTUBE: Ocultar barra al no mover el mouse mientras se reproduce */
.video-js.vjs-has-started.vjs-playing.vjs-user-inactive .vjs-control-bar,
.video-js.vjs-has-started.vjs-playing.vjs-user-inactive .yvpd-upper-controls {
    opacity: 0 !important;
    visibility: hidden !important;
}

/* EFECTO YOUTUBE: Forzar barra visible en pausa, sin importar si el usuario mueve el mouse o no */
.video-js.vjs-paused .vjs-control-bar,
.video-js.vjs-paused .yvpd-upper-controls {
    opacity: 1 !important;
    visibility: visible !important;
}

/* =========================================
   3. BOTONES Y ALINEACIÓN
   ========================================= */
.vjs-button.yvpd-custom-btn, .video-js .vjs-control, .video-js .vjs-playback-rate, .yvpd-info-qual {
    height: 50px !important; width: 42px !important; display: flex !important; align-items: center !important; justify-content: center !important; margin: 0 !important; padding: 0 !important; top: 0 !important; background: none !important; cursor: pointer !important;
}

.video-js .vjs-control:before, .video-js .vjs-icon-placeholder:before {
    line-height: 50px !important; font-size: 1.8em !important; position: relative !important; top: 0 !important; display: block !important; height: 50px !important; width: 100% !important; pointer-events: none;
}

.vjs-button.yvpd-custom-btn .dashicons { line-height: 50px !important; font-size: 20px !important; display: block !important; height: 50px !important; text-align: center !important; pointer-events: none; }
.video-js .vjs-playback-rate-value, .yvpd-info-qual span { line-height: 50px !important; font-size: 13px !important; font-weight: 700 !important; display: block !important; height: 50px !important; pointer-events: none; }
.vjs-progress-control { flex-grow: 1 !important; height: 50px !important; display: flex !important; align-items: center !important; }
.vjs-live-display, .vjs-current-time, .vjs-duration, .vjs-time-divider { display: none !important; }

/* =========================================
   4. VOLUMEN FLOTANTE
   ========================================= */
div.video-js .vjs-control-bar .vjs-volume-panel::before, div.video-js .vjs-control-bar .vjs-volume-panel::after, div.video-js .vjs-control-bar .vjs-volume-panel .vjs-icon-placeholder::before { content: none !important; display: none !important; }
div.video-js .vjs-control-bar .vjs-volume-panel { background: none !important; border: none !important; width: 42px !important; display: flex !important; align-items: center !important; justify-content: center !important; }
.video-js .vjs-volume-panel .vjs-mute-control { width: 100% !important; height: 100% !important; display: flex !important; align-items: center !important; justify-content: center !important; background: transparent !important; padding: 0 !important; margin: 0 !important; cursor: pointer !important; }
.video-js .vjs-volume-panel .vjs-mute-control::before { font-family: "Dashicons", sans-serif !important; font-size: 20px !important; line-height: 50px !important; display: block !important; width: auto !important; height: 50px !important; content: "\f521" !important; color: var(--yvpd-main-color, #00adef) !important; }
.video-js .vjs-volume-panel.vjs-vol-0 .vjs-mute-control::before { content: "\f520" !important; }
.video-js .vjs-volume-panel .vjs-volume-control { display: none !important; }
.yvpd-vol-portal { position: absolute !important; bottom: 36px !important; transform: translateX(-50%) !important; z-index: 2000 !important; opacity: 0; visibility: hidden; padding-bottom: 0 !important; transition: opacity 0.2s; }
.yvpd-vol-portal.v-active { opacity: 1; visibility: visible; }
.yvpd-vol-portal .vjs-volume-control { background: rgba(20, 20, 20, 0.95) !important; border-radius: 6px 6px 0 0; width: 32px !important; height: 100px !important; padding: 10px 0 !important; display: block !important; }

/* =========================================
   5. COLORES BASE Y MODALES
   ========================================= */
.vjs-button.yvpd-custom-btn .dashicons, .vjs-playback-rate .vjs-playback-rate-value, .video-js .vjs-mute-control:before, .yvpd-info-qual span { color: var(--yvpd-main-color, #00adef) !important; transition: color 0.2s ease !important; }
.vjs-button.yvpd-custom-btn:hover .dashicons, .vjs-playback-rate:hover .vjs-playback-rate-value, .video-js .vjs-control:hover .vjs-icon-placeholder:before, .video-js .vjs-control:hover .vjs-mute-control:before { color: var(--yvpd-hover-color, #ffffff) !important; }
.video-js .vjs-play-progress, .video-js .vjs-volume-level { background-color: var(--yvpd-main-color, #00adef) !important; }
.yvpd-btn-save { background-color: var(--yvpd-main-color, #00adef) !important; }

/* Modal y Superior */
.yvpd-modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.85); z-index: 999999; display: flex; align-items: center; justify-content: center; }
.yvpd-modal-content { background: #1a1a1a; width: 90%; max-width: 480px; border-radius: 12px; padding: 25px; color: #fff; box-shadow: 0 10px 40px rgba(0,0,0,0.6); border: 1px solid #333; }
.yvpd-modal-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #333; padding-bottom: 12px; margin-bottom: 20px; }
.yvpd-modal-header h3 { margin: 0; font-size: 18px; font-weight: 600; color: var(--yvpd-main-color, #00adef); }
.yvpd-modal-close { cursor: pointer; font-size: 28px; color: #777; transition: 0.3s; }
.yvpd-modal-close:hover { color: #fff; }
.yvpd-share-section { margin-bottom: 20px; }
.yvpd-share-section label { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: 1px; color: #888; margin-bottom: 8px; font-weight: bold; }
.yvpd-input-group { display: flex; gap: 8px; }
.yvpd-input-group input { flex-grow: 1; background: #000; border: 1px solid #444; color: #fff; padding: 10px; border-radius: 6px; font-size: 13px; outline: none; }
.yvpd-copy-btn { background: var(--yvpd-main-color, #00adef); border: none; color: #fff; padding: 0 15px; border-radius: 6px; cursor: pointer; font-weight: bold; font-size: 12px; transition: 0.3s; }
.yvpd-social-grid { display: flex; justify-content: center; gap: 15px; flex-wrap: wrap; margin-top: 25px; border-top: 1px solid #333; padding-top: 20px; }
.yvpd-social-grid img { width: 38px; height: 38px; object-fit: contain; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5)); transition: 0.3s; }
.yvpd-upper-controls { position: absolute; top: 15px; right: 15px; display: flex; flex-direction: column; gap: 10px; z-index: 100; transition: opacity 0.3s, visibility 0.3s; }
.yvpd-upper-btn { background: rgba(0,0,0,0.4) !important; border-radius: 50% !important; width: 38px !important; height: 38px !important; display: flex !important; align-items: center !important; justify-content: center !important; cursor: pointer; border:none; }
.yvpd-upper-btn .dashicons { color: #fff; font-size: 18px; pointer-events:none; }

/* FIX: BOTONES DE ACCIÓN EN MODALES (CAPTURA/DESCARGA) */
.yvpd-action-btns { display: flex; justify-content: center; align-items: center; gap: 15px; margin-top: 20px; }
.yvpd-btn-cancel, .yvpd-btn-save { box-sizing: border-box !important; display: inline-flex !important; align-items: center !important; justify-content: center !important; height: 42px !important; padding: 0 24px !important; border-radius: 6px !important; font-weight: bold !important; font-size: 14px !important; line-height: 1 !important; text-decoration: none !important; border: none !important; margin: 0 !important; cursor: pointer !important; transition: all 0.3s ease !important; }
.yvpd-btn-cancel { background: #444 !important; color: #fff !important; }
.yvpd-btn-cancel:hover { background: #666 !important; }
.yvpd-btn-save { background: var(--yvpd-main-color, #00adef) !important; color: #fff !important; }
.yvpd-btn-save:hover { opacity: 0.8; }

/* =========================================
   6. ORDEN DE BOTONES (FLEX ORDER)
   ========================================= */
.video-js .vjs-control-bar .vjs-fullscreen-control { order: 20 !important; }
.video-js .yvpd-mobile-gear-btn { display: none !important; order: 19 !important; }
.video-js .vjs-control-bar .yvpd-info-qual { order: 18 !important; margin-right: 5px !important; }
.video-js .vjs-control-bar .yvpd-o-download { order: 17 !important; }
.video-js .vjs-control-bar .yvpd-o-snap { order: 16 !important; }
.video-js .vjs-control-bar .vjs-picture-in-picture-control { order: 15 !important; }
.video-js .vjs-control-bar .vjs-playback-rate { order: 14 !important; }
.video-js .vjs-control-bar .yvpd-o-cast { order: 13 !important; }

/* =========================================
   7. STICKY Y ANUNCIOS
   ========================================= */
.yvpd-ad-container { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: #000; z-index: 150; display: flex; align-items: center; justify-content: center; }
.yvpd-ad-container.yvpd-ad-overlay-bottom { top: auto; bottom: 55px; left: 50%; transform: translateX(-50%); width: 90% !important; height: auto; max-height: 35%; background: transparent; align-items: flex-end; z-index: 160; }
.yvpd-ad-link { display: block; width: 100%; height: auto; text-align: center; position: relative; }
.yvpd-ad-link img { width: 100%; height: auto; object-fit: contain; border-radius: 4px; box-shadow: 0 4px 10px rgba(0,0,0,0.5); }
.yvpd-ad-skip { position: absolute; bottom: 60px; right: 10px; background: rgba(0,0,0,0.7); color: #fff; padding: 8px 15px; border-radius: 4px; font-size: 13px; font-weight: bold; cursor: default; pointer-events: none; transition: 0.3s; z-index: 170; }
.yvpd-ad-skip.active { cursor: pointer; pointer-events: auto; background: var(--yvpd-main-color, #00adef); }
.yvpd-ad-skip.active:hover { background: #fff; color: #000; }
.yvpd-ad-timer-x { position: absolute; top: -12px; right: -12px; width: 26px; height: 26px; border-radius: 50%; background: var(--yvpd-main-color, #00adef); color: #fff; text-align: center; line-height: 26px; font-size: 12px; font-weight: 800; cursor: default; box-shadow: 0 2px 5px rgba(0,0,0,0.4); z-index: 180; border: 2px solid #fff; transition: transform 0.2s, background 0.2s; }
.yvpd-ad-timer-x.active { cursor: pointer; background: #d63638 !important; font-size: 18px; line-height: 24px; }

/* =====================================================================
   10. LOS 3 TEMAS VISUALES PREMIUM (COMPACTADOS Y SEGUROS)
   ===================================================================== */

/* 1. TEMA POR DEFECTO (Gratis) - Antiguo 6 "Mobile App" */
.yvpd-theme-mobile .yvpd-player-wrapper { 
    border-radius: 24px !important; 
    border: 3px solid var(--yvpd-main-color, #00adef); 
    padding: 2px; 
    background: #fff; 
}
.yvpd-theme-mobile .video-js { 
    border-radius: 20px !important; 
    overflow: hidden; 
}
.yvpd-theme-mobile .vjs-big-play-button { 
    border-radius: 50% !important; 
    width: 80px !important; 
    height: 80px !important; 
    line-height: 80px !important; 
    background: rgba(0,0,0,0.6) !important; 
    border: 2px solid #fff !important; 
}

/* 2. TEMA PRO 1 - Antiguo 5 "Mac OS Glass" */
.yvpd-theme-macos .vjs-control-bar { 
    width: 94% !important; 
    margin: 0 auto 15px auto !important; 
    border-radius: 20px !important; 
    background: rgba(30, 30, 30, 0.5) !important; 
    backdrop-filter: blur(15px) !important; 
    -webkit-backdrop-filter: blur(15px) !important; 
    border: 1px solid rgba(255,255,255,0.1); 
    bottom: 15px; 
    position: absolute; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.5); 
}
.yvpd-theme-macos .vjs-play-progress { 
    background-color: var(--yvpd-main-color, #fff) !important; 
    border-radius: 10px !important; 
}

/* --- DISEÑO DE CRISTAL PARA EL PORTAL DE VOLUMEN (MAC OS) --- */

/* 1. Elevamos el portal y lo empujamos a la derecha */
.yvpd-theme-macos .yvpd-vol-portal {
    bottom: 80px !important; /* La altura perfecta sobre la barra */
    margin-left: 30px !important; /* Prueba con 20, 22 o 25 */
    z-index: 2147483650 !important;
}

/* 2. Le inyectamos el diseño Glassmorphism a la caja del volumen */
.yvpd-theme-macos .yvpd-vol-portal .vjs-volume-control {
    background: rgba(30, 30, 30, 0.5) !important; 
    backdrop-filter: blur(15px) !important; 
    -webkit-backdrop-filter: blur(15px) !important; 
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 12px !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5) !important;
    width: 34px !important;
    height: 105px !important;
}

/* 3. Coloreamos la pista del volumen con tu color principal */
.yvpd-theme-macos .yvpd-vol-portal .vjs-volume-level {
    background-color: var(--yvpd-main-color, #fff) !important;
    border-radius: 10px !important;
}

/* 3. La rayita del volumen (La Pista) */
.yvpd-theme-macos .vjs-volume-bar.vjs-slider-vertical {
    margin: 0 auto !important; /* ESTO CENTRA LA RAYITA DENTRO DEL CRISTAL */
    width: 4px !important;
    height: 100% !important;
    border-radius: 10px !important;
}

/* 4. El color de relleno */
.yvpd-theme-macos .vjs-volume-level {
    background-color: var(--yvpd-main-color, #fff) !important;
    border-radius: 10px !important;
    width: 100% !important;
}

/* 3. TEMA PRO 2 - Antiguo 10 "Vertical Inmersivo / TikTok" */
.yvpd-theme-tiktok .vjs-tech { object-fit: cover !important; }
.yvpd-theme-tiktok .vjs-control-bar { background: transparent !important; }
.yvpd-theme-tiktok .vjs-progress-control { position: absolute; bottom: 30px; width: 95%; left: 2.5%; }
.yvpd-theme-tiktok .vjs-play-progress { background-color: var(--yvpd-main-color, #fff) !important; height: 3px !important; }
.yvpd-theme-tiktok .yvpd-upper-controls { top: auto; bottom: 80px; right: 15px; }
.yvpd-theme-tiktok .yvpd-upper-btn { background: transparent !important; flex-direction: column; height: 60px !important; }
.yvpd-theme-tiktok .yvpd-upper-btn .dashicons { font-size: 28px; drop-shadow: 0 2px 5px rgba(0,0,0,0.8); }

/* IMPORTANTE: ELIMINA LA REGLA DE "20. CURA FULLSCREEN" AL FINAL DEL CSS SI LA AGREGASTE ANTES */

/* =========================================
   11. ENGRANE Y BOTTOM SHEET PARA SMARTPHONES
   ========================================= */

@media (max-width: 950px) and (max-height: 500px), (max-width: 600px) {
    /* Ocultamos las herramientas de Pro en celular para no llenar la barra.
       NOTA: .yvpd-info-qual ya NO ESTÁ AQUÍ, por lo que será visible siempre */
    .video-js .vjs-control-bar .vjs-subs-caps-button,
    .video-js .vjs-control-bar .vjs-playback-rate,
    .video-js .vjs-control-bar .yvpd-o-cast,
    .video-js .vjs-control-bar .vjs-picture-in-picture-control,
    .video-js .vjs-control-bar .yvpd-o-snap,
    .video-js .vjs-control-bar .yvpd-o-download {
        display: none !important;
    }
    
    /* Aparece el engrane */
    .video-js .yvpd-mobile-gear-btn {
        display: flex !important;
    }

    /* COMPRESIÓN DE BOTONES PARA MÓVILES (Evita que el Fullscreen se desborde) */
    .video-js .vjs-control-bar {
        padding: 0 2px !important;
    }
    
    .vjs-button.yvpd-custom-btn, 
    .video-js .vjs-control, 
    .video-js .vjs-playback-rate, 
    .yvpd-info-qual {
        width: 32px !important; /* Original 42px. Lo bajamos para que quepan todos. */
    }
    
    div.video-js .vjs-control-bar .vjs-volume-panel {
        width: 32px !important;
    }
}

/* Modal "Bottom Sheet" (Menú App Móvil) */
.yvpd-modal-bottom-sheet { align-items: flex-end !important; }
.yvpd-modal-bottom-sheet .yvpd-modal-content { margin: 0 !important; border-radius: 20px 20px 0 0 !important; width: 100% !important; max-width: 100% !important; padding: 25px 20px 40px 20px !important; animation: vpdSlideUp 0.3s ease forwards; }

@keyframes vpdSlideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.yvpd-m-opt-row { margin-bottom: 20px; }
.yvpd-m-opt-row label { display: block; color: #aaa; font-size: 11px; font-weight: bold; margin-bottom: 10px; text-transform: uppercase; letter-spacing: 1px; }

.yvpd-m-speed-group { display: flex; gap: 10px; background: #000; padding: 5px; border-radius: 8px; border: 1px solid #333; }
.yvpd-m-speed-btn { flex: 1; background: transparent; color: #fff; border: none; padding: 12px 0; border-radius: 6px; font-weight: bold; font-size: 14px; cursor: pointer; transition: 0.2s; }
.yvpd-m-speed-btn.active { background: var(--yvpd-main-color, #00adef); color: #fff; }

.yvpd-m-action-btn { background: #222; border: 1px solid #333; color: #fff; border-radius: 8px; padding: 15px 10px; display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 14px; font-weight: bold; cursor: pointer; transition: 0.2s; }
.yvpd-m-action-btn:active { background: var(--yvpd-main-color, #00adef); }
.yvpd-m-action-btn .dashicons { font-size: 20px; color: var(--yvpd-main-color, #00adef); pointer-events:none; }
.yvpd-m-action-btn:active .dashicons { color: #fff; }


/* =========================================
   12. FIX: SETTINGS DE SUBTÍTULOS NATIVO (PC Y MÓVIL)
   ========================================= */

/* BASE (Todas las pantallas): Extraemos el modal para que no se corte por el video */
.video-js .vjs-text-track-settings {
    position: fixed !important;
    background: #1a1a1a !important;
    z-index: 999999 !important;
    box-shadow: 0 10px 50px rgba(0,0,0,0.8) !important;
    color: #fff !important;
}

/* Estilos internos limpios para todas las pantallas */
.video-js .vjs-text-track-settings .vjs-modal-dialog-content {
    padding: 20px !important;
    overflow-y: auto !important;
}

/* FIX PARA QUE LOS BOTONES REACCIONEN A CLIC Y TOQUE */
.video-js .vjs-text-track-settings .vjs-close-button {
    top: 10px !important;
    right: 10px !important;
    font-size: 24px !important;
    cursor: pointer !important;
    pointer-events: auto !important; 
}
.video-js .vjs-text-track-settings .vjs-close-button .vjs-icon-placeholder:before {
    pointer-events: auto !important;
}

.video-js .vjs-text-track-settings select {
    background: #000 !important;
    color: #fff !important;
    border: 1px solid #444 !important;
    padding: 8px !important;
    border-radius: 6px !important;
    font-size: 13px !important;
    width: 100% !important;
    margin-bottom: 10px !important;
}

.video-js .vjs-text-track-settings legend {
    color: var(--yvpd-main-color, #00adef) !important;
    font-weight: bold !important;
    margin-bottom: 5px !important;
    font-size: 12px !important;
    text-transform: uppercase !important;
}

.video-js .vjs-text-track-settings .vjs-tracksettings-controls {
    display: flex !important;
    gap: 15px !important;
    margin-top: 15px !important;
    border-top: 1px solid #333 !important;
    padding-top: 15px !important;
    justify-content: flex-end !important;
}

.video-js .vjs-text-track-settings .vjs-tracksettings-controls button {
    background: #444 !important;
    color: #fff !important;
    border-radius: 6px !important;
    padding: 10px 20px !important;
    font-weight: bold !important;
    border: none !important;
    font-size: 14px !important;
    cursor: pointer !important;
    pointer-events: auto !important; 
}

.video-js .vjs-text-track-settings .vjs-tracksettings-controls button:hover,
.video-js .vjs-text-track-settings .vjs-tracksettings-controls button:active {
    background: var(--yvpd-main-color, #00adef) !important;
}

/* --- PC: Modal Flotante y Centrado --- */
@media (min-width: 951px) {
    .video-js .vjs-text-track-settings {
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        width: 90% !important;
        max-width: 700px !important;
        height: auto !important;
        max-height: 90vh !important; /* Mide tu pantalla y no se sale */
        border-radius: 12px !important;
    }
    
    /* Distribuir en 2 columnas para no hacer scroll */
    .video-js .vjs-text-track-settings .vjs-tracksettings-colors,
    .video-js .vjs-text-track-settings .vjs-tracksettings-font {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 15px !important;
    }
    
    .video-js .vjs-text-track-settings fieldset {
        padding: 0 !important;
        margin: 0 !important;
    }
}

/* --- MÓVIL: Bottom Sheet --- */
@media (max-width: 950px) and (max-height: 500px), (max-width: 600px) {
    .video-js .vjs-text-track-settings {
        top: auto !important;
        bottom: 0 !important;
        left: 0 !important;
        width: 100vw !important;
        height: 85vh !important;
        border-radius: 20px 20px 0 0 !important;
        transform: none !important;
        animation: vpdSlideUp 0.3s ease forwards !important;
    }
    
    .video-js .vjs-text-track-settings .vjs-tracksettings-controls {
        flex-direction: column !important;
    }
    
    .video-js .vjs-text-track-settings .vjs-tracksettings-controls button {
        width: 100% !important;
        padding: 15px !important;
    }
}

/* =========================================
   13. FIX: CORRECCIÓN DE TOOLTIPS (TIEMPO Y VOLUMEN) 
   ========================================= */
.video-js .vjs-mouse-display .vjs-time-tooltip,
.video-js .vjs-play-progress .vjs-time-tooltip,
.video-js .vjs-volume-tooltip {
    display: inline-block !important;
    font-family: Arial, sans-serif !important;
    font-size: 11px !important;
    white-space: nowrap !important;
    word-wrap: normal !important;
    text-align: center !important;
    background: rgba(0, 0, 0, 0.8) !important;
    color: #fff !important;
    border-radius: 4px !important;
    padding: 4px 6px !important;
    line-height: 1 !important;
    width: auto !important;
    min-width: 40px !important;
}

/* Ajuste específico para que el porcentaje de volumen flote horizontalmente a la derecha */
.video-js .vjs-volume-bar.vjs-slider-vertical .vjs-volume-tooltip {
    left: 20px !important;
    right: auto !important;
    writing-mode: horizontal-tb !important;
    transform: translateY(-50%) !important;
    top: 50% !important;
}

/* Asegura que el tooltip de tiempo se muestre en móviles al tocar o arrastrar (.vjs-sliding) */
.video-js .vjs-progress-control:hover .vjs-mouse-display,
.video-js .vjs-progress-control:hover .vjs-time-tooltip,
.video-js .vjs-progress-control:active .vjs-mouse-display,
.video-js .vjs-progress-control:active .vjs-time-tooltip,
.video-js .vjs-progress-control.vjs-sliding .vjs-mouse-display,
.video-js .vjs-progress-control.vjs-sliding .vjs-time-tooltip,
.video-js .vjs-progress-control.vjs-sliding .vjs-play-progress .vjs-time-tooltip {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
}
/* =========================================
   14. PROTECCIÓN Y DISEÑO DE ANUNCIOS
   ========================================= */
/* Ocultar barra de controles cuando hay anuncio */
.video-js.yvpd-ad-is-playing .vjs-control-bar,
.video-js.yvpd-ad-is-playing .yvpd-upper-controls {
    display: none !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Evitar clics accidentales al video de fondo */
.video-js.yvpd-ad-is-playing .vjs-tech {
    pointer-events: none !important;
}

/* Botón de "Toca para escuchar" cuando el navegador bloquea el audio */
.yvpd-unmute-btn {
    position: absolute; top: 15px; left: 15px; background: rgba(0,0,0,0.8);
    color: #fff; padding: 8px 15px; border-radius: 6px; font-size: 13px;
    font-weight: bold; cursor: pointer; z-index: 2000; border: 1px solid #444;
    display: flex; align-items: center; gap: 8px; transition: 0.2s;
}
.yvpd-unmute-btn:hover { background: var(--yvpd-main-color, #00adef); border-color: #fff; }
/* =========================================
   15. HOVER PREVIEW (VISTA PREVIA AL PASAR MOUSE)
   ========================================= */
.video-js.yvpd-hover-previewing .vjs-big-play-button,
.video-js.yvpd-hover-previewing .vjs-control-bar,
.video-js.yvpd-hover-previewing .yvpd-upper-controls,
.video-js.yvpd-hover-previewing .yvpd-mobile-gear-btn {
    display: none !important;
    opacity: 0 !important;
    pointer-events: none !important;
}
.video-js.yvpd-hover-previewing {
    cursor: pointer !important;
}
/* =========================================
   16. AD INFO BOX & PROGRESS BAR (MEJORADO - DISEÑO FINAL)
   ========================================= */
.yvpd-ad-progress { position: absolute; bottom: 0; left: 0; width: 100%; height: 8px; background: rgba(255,255,255,0.3); z-index: 1005; pointer-events: none; }
.yvpd-ad-progress-fill { height: 100%; width: 0%; transition: width 0.25s linear; }

/* CONTENEDOR PRINCIPAL DEL BANNER */
.yvpd-ad-container.yvpd-ad-overlay-bottom { display: flex; justify-content: center; align-items: flex-end; bottom: 25px; width: 100%; position: absolute; z-index: 1000; pointer-events: none; }

/* WRAPPER (BANNERS) */
.yvpd-banner-wrapper { position: relative; display: inline-block; max-width: 80%; pointer-events: auto; }
.yvpd-banner-link { display: block; width: 100%; }
.yvpd-banner-link img { max-height: 130px !important; width: auto !important; max-width: 100%; display: block; box-shadow: 0 4px 15px rgba(0,0,0,0.6); border-radius: 4px; }
.yvpd-vast-placeholder { width: 100%; max-height: 130px; overflow: hidden; }

/* ETIQUETA "ANUNCIO" PARA BANNERS (Arriba a la derecha) */
.yvpd-banner-wrapper .yvpd-banner-label { position: absolute !important; bottom: 100% !important; right: 0 !important; margin-bottom: 8px !important; background: rgba(0,0,0,0.8); color: #fff; padding: 4px 8px; border-radius: 4px; font-size: 10px; font-weight: bold; text-transform: uppercase; letter-spacing: 1px; border: 1px solid rgba(255,255,255,0.2); white-space: nowrap; pointer-events: none; }

/* BOTÓN "X" O CONTEO (BANNERS: Lateral derecho por fuera) */
.yvpd-banner-wrapper .yvpd-ad-timer-x, .yvpd-banner-wrapper .yvpd-ad-skip { position: absolute !important; right: -45px !important; top: 50% !important; transform: translateY(-50%) !important; margin: 0 !important; z-index: 1020; }

/* BOTÓN DE SALTAR / CONTEO (VIDEOS PC: Abajo a la derecha) */
.yvpd-ad-container > .yvpd-ad-skip, .yvpd-ad-container > .yvpd-ad-timer-x { position: absolute; bottom: 20px; right: 15px; z-index: 1020; padding: 6px 12px; border-radius: 4px; font-size: 12px; cursor: pointer; border: 1px solid rgba(255,255,255,0.2); }

/* TARJETA DE INFORMACIÓN (DISEÑO GENERAL) */
a.yvpd-ad-info-box { position: absolute; z-index: 1005; display: flex; align-items: center; background: rgba(0,0,0,0.85); padding: 8px; border-radius: 8px; border: 1px solid #444; color: #fff !important; max-width: 320px; width: 90%; cursor: pointer; transition: 0.2s; font-family: sans-serif; box-shadow: 0 4px 15px rgba(0,0,0,0.5); text-decoration: none !important; pointer-events: auto; }
a.yvpd-ad-info-box:hover { background: rgba(0,0,0,0.95); border-color: #777; }

/* TARJETA DE INFO (VIDEOS PC): Elevada */
a.yvpd-ad-info-box:not(.yvpd-banner-info) { bottom: 65px; left: 15px; }

/* TARJETA DE INFO (BANNERS): Centrada arriba */
.yvpd-banner-wrapper a.yvpd-banner-info { bottom: 100% !important; top: auto !important; margin-bottom: 35px !important; left: 50% !important; transform: translateX(-50%) !important; width: max-content; min-width: 200px; }

/* Elementos Internos de la Tarjeta */
.yvpd-ad-logo { width: 35px; height: 35px; border-radius: 50%; object-fit: cover; margin-right: 10px; border: 1px solid #666; flex-shrink: 0; }
.yvpd-ad-texts { display: flex; flex-direction: column; margin-right: 10px; text-align: left; flex-grow: 1; overflow: hidden; }
.yvpd-ad-title { font-size: 13px; font-weight: bold; line-height: 1.2; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color:#fff;}
.yvpd-ad-desc { font-size: 11px; color: #ddd; margin-top: 2px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; text-overflow: ellipsis; word-wrap: break-word; white-space: normal; }
.yvpd-ad-url { font-size: 10px; font-weight: bold; color: var(--yvpd-main-color, #00adef); margin-top: 2px; }
.yvpd-ad-cta { color: #fff; border: none; padding: 6px 10px; flex-shrink: 0; border-radius: 4px; font-weight: bold; font-size: 11px; cursor: pointer; text-transform: uppercase; pointer-events: none; }

/* =========================================
   RESPONSIVIDAD (SMARTPHONES EXCLUSIVO)
   ========================================= */
@media (max-width: 600px), (max-height: 450px) {
    /* --- ESTILO NUEVO PARA VIDEOS EN MÓVIL --- */
    /* 1. Botón de Saltar/Contador: Arriba a la derecha */
    .yvpd-ad-container > .yvpd-ad-skip, .yvpd-ad-container > .yvpd-ad-timer-x { bottom: auto !important; top: 15px !important; right: 15px !important; }
    
    /* 2. Tarjeta de Video: Abajo al centro, sobre la barra de progreso */
    a.yvpd-ad-info-box:not(.yvpd-banner-info) { bottom: 12px !important; left: 50% !important; transform: translateX(-50%) !important; max-width: 95% !important; width: max-content !important; padding: 6px; flex-wrap: nowrap; }

    /* --- ESTILOS PARA BANNERS EN MÓVIL (Se mantienen igual) --- */
    .yvpd-ad-container.yvpd-ad-overlay-bottom { bottom: 0px !important; }
    .yvpd-banner-link img { border-radius: 4px 4px 0 0; }
    .yvpd-banner-wrapper a.yvpd-banner-info { margin-bottom: 28px !important; width: 90%; padding: 6px; flex-wrap: nowrap;}
    .yvpd-banner-wrapper .yvpd-ad-timer-x, .yvpd-banner-wrapper .yvpd-ad-skip { right: -10px !important; top: -10px !important; transform: none !important; }
    .yvpd-banner-wrapper .yvpd-banner-label { right: 18px !important; margin-bottom: 6px !important; }

    /* Ajustes generales de tamaño */
    .yvpd-ad-logo { width: 30px; height: 30px; }
    .yvpd-ad-title { font-size: 12px; }
    .yvpd-ad-desc { font-size: 10px; }
    .yvpd-ad-cta { padding: 5px 8px; font-size: 10px; }
}

/* =========================================
   17. CONTENEDOR DE ANUNCIOS
   ========================================= */
.yvpd-ad-container { z-index: 2147483647 !important; }
.yvpd-ad-container:not(.yvpd-ad-overlay-bottom) { position: absolute !important; top: 0 !important; left: 0 !important; width: 100% !important; height: 100% !important; background-color: #000 !important; }

/* =========================================
   18. RESCATE SUPREMO: PANTALLA COMPLETA
   ========================================= */
/* Obligamos a la barra a existir en Fullscreen por encima de cualquier regla de tu tema WP */
body .video-js.vjs-fullscreen .vjs-control-bar,
body .yvpd-player-wrapper .video-js.vjs-fullscreen .vjs-control-bar {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    background-color: rgba(0, 0, 0, 0.85) !important;
    z-index: 2147483647 !important;
    transform: translateZ(0) !important;
}

/* Obligamos a que TODOS los botones e íconos dentro de la barra sean BLANCOS y visibles */
body .video-js.vjs-fullscreen .vjs-control-bar * {
    color: #ffffff !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Efecto nativo: Ocultar la barra si el mouse no se mueve */
body .video-js.vjs-fullscreen.vjs-user-inactive .vjs-control-bar {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

/* =========================================
   19. RESCATE SUPREMO: SUBTÍTULOS INVISIBLES
   ========================================= */
/* Mostramos el botón oculto del menú */
body .video-js .vjs-texttrack-settings { display: block !important; }
body .video-js .vjs-texttrack-settings .vjs-menu-item-text { font-size: 0 !important; }
body .video-js .vjs-texttrack-settings .vjs-menu-item-text::after { 
    content: "Configuración Avanzada" !important; 
    font-size: 13px !important; 
    color: var(--yvpd-main-color, #00adef) !important;
    font-weight: bold !important; 
}

/* Pintamos la ventana de ajustes de NEGRO absoluto y letras BLANCAS para que no sea transparente */
body .video-js .vjs-text-track-settings:not(.vjs-hidden) {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    background-color: rgba(10, 10, 10, 0.98) !important;
    z-index: 2147483647 !important;
    pointer-events: auto !important;
}

/* Forzamos el color blanco en todos los textos de la ventana negra */
body .video-js .vjs-text-track-settings:not(.vjs-hidden) * {
    color: #ffffff !important;
}
/* =====================================================================
   21. CORRECCIONES DE DISEÑO FINALES (PULIDO VISUAL)
   ===================================================================== */

/* 1. FIX ENGRANE: Acomoda los textos dentro de los botones del menú */
/* Forzamos a que los botones usen Flexbox y calculen su altura automáticamente */
.yvpd-modal-content button,
.yvpd-modal-content li,
.vjs-menu-button-popup .vjs-menu .vjs-menu-content li {
    display: flex !important;
    align-items: center !important;
    line-height: normal !important;
    padding: 10px 15px !important;
    box-sizing: border-box !important;
    height: auto !important;
    min-height: 38px !important;
    white-space: normal !important;
}
/* 3. FIX TIKTOK: Barra de tiempo integrada y expansiva */
/* Quitamos la posición absoluta anterior y le decimos que empuje a los demás botones */
.yvpd-theme-tiktok .vjs-progress-control {
    position: relative !important;
    bottom: auto !important;
    left: auto !important;
    width: auto !important;
    flex: 1 1 auto !important; /* ESTA ES LA MAGIA: Obliga a la barra a crecer y empujar lo que tenga a la derecha */
    margin: 0 10px !important;
    display: flex !important;
    align-items: center !important;
}