/**
 * RLM Image Zoom - Lightbox Styles
 *
 * Lightweight product image zoom with no dependencies
 * Used by: includes/pdp-features/image-zoom.php
 *
 * @package RLM
 */

/* Zoom cursor hint */
.woocommerce-product-gallery__image img {
  cursor: zoom-in;
}

/* Lightbox overlay */
.rlm-zoom-lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.9);
  z-index: 999999;
  cursor: zoom-out;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.rlm-zoom-lightbox.rlm-zoom-active {
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
}

/* Zoomed image */
.rlm-zoom-lightbox img {
  max-width: 90%;
  max-height: 90vh;
  object-fit: contain;
  transform: scale(0.9);
  transition: transform 0.3s ease;
  cursor: zoom-out;
}

.rlm-zoom-lightbox.rlm-zoom-active img {
  transform: scale(1);
}

/* Close button */
.rlm-zoom-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 24px;
  line-height: 1;
  transition: all 0.2s ease;
  z-index: 1000000;
}

.rlm-zoom-close:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.5);
  transform: rotate(90deg);
}

/* Loading state */
.rlm-zoom-lightbox.rlm-zoom-loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 40px;
  height: 40px;
  margin: -20px 0 0 -20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: rlm-zoom-spin 0.8s linear infinite;
}

@keyframes rlm-zoom-spin {
  to { transform: rotate(360deg); }
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .rlm-zoom-lightbox img {
    max-width: 95%;
    max-height: 95vh;
  }

  .rlm-zoom-close {
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    font-size: 20px;
  }
}
