/**
 * Smart Catering Child — Image lightbox (paired with assets/js/lightbox.js).
 * Unlayered + scoped to body.scc-fase0 to win the cascade like other components.
 *
 * @package SmartCateringChild
 */

/* Zoomable gallery images hint they are interactive. */
body.scc-fase0 .scc-zoomable {
  cursor: zoom-in;
}
body.scc-fase0 .scc-zoomable:focus-visible {
  outline: 2px solid var(--color-gold, #d99e39);
  outline-offset: 3px;
}

body.scc-fase0.scc-lightbox-open {
  overflow: hidden;
}

.scc-lightbox {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.92);
  opacity: 0;
  transition: opacity 200ms ease;
  padding: clamp(1rem, 4vw, 3rem);
}
.scc-lightbox.is-open {
  display: flex;
  opacity: 1;
}

.scc-lightbox__stage {
  margin: 0;
  max-width: 92vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}
.scc-lightbox__img {
  max-width: 92vw;
  max-height: 80vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}
.scc-lightbox__cap {
  color: #fff;
  font-size: clamp(0.85rem, 1.6vw, 1rem);
  text-align: center;
  max-width: 60ch;
  letter-spacing: 0.01em;
}

.scc-lightbox__close,
.scc-lightbox__nav {
  position: absolute;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  cursor: pointer;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 150ms ease;
}
.scc-lightbox__close:hover,
.scc-lightbox__nav:hover {
  background: rgba(255, 255, 255, 0.2);
}
.scc-lightbox__close {
  top: clamp(0.75rem, 2vw, 1.5rem);
  right: clamp(0.75rem, 2vw, 1.5rem);
  width: 44px;
  height: 44px;
  font-size: 1.75rem;
  line-height: 1;
}
.scc-lightbox__nav {
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  font-size: 2rem;
  line-height: 1;
}
.scc-lightbox__prev { left: clamp(0.5rem, 2vw, 1.5rem); }
.scc-lightbox__next { right: clamp(0.5rem, 2vw, 1.5rem); }

@media (prefers-reduced-motion: reduce) {
  .scc-lightbox { transition: none; }
}
