/**
 * AIPCM Content Protector - Estilos
 * Protege contra selección, arrastre y mejora la visualización del watermark
 */

/* Prevenir selección de texto en contenido protegido */
.aipcm-tutorial-player-content,
.aipcm-video-container,
.aipcm-tp-video-container,
.aipcm-tp-sidebar,
.aipcm-tp-content-header {
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    user-select: none !important;
    
    -webkit-user-drag: none !important;
    user-drag: none !important;
}

/* Contenedor de video protegido */
.aipcm-video-protected {
    position: relative !important;
}

.aipcm-video-protected::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 5;
    pointer-events: none;
    background: transparent;
}

/* Overlay de protección para iframes */
.aipcm-video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10;
    pointer-events: none;
}

/* Estilos del watermark */
.aipcm-watermark-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 10;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    opacity: 0.12;
}

.aipcm-watermark-overlay div {
    font-size: 16px;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.6);
    padding: 10px 20px;
    transform: rotate(-30deg);
    margin: 25px;
    white-space: nowrap;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Notificaciones */
.aipcm-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #e74c3c;
    color: #fff;
    padding: 15px 25px;
    border-radius: 8px;
    z-index: 999999;
    font-family: system-ui, -apple-system, sans-serif;
    font-size: 14px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    animation: aipcm-slide-in 0.3s ease;
    max-width: 300px;
}

@keyframes aipcm-slide-in {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Ocultar elementos de descarga en videos */
video::-webkit-media-controls {
    display: none !important;
}

video::-webkit-media-controls-enclosure {
    display: none !important;
}

/* Prevenir mostrar controls en hover */
.aipcm-video-container:hover video::-webkit-media-controls,
.aipcm-tp-video-container:hover video::-webkit-media-controls {
    display: none !important;
}

/* Estilos para el reproductor */
.aipcm-tp-video-container {
    position: relative !important;
    overflow: hidden;
}

.aipcm-tp-video-container video {
    pointer-events: none !important;
}

/* Protección adicional - hacer el contenido no editable */
[contenteditable="true"] {
    pointer-events: none !important;
}

/* Prevenir impresión */
@media print {
    .aipcm-tutorial-player-content,
    .aipcm-video-container,
    .aipcm-tp-video-container {
        display: none !important;
    }
}

/* Estilos responsivos */
@media (max-width: 768px) {
    .aipcm-watermark-overlay div {
        font-size: 12px;
        padding: 6px 12px;
        margin: 15px;
    }
    
    .aipcm-notification {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
}

/* Animación de watermark sutil */
@keyframes aipcm-watermark-pulse {
    0%, 100% {
        opacity: 0.12;
    }
    50% {
        opacity: 0.18;
    }
}

.aipcm-watermark-overlay {
    animation: aipcm-watermark-pulse 4s ease-in-out infinite;
}

/* Indicador visual de protección */
.aipcm-protected-indicator {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(30, 173, 166, 0.9);
    color: #fff;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    z-index: 20;
    pointer-events: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Prevenir zoom en móvil */
@viewport {
    zoom: 1.0;
    max-zoom: 1.0;
    min-zoom: 1.0;
}

/* Touch-action para prevenir gestos */
.aipcm-tutorial-player-content,
.aipcm-video-container {
    touch-action: manipulation;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
}

/* Estilos para inputs (permitir edición solo en inputs) */
input, textarea, select, [contenteditable="true"] {
    -webkit-user-select: text !important;
    -moz-user-select: text !important;
    -ms-user-select: text !important;
    user-select: text !important;
}
