/* Comparison Lightbox */
.comparison-lightbox {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.95);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.comparison-lightbox.hidden {
  display: none;
}

.comparison-lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: white;
  font-size: 2.5rem;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s;
  z-index: 10;
  line-height: 1;
  padding: 0.5rem;
}

.comparison-lightbox-close:hover {
  opacity: 1;
}

.comparison-lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5);
  border: none;
  color: white;
  font-size: 3rem;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s, background 0.2s;
  z-index: 10;
  padding: 1rem 1.5rem;
  border-radius: 4px;
}

.comparison-lightbox-nav:hover {
  opacity: 1;
  background: rgba(0, 0, 0, 0.8);
}

.comparison-lightbox-nav.prev {
  left: 1rem;
}

.comparison-lightbox-nav.next {
  right: 1rem;
}

.comparison-lightbox-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 90vw;
  max-height: 90vh;
}

/* Image Container */
.comparison-image-container {
  position: relative;
  display: inline-block;
  user-select: none;
  cursor: ew-resize;
}

.comparison-image-container img {
  max-width: 85vw;
  max-height: 75vh;
  display: block;
  border-radius: 8px;
}

.comparison-img-enhanced {
  display: block;
}

/* Overlay Container - clips the original image */
.comparison-overlay-container {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 50%;
  overflow: hidden;
  border-radius: 8px 0 0 8px;
}

.comparison-img-original {
  position: absolute;
  top: 0;
  left: 0;
  max-width: none;
  width: auto;
  height: 100%;
}

/* Slider Handle */
.comparison-slider-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 4px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: ew-resize;
  z-index: 5;
}

.comparison-slider-line {
  flex: 1;
  width: 3px;
  background: white;
  box-shadow: 0 0 4px rgba(0,0,0,0.5);
}

.comparison-slider-grip {
  width: 44px;
  height: 44px;
  background: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: #333;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  flex-shrink: 0;
}

/* Labels */
.comparison-label {
  position: absolute;
  top: 1rem;
  padding: 0.375rem 0.75rem;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 4px;
  pointer-events: none;
}

.comparison-label-original {
  left: 1rem;
}

.comparison-label-enhanced {
  right: 1rem;
  background: rgba(40, 167, 69, 0.9);
}

/* Info */
.comparison-lightbox-info {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  margin-top: 1rem;
  color: white;
}

.comparison-caption {
  font-size: 1rem;
  font-weight: 500;
}

.comparison-counter {
  font-size: 0.875rem;
  opacity: 0.7;
}

.comparison-instructions {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.8125rem;
  margin-top: 0.75rem;
}

/* Responsive */
@media (max-width: 768px) {
  .comparison-lightbox-nav {
    font-size: 2rem;
    padding: 0.75rem 1rem;
  }
  
  .comparison-lightbox-nav.prev {
    left: 0.5rem;
  }
  
  .comparison-lightbox-nav.next {
    right: 0.5rem;
  }
  
  .comparison-image-container img {
    max-width: 95vw;
    max-height: 70vh;
  }
}