/* ═══════════════════════════════════════════════════════════════
 * EIR DR. · protection_layer.css
 * Protección de IP — anti-copy / anti-print / anti-selección.
 *
 * Activación: body[data-protection="strict"]
 *
 * NO bloquea inputs / textareas (el usuario sí debe poder escribir
 * y pegar su consulta). Bloquea selección de todo lo demás.
 *
 * Aplica a:
 *  - /cuidado (Atelier público)
 *  - /academy y /academy/<sp>/<slug> (contenido editorial curado)
 *
 * NO aplica a:
 *  - / (Cowork profesional) — el odontólogo necesita copiar dictámenes.
 *
 * Toast informativo cuando alguien intenta seleccionar o imprimir.
 * ═══════════════════════════════════════════════════════════════ */

body[data-protection="strict"] {
    /* selección bloqueada por default */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Excepciones: inputs y textareas SÍ se pueden manipular */
body[data-protection="strict"] input,
body[data-protection="strict"] textarea,
body[data-protection="strict"] [contenteditable="true"] {
    -webkit-user-select: text !important;
    user-select: text !important;
}

/* Sin highlight al double-click */
body[data-protection="strict"] *::selection {
    background: transparent;
    color: inherit;
}
body[data-protection="strict"] *::-moz-selection {
    background: transparent;
    color: inherit;
}

/* Bloqueo de drag de imágenes */
body[data-protection="strict"] img,
body[data-protection="strict"] svg {
    -webkit-user-drag: none;
    user-drag: none;
    pointer-events: auto; /* clicks sí, drag no */
}

/* ─── Print stylesheet — bloquea impresión ─────────────────── */
@media print {
    body[data-protection="strict"] {
        display: none !important;
    }
    body[data-protection="strict"]::before {
        content: "Este contenido está protegido. Para acceso editorial, escribe a davidurrest@gmail.com.";
        display: block !important;
        font-family: Georgia, serif;
        font-size: 18px;
        padding: 100px 40px;
        text-align: center;
        color: #444;
    }
}

/* ─── Toast informativo (cuando intentan acciones bloqueadas) ── */
.protection-toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    z-index: 80;
    background: rgba(8, 12, 24, 0.95);
    border: 1px solid rgba(245, 158, 11, 0.35);
    border-radius: 999px;
    padding: 10px 18px;
    color: #fbbf24;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.05em;
    opacity: 0;
    pointer-events: none;
    transition: all .3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(12px);
    box-shadow: 0 14px 40px -12px rgba(0, 0, 0, 0.5);
}
.protection-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: all;
}
.protection-toast .icon {
    margin-right: 8px;
    color: #fbbf24;
}
