/* =========================
   GALLERY LIGHTBOX
========================= */

/* Cell becomes interactive once JS wires it up */
.mc-lb-ready .mc-shuffle-gallery__cell {
  cursor: zoom-in;
}

.mc-lb-ready .mc-shuffle-gallery__cell:focus-visible {
  outline: 3px solid var(--mc-green);
  outline-offset: -3px;
}

/* Body lock — prevent scroll while lightbox is open */
.mc-lb-body-lock {
  overflow: hidden;
}

/* Lightbox root — hidden by default */
.mc-lb {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9000;
}

.mc-lb--open {
  display: block;
}

.mc-lb__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  cursor: pointer;
  animation: mc-lb-fade-in 220ms ease forwards;
}

.mc-lb__inner {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem 1rem;
  pointer-events: none;
}

.mc-lb__image {
  position: relative;
  z-index: 1;
  display: block;
  max-width: min(92vw, 1200px);
  max-height: 86vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--mc-radius-card);
  pointer-events: auto;
  animation: mc-lb-scale-in 260ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* Close button */
.mc-lb__close {
  position: fixed;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 9001;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: var(--mc-radius-btn);
  background: rgba(255, 255, 255, 0.12);
  color: var(--mc-white);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  transition: background 180ms ease;
  pointer-events: auto;
}

.mc-lb__close:hover,
.mc-lb__close:focus-visible {
  background: rgba(255, 255, 255, 0.22);
  outline: 2px solid var(--mc-green);
  outline-offset: 2px;
}

/* Prev / next nav */
.mc-lb__nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 9001;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 72px;
  border: none;
  border-radius: var(--mc-radius-btn);
  background: rgba(255, 255, 255, 0.10);
  color: var(--mc-white);
  font-size: 2.2rem;
  line-height: 1;
  cursor: pointer;
  transition: background 180ms ease;
  pointer-events: auto;
}

.mc-lb__nav:hover,
.mc-lb__nav:focus-visible {
  background: rgba(255, 255, 255, 0.22);
  outline: 2px solid var(--mc-green);
  outline-offset: 2px;
}

.mc-lb__nav--prev { left: 1rem; }
.mc-lb__nav--next { right: 1rem; }

/* Animations */
@keyframes mc-lb-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes mc-lb-scale-in {
  from { opacity: 0; transform: scale(0.94); }
  to   { opacity: 1; transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .mc-lb__overlay,
  .mc-lb__image {
    animation: none;
  }
}

@media (max-width: 600px) {
  .mc-lb__nav {
    width: 40px;
    height: 56px;
    font-size: 1.6rem;
  }
}
