/* Plugin copy: Simple lightbox styles for course images */
.fgt-lightbox-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
}
.fgt-lightbox-viewport {
  position: relative;
  /* Use viewport-based sizing to avoid inheritance/transform issues from ancestors */
  width: calc(100vw - 40px);
  height: calc(100vh - 40px);
  max-width: calc(100vw - 40px);
  max-height: calc(100vh - 40px);
  overflow: hidden;
  cursor: grab;
}
.fgt-lightbox-image {
  display: block;
  /* Force image to never exceed viewport - use viewport units to be safe */
  max-width: 100vw;
  max-height: 100vh;
  width: auto;
  height: auto;
  transform-origin: center center;
  will-change: transform;
  user-select: none;
  -webkit-user-drag: none;
}
.fgt-lightbox-close,
.fgt-lightbox-zoom {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(255,255,255,0.08);
  color: #fff;
  border: 0;
  padding: 8px 10px;
  cursor: pointer;
  font-size: 14px;
  border-radius: 4px;
}
.fgt-lightbox-overlay { touch-action: none; }
.fgt-lightbox-zoom-group { position: absolute; top: 12px; left: 12px; display:flex; gap:6px; }
.fgt-lightbox-zoom { background: rgba(255,255,255,0.08); color:#fff; border-radius:4px; padding:8px; }
.fgt-lightbox-controls button { background: rgba(0,0,0,0.4); color:#fff; border:0; padding:6px 8px; border-radius:4px; }

/* Focus outlines for accessibility */
.fgt-lightbox-close:focus, .fgt-lightbox-zoom:focus {
  outline: 3px solid rgba(255,255,255,0.9);
  outline-offset: 2px;
}

/* Make sure overlay content scales on smaller screens */
@media (max-width: 600px) {
  .fgt-lightbox-viewport { max-width: 100%; max-height: 100%; }
}
