/* lightbox.css — Diaforos */

.cgpt-lightbox {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: none;
}

.cgpt-lightbox.is-open {
  display: block;
}

.cgpt-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
}

.cgpt-lightbox__panel {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}

.cgpt-lightbox__figure {
  margin: 0;
  max-width: min(92vw, 1200px);
  max-height: 86vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.cgpt-lightbox__img {
  max-width: 100%;
  max-height: 76vh;
  width: auto;
  height: auto;
  display: block;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
  background: rgba(255,255,255,.02);
}

.cgpt-lightbox__caption {
  margin-top: 0.75rem;
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  max-width: 100%;
  background: rgba(0,0,0,.45);
  color: #fff;
  font-size: 0.95rem;
  line-height: 1.45;
  text-align: center;
}

.cgpt-lightbox__close {
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  background: rgba(0,0,0,.55);
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
}

.cgpt-lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  background: rgba(0,0,0,.55);
  color: #fff;
  font-size: 2rem;
  line-height: 1;
}

.cgpt-lightbox__prev { left: 0.9rem; }
.cgpt-lightbox__next { right: 0.9rem; }

.cgpt-lightbox__close:focus-visible,
.cgpt-lightbox__nav:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

@media (max-width: 48rem) {
  .cgpt-lightbox__panel { padding: 0.85rem; }
  .cgpt-lightbox__figure { max-height: 88vh; }
  .cgpt-lightbox__img { max-height: 74vh; }
  .cgpt-lightbox__caption { font-size: 0.9rem; }
  .cgpt-lightbox__nav { width: 40px; height: 40px; }
}

/* Optional: smoother click affordance on content images */
.article__text img[data-cgpt-lb="1"],
.textPart img[data-cgpt-lb="1"],
.part__of__text img[data-cgpt-lb="1"] {
  transition: transform 120ms ease;
}

.article__text img[data-cgpt-lb="1"]:hover,
.textPart img[data-cgpt-lb="1"]:hover,
.part__of__text img[data-cgpt-lb="1"]:hover {
  transform: scale(1.01);
}
