/* Global preview helper styles for GLightbox-hosted previews. */
.glightbox-clean .gdesc-inner {
  font-size: 0.85rem;
}

/* Keep document and image previews inside the viewport on every screen. */
.glightbox-container .gslide,
.glightbox-container .gslide-inner-content,
.glightbox-container .ginner-container {
  max-width: 100vw;
  max-height: 100vh;
}

.glightbox-container .gslide-image {
  box-sizing: border-box;
  max-width: calc(100vw - 5rem);
  max-height: calc(100vh - 3rem);
  overflow: hidden;
}

.glightbox-container .gslide-image img {
  width: auto !important;
  height: auto !important;
  max-width: calc(100vw - 5rem) !important;
  max-height: calc(100vh - 3rem) !important;
  object-fit: contain;
}

.glightbox-container .gslide-external {
  box-sizing: border-box;
  width: calc(100vw - 5rem);
  height: calc(100vh - 3rem);
  min-width: 0;
  max-width: calc(100vw - 5rem);
  max-height: calc(100vh - 3rem);
  overflow: hidden;
}

.glightbox-container .gslide-external iframe {
  width: 100%;
  height: 100%;
  border: 0;
  max-width: 100%;
  max-height: 100%;
}

@media (max-width: 768px) {
  .glightbox-container .gslide-image,
  .glightbox-container .gslide-external {
    width: calc(100vw - 2rem) !important;
    height: calc(100vh - 2rem) !important;
    max-width: calc(100vw - 2rem) !important;
    max-height: calc(100vh - 2rem) !important;
  }

  .glightbox-container .gslide-image img {
    max-width: calc(100vw - 2rem) !important;
    max-height: calc(100vh - 2rem) !important;
  }
}

.sp-preview-inline {
  width: 92vw;
  max-width: 1200px;
  height: 92vh;
  background: #111827;
  border-radius: 10px;
  overflow: hidden;
}

.sp-preview-frame {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: #ffffff;
}
