/* Lightbox styles */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.9);
  display: none;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  z-index: 20000;
}

.lightbox.active {
  display: flex;
}

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

.lightbox-image {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: -40px;
  right: -40px;
  width: 30px;
  height: 30px;
  background: none;
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 100%;
  display: flex;
  justify-content: space-between;
  padding: 0 20px;
  box-sizing: border-box;
}

.lightbox-nav button {
  background: none;
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
  padding: 10px;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.lightbox-nav button:hover {
  opacity: 1;
}

.lightbox-counter {
  position: absolute;
  bottom: -30px;
  left: 50%;
  transform: translateX(-50%);
  color: white;
  font-size: 14px;
}

@media (max-width: 768px) {
  .lightbox-content {
    max-width: 100vw;
    max-height: 86vh;
  }

  .lightbox-image {
    max-height: 82vh;
  }

  .lightbox-nav {
    top: auto;
    bottom: max(22px, env(safe-area-inset-bottom));
    transform: none;
    padding: 0 18px;
  }

  .lightbox-nav button {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.46);
    font-size: 28px;
    opacity: 0.9;
  }

  .lightbox-counter {
    bottom: max(-28px, calc(env(safe-area-inset-bottom) - 18px));
  }
}
