/* Lupa para imagens do acervo — ver static/js/lupa.js */
.lupa-wrap { position: relative; display: block; width: fit-content; max-width: 100%; }
.lupa-wrap > img[data-lupa] { display: block; max-width: 100%; height: auto; cursor: zoom-in; }
.lupa-wrap > img[data-lupa]:focus-visible { outline: 3px solid #FFD700; outline-offset: 3px; }

.lupa-lente {
  display: none; position: absolute; z-index: 5; pointer-events: none;
  width: 220px; height: 220px; border-radius: 50%;
  border: 3px solid #fff; box-shadow: 0 0 0 2px #8B0000, 0 10px 28px rgba(0,0,0,.45);
  background-color: #fff; background-repeat: no-repeat;
}
.lupa-nivel {
  position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%);
  background: rgba(0,0,0,.65); color: #fff; font-size: 11px; font-weight: 600;
  padding: 1px 7px; border-radius: 10px;
}
.lupa-dica {
  position: absolute; left: 10px; bottom: 10px; z-index: 4; pointer-events: none;
  background: rgba(0,0,0,.62); color: #fff; font-size: .78rem; line-height: 1.2;
  padding: .3rem .6rem; border-radius: 20px; transition: opacity .2s;
}
.lupa-wrap.lupa-ativa .lupa-dica { opacity: 0; }

/* ── Visualizador em tela cheia ── */
html.lupa-sem-rolagem, html.lupa-sem-rolagem body { overflow: hidden; }
.lupa-visualizador {
  display: none; position: fixed; inset: 0; z-index: 2000;
  background: #0b0b0d; color: #fff; flex-direction: column;
}
.lupa-visualizador.aberto { display: flex; }
.lupa-barra {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .55rem .9rem; background: rgba(0,0,0,.55); border-bottom: 2px solid #8B0000;
}
.lupa-titulo { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.lupa-botoes { display: flex; align-items: center; gap: .35rem; flex: none; }
.lupa-botoes button {
  background: rgba(255,255,255,.12); color: #fff; border: 0; border-radius: 6px;
  min-width: 38px; height: 38px; padding: 0 .6rem; font-size: 1.05rem; font-weight: 600; line-height: 1; cursor: pointer;
}
.lupa-botoes button:hover, .lupa-botoes button:focus-visible { background: #8B0000; outline: none; }
.lupa-fechar { margin-left: .4rem; }
.lupa-percentual { min-width: 52px; text-align: center; font-size: .85rem; font-variant-numeric: tabular-nums; }
.lupa-palco { position: relative; flex: 1; overflow: hidden; touch-action: none; cursor: grab; }
.lupa-palco.arrastando { cursor: grabbing; }
.lupa-palco img {
  position: absolute; left: 0; top: 0; max-width: none; transform-origin: 0 0;
  user-select: none; -webkit-user-drag: none; image-rendering: auto;
}
.lupa-carregando { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #bbb; }
.lupa-ajuda { text-align: center; font-size: .78rem; color: #aaa; padding: .4rem; }
@media (max-width: 575.98px) {
  .lupa-titulo { display: none; }
  .lupa-barra { justify-content: center; }
  .lupa-botoes button[data-acao="original"] { display: none; }
}
