/**
 * GARAPP - Estilos de Protección para Manual v3.0
 * @author Gadesplant
 */

/* Desactivar selección global */
* {
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    user-select: none !important;
    -webkit-touch-callout: none !important;
    -webkit-tap-highlight-color: transparent !important;
}

/* Permitir en inputs */
input, textarea, [contenteditable="true"], .editable, .allow-select {
    -webkit-user-select: text !important;
    -moz-user-select: text !important;
    user-select: text !important;
}

/* Protección de imágenes */
img {
    pointer-events: none !important;
    -webkit-user-drag: none !important;
    user-drag: none !important;
    -webkit-touch-callout: none !important;
}

a img, button img, .btn img, .clickable img, [role="button"] img {
    pointer-events: auto !important;
}

/* Contenedor protector */
.img-protected, .contenedor-imagen {
    position: relative;
    display: inline-block;
}

.img-protected::after, .contenedor-imagen::after {
    content: "";
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 1;
    background: transparent;
}

/* Marca de agua sutil */
body::after {
    content: "© GARAPP - Manual de Usuario";
    position: fixed;
    bottom: 5px; right: 5px;
    font-size: 8px;
    color: rgba(0, 0, 0, 0.04);
    pointer-events: none;
    z-index: 9999;
    font-family: Inter, Arial, sans-serif;
    user-select: none;
}

body::before {
    content: "GARAPP";
    position: fixed;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%) rotate(-45deg);
    font-size: 120px;
    color: rgba(0, 0, 0, 0.015);
    pointer-events: none;
    z-index: -1;
    font-weight: bold;
    font-family: Inter, Arial, sans-serif;
    user-select: none;
}

/* Bloqueo de impresión */
@media print {
    html, body, body * {
        display: none !important;
        visibility: hidden !important;
    }
    html::before {
        content: "© GARAPP - Manual protegido - Impresión no autorizada" !important;
        display: block !important;
        visibility: visible !important;
        font-size: 28px;
        text-align: center;
        padding: 100px 40px;
        color: #1a1a2e;
    }
}

/* Desactivar selección visual */
::selection { background-color: transparent !important; }
::-moz-selection { background-color: transparent !important; }

/* Desactivar arrastre */
* {
    -webkit-user-drag: none !important;
    user-drag: none !important;
}

/* Prevenir zoom móviles */
html {
    -webkit-text-size-adjust: 100%;
    touch-action: manipulation;
}

/* Protección body */
body {
    -webkit-user-modify: read-only !important;
    transition: filter 0.3s ease;
}

/* Animaciones de seguridad */
@keyframes antiScreenshot {
    0%, 100% { filter: blur(0px); }
    50% { filter: blur(15px); }
}

body.screenshot-detected {
    animation: antiScreenshot 0.5s ease;
}

/* Elementos interactivos */
button, .btn, a.btn, [role="button"], .nav-link, .accordion-header {
    pointer-events: auto !important;
    cursor: pointer;
}

/* Protección de código y tablas */
pre, code, table, th, td {
    -webkit-user-select: none !important;
    user-select: none !important;
}

/* Desactivar outline */
*:focus:not(input):not(textarea):not(button):not(a):not(select) {
    outline: none !important;
}
