/* Image Reveal Module Base Styles */

.image-reveal {
  position: relative;
  display: inline-block;
  max-width: 100%;
  line-height: 0;
}

.image-reveal .reveal-image {
  display: block;
  max-width: 100%;
  height: auto;
  will-change: transform, opacity;
}

/* Prevent layout shift during animation */
.image-reveal.will-animate {
  overflow: hidden;
}

/* Caption styles */
.image-reveal .reveal-caption {
  line-height: 1.4;
  margin-top: 0.5rem;
  font-size: 0.875rem;
}

/* Loading state */
.image-reveal .reveal-image[loading="lazy"] {
  background: linear-gradient(
    90deg,
    rgba(0, 0, 0, 0.03) 0%,
    rgba(0, 0, 0, 0.05) 50%,
    rgba(0, 0, 0, 0.03) 100%
  );
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  .image-reveal .reveal-image {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
  
  .image-reveal.will-animate .reveal-image {
    opacity: 1;
  }
  
  .image-reveal .reveal-caption {
    animation: none !important;
    opacity: 1 !important;
  }
}

/* Print styles */
@media print {
  .image-reveal .reveal-image {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }
}