/* Capturas do sistema que abrem ampliadas ao clique. */
.pp-shot,
.home-shot {
  position: relative;
}

.pp-shot img,
.home-shot img {
  cursor: zoom-in;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.pp-shot img:hover,
.home-shot img:hover,
.pp-shot img:focus-visible,
.home-shot img:focus-visible {
  transform: translateY(-2px);
}

.pp-shot img:focus-visible,
.home-shot img:focus-visible {
  outline: 3px solid #2563eb;
  outline-offset: 3px;
}

.tela-ampliar {
  position: absolute;
  top: 12px;
  right: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 11px;
  border: 1px solid #d7e1ec;
  border-radius: 999px;
  background: #ffffffec;
  color: #24405f;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.01em;
  pointer-events: none;
  opacity: 0.82;
  transition: opacity 0.2s ease;
}

.pp-shot:hover .tela-ampliar,
.home-shot:hover .tela-ampliar {
  opacity: 1;
}

.tela-lightbox {
  /* O reset do Tailwind zera a margem de todos os elementos, o que tira a
     centralização padrão do dialog modal. Por isso ela é redeclarada aqui. */
  position: fixed;
  inset: 0;
  margin: auto;
  width: min(96vw, 1600px);
  max-width: 96vw;
  height: fit-content;
  max-height: calc(100vh - 2rem);
  padding: 0;
  border: 0;
  border-radius: 18px;
  background: transparent;
  overflow: visible;
}

.tela-lightbox::backdrop {
  background: #06101ed9;
}

.tela-lightbox-figura {
  margin: 0;
  padding: 14px;
  border-radius: 18px;
  background: #0b1b30;
  box-shadow: 0 40px 90px -40px #000c;
}

.tela-lightbox-figura img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 78vh;
  object-fit: contain;
  border-radius: 10px;
  background: #fff;
}

.tela-lightbox-figura figcaption {
  margin-top: 12px;
  padding: 0 4px 4px;
  font-size: 12px;
  line-height: 1.7;
  color: #a8bdd6;
}

.tela-lightbox-fechar {
  position: fixed;
  top: 22px;
  right: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid #2a4260;
  border-radius: 999px;
  background: #0b1b30e6;
  color: #eaf1fa;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.tela-lightbox-fechar:hover {
  background: #14304f;
}

.tela-lightbox-fechar:focus-visible {
  outline: 3px solid #60a5fa;
  outline-offset: 2px;
}

@media (max-width: 640px) {
  .tela-ampliar {
    top: 8px;
    right: 8px;
    padding: 5px 9px;
    font-size: 10px;
  }

  .tela-lightbox-fechar {
    top: 14px;
    right: 14px;
    width: 36px;
    height: 36px;
  }

  /* Em telas estreitas a captura fica minúscula se couber na largura.
     Ela é ampliada e a figura passa a rolar na horizontal. */
  .tela-lightbox-figura {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .tela-lightbox-figura img {
    width: auto;
    max-width: none;
    height: 62vh;
    max-height: 62vh;
  }

  .tela-lightbox-figura figcaption {
    position: sticky;
    left: 0;
    max-width: 88vw;
  }
}

@media print {
  .tela-ampliar {
    display: none;
  }
}
