/* Shared full-size photo lightbox. */

/* Lightbox: a single instance shared by every gallery (the comida marquee
   and every carousel), living outside any .screen (like .color-wipe) and
   positioned fixed so it covers the viewport no matter which screen is
   active - the marquee tracks keep their own animations running underneath
   (nothing pauses), this is just an overlay on top showing whichever photo
   was tapped, at its natural aspect ratio. */
.lightbox {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.75);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
  /* Explicit so it always sits above .stage (and the comida drawer within
     it) regardless of DOM order - a photo open should cover everything. */
  z-index: 10;
}

.lightbox.visible {
  opacity: 1;
  pointer-events: auto;
}

.lightbox__frame {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
}

.lightbox__img {
  display: block;
  max-width: 90vw;
  max-height: 90vh;
  border: 6px solid #ffffff;
  border-radius: 4px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}

.lightbox__close {
  position: absolute;
  /* A transform (even a transient one, like the img's grow-in animation)
     makes the browser paint that element as though it had z-index:0, which
     is enough to land it above an absolutely-positioned sibling that has no
     z-index of its own - hence the close button briefly sinking behind the
     photo mid-animation. An explicit z-index here keeps it on top always. */
  z-index: 1;
  top: -1.2rem;
  left: -1.2rem;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  border: none;
  background: #ffffff;
  color: #000000;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}
