/* Lightbox styles */
.lightbox {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  cursor: pointer;
  overflow: auto;
}

.lightbox-content {
  position: relative;
  margin: 0;
  display: block;
  cursor: default;
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 60px 20px 40px 20px;
  box-sizing: border-box;
}

.lightbox-image {
  width: calc(100% - 40px);
  height: auto;
  max-width: none;
  border: none;
  cursor: grab;
  display: block;
  transition: transform 0.2s ease;
}

.lightbox-image:active {
  cursor: grabbing;
}

.lightbox-image.zoomed {
  cursor: grab;
}

.lightbox-image.zoomed:active {
  cursor: grabbing;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 35px;
  color: #f1f1f1;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  z-index: 1001;
  line-height: 1;
}

.lightbox-close:hover,
.lightbox-close:focus {
  color: #999;
  text-decoration: none;
}

/* Make images clickable */
.content img {
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.content img:hover {
  opacity: 0.8;
}

/* Navigation arrows */
.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: #f1f1f1;
  font-size: 30px;
  font-weight: bold;
  cursor: pointer;
  z-index: 1001;
  background-color: rgba(0, 0, 0, 0.5);
  padding: 10px 15px;
  border-radius: 5px;
  user-select: none;
}

.lightbox-nav:hover {
  background-color: rgba(0, 0, 0, 0.8);
  color: #fff;
}

.lightbox-prev {
  left: 20px;
}

.lightbox-next {
  right: 20px;
}

/* Zoom controls */
.lightbox-zoom-controls {
  position: absolute;
  top: 20px;
  left: 20px;
  z-index: 1001;
  display: flex;
  gap: 5px;
}

.lightbox-zoom-btn {
  background-color: rgba(0, 0, 0, 0.5);
  color: #f1f1f1;
  border: none;
  padding: 8px 12px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 16px;
  font-weight: bold;
}

.lightbox-zoom-btn:hover {
  background-color: rgba(0, 0, 0, 0.8);
}

/* Loading indicator */
.lightbox-loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #f1f1f1;
  font-size: 20px;
}

/* Mobile optimizations */
@media screen and (max-width: 600px) {
  .lightbox-close {
    top: 10px;
    right: 15px;
    font-size: 30px;
  }
  
  .lightbox-nav {
    font-size: 24px;
    padding: 8px 12px;
  }
  
  .lightbox-prev {
    left: 10px;
  }
  
  .lightbox-next {
    right: 10px;
  }
  
  .lightbox-content {
    padding: 50px 10px 30px 10px;
  }
  
  .lightbox-image {
    width: calc(100% - 20px);
  }
  
  .lightbox-zoom-controls {
    top: 10px;
    left: 10px;
  }
  
  .lightbox-zoom-btn {
    padding: 6px 10px;
    font-size: 14px;
  }
}
