/* Lightbox Component */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  background-color: rgba(0, 0, 0, 0.9);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease-out, visibility 0.2s ease-out;
  cursor: zoom-out;
  width: 100vw;
  height: 100svh;
}

.lightbox.show {
  opacity: 1;
  visibility: visible;
}

.lightbox__close {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 51;
}

.lightbox__content {
  display: flex;
  justify-content: center;
  align-items: center;
  position: absolute;
  inset: 0;
  padding: 1rem;
}

.lightbox--gallery .lightbox__content {
  padding: 1rem 4.5rem;
}

.lightbox__content img {
  width: auto;
  max-height: 100%;
  max-width: 100%;
  transform: scale(0.95);
  transition: transform 0.3s ease-out, opacity 0.15s ease-out;
}

.lightbox.show .lightbox__content img {
  transform: scale(1);
}

/* Nav buttons — hidden unless gallery mode */
.lightbox .lightbox__nav {
  display: none;
  position: fixed;
  top: 50%;
  translate: 0 -50%;
  z-index: 51;
}

.lightbox.lightbox--gallery .lightbox__nav {
  display: inline-flex;
}

.lightbox__nav--prev {
  left: 1rem;
}

.lightbox__nav--next {
  right: 1rem;
}

@media (max-width: 768px) {
  .lightbox.lightbox--gallery .lightbox__nav {
    display: none;
  }

  .lightbox--gallery .lightbox__content {
    padding: 1rem;
  }
}

/* Lightbox buttons */
.lightbox button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  transition: background-color 0.2s ease-out, border-color 0.2s ease-out;
}

.lightbox button:hover {
  background-color: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
}
