/* Visor de imágenes insertadas en los comentarios (js/visor-imagenes.js) */

.mensaje-cuerpo img {
    cursor: zoom-in;
    transition: box-shadow 0.15s;
}

.mensaje-cuerpo img:hover {
    box-shadow: 0 0 0 3px var(--marca-claro), 0 2px 10px rgba(5, 45, 86, 0.18);
}

body.visor-abierto {
    overflow: hidden;
}

.visor-imagen {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: none;
    flex-direction: column;
    background: rgba(5, 20, 38, 0.92);
    font-family: 'Inter', 'Segoe UI', sans-serif;
}

.visor-imagen.abierto {
    display: flex;
    animation: visor-aparecer 0.15s ease-out;
}

@keyframes visor-aparecer {
    from { opacity: 0; }
    to { opacity: 1; }
}

.visor-barra {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.6rem;
}

.visor-barra button {
    width: 2.25rem;
    height: 2.25rem;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background 0.15s;
}

.visor-barra button:hover,
.visor-barra button:focus-visible {
    background: rgba(255, 255, 255, 0.26);
    outline: none;
}

.visor-barra button[data-accion="cerrar"]:hover {
    background: #C0392B;
}

.visor-texto {
    font-size: 0.75rem;
    font-weight: 700;
}

.visor-zoom {
    min-width: 3.4rem;
    color: #fff;
    font-size: 0.8rem;
    font-weight: 600;
    text-align: center;
}

.visor-separador {
    width: 1px;
    height: 1.4rem;
    margin: 0 0.3rem;
    background: rgba(255, 255, 255, 0.25);
}

.visor-lienzo {
    position: relative;
    flex: 1;
    overflow: hidden;
    touch-action: none;
}

.visor-lienzo img {
    position: absolute;
    left: 50%;
    top: 50%;
    max-width: none;
    border-radius: 4px;
    /* Fondo blanco para que las imágenes con transparencia se lean igual que en el comentario */
    background: #fff;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.45);
    cursor: grab;
    user-select: none;
}

.visor-lienzo.arrastrando img {
    cursor: grabbing;
}

.visor-ayuda {
    padding: 0.4rem 0.6rem 0.7rem;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.75rem;
    text-align: center;
}

@media (max-width: 576px) {
    .visor-ayuda {
        display: none;
    }
}
