/* Popup de imagem dos posts (assets/js/image-lightbox.js).
   O fundo é escuro nos dois temas, então os controles usam branco fixo. */

.ot-lightbox-trigger {
  cursor: zoom-in;
}

html.ot-lightbox-open,
html.ot-lightbox-open body {
  overflow: hidden;
}

.ot-lightbox {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 56px 16px;
  background: rgba(3, 12, 20, 0.92);
  animation: otLightboxIn 0.2s ease;
}

.ot-lightbox[hidden] {
  display: none;
}

.ot-lightbox-figure {
  margin: 0;
  max-width: 100%;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  cursor: zoom-out;
}

.ot-lightbox-img {
  max-width: min(1200px, 100%);
  max-height: calc(100vh - 140px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  cursor: default;
}

.ot-lightbox-caption {
  color: rgba(255, 255, 255, 0.85);
  font-size: 14px;
  text-align: center;
  max-width: 60ch;
}

.ot-lightbox-caption:empty {
  display: none;
}

.ot-lightbox-close,
.ot-lightbox-nav {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  transition: background-color 0.2s ease;
}

/* O Neve pinta `button`/`button:hover/:focus` com fundo e borda próprios — anula aqui. */
.ot-lightbox .ot-lightbox-close,
.ot-lightbox .ot-lightbox-nav {
  background: rgba(255, 255, 255, 0.12) !important;
  color: #fff !important;
  border: 0 !important;
  box-shadow: none !important;
  outline: none;
}

.ot-lightbox .ot-lightbox-close:hover,
.ot-lightbox .ot-lightbox-nav:hover,
.ot-lightbox .ot-lightbox-close:focus-visible,
.ot-lightbox .ot-lightbox-nav:focus-visible {
  background: rgba(255, 255, 255, 0.24) !important;
}

.ot-lightbox .ot-lightbox-close:focus-visible,
.ot-lightbox .ot-lightbox-nav:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.7);
  outline-offset: 2px;
}

.ot-lightbox-close {
  top: 14px;
  right: 14px;
  width: 44px;
  height: 44px;
  font-size: 30px;
}

.ot-lightbox-nav {
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  font-size: 34px;
}

.ot-lightbox-nav.is-prev { left: 16px; }
.ot-lightbox-nav.is-next { right: 16px; }

.ot-lightbox.is-single .ot-lightbox-nav {
  display: none;
}

/* No celular, as setas descem pro rodapé pra não cobrir a imagem. */
@media (max-width: 768px) {
  .ot-lightbox-nav {
    top: auto;
    bottom: 16px;
    transform: none;
  }
  .ot-lightbox-img {
    max-height: calc(100vh - 160px);
  }
}

@keyframes otLightboxIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
