/* Visor de documentos (PDF convertidos a imagenes) con efecto de libro (turn.js). */

.visor {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.libro {
  transition: transform 0.2s ease-out; /* suaviza el zoom */
}

.libro .pagina {
  background-color: var(--color-fondo);
}

.libro img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

/* Botones flotantes */
.boton-cerrar,
.boton-restablecer {
  position: fixed;
  right: 20px;
  z-index: 100;
  width: 52px;
  height: 52px;
  padding: 13px;
}

.boton-cerrar {
  top: 20px;
  color: var(--color-icono);
}

.boton-restablecer {
  bottom: 20px;
  color: var(--color-icono-suave);
}

/* Mano que indica "toca para avanzar"; se oculta al pasar la primera pagina */
.indicacion-tocar {
  position: fixed;
  top: 50%;
  right: 40px;
  z-index: 50;
  width: 72px;
  height: 72px;
  color: var(--color-texto-suave);
  transform: translateY(-50%);
  pointer-events: none;
  animation: parpadeo 1.5s infinite;
}

.indicacion-tocar.oculta {
  display: none;
}

@keyframes parpadeo {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* Estado "sin imagenes todavia" */
.documento-vacio {
  display: none;
}

.sin-paginas .documento-vacio {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.sin-paginas .indicacion-tocar,
.sin-paginas .boton-restablecer {
  display: none;
}

.documento-vacio-icono {
  width: 96px;
  height: 96px;
  color: var(--color-texto-suave);
}

.documento-vacio-titulo {
  margin: 20px 0 0;
  font-size: 2em;
  font-weight: bold;
  color: var(--color-texto);
}

.documento-vacio-texto {
  margin: 8px 0 0;
  font-size: 1.3em;
  color: var(--color-texto-suave);
}
