/**
 * Interactive Image Overlay
 * Styles for D3.js circle grid overlay with hover reveals and idle animations
 */

/* ==========================================================================
   Wrapper & Container
   ========================================================================== */

.interactive-image-wrapper {
  position: relative;
  display: inline-block;
  cursor: crosshair;
}

/* Ensure wrapper respects circular masks */
.interactive-image-wrapper.circle-mask {
  border-radius: 50%;
  overflow: hidden;
}

/* Support for rounded corners */
.interactive-image-wrapper.rounded {
  border-radius: var(--border-radius-lg);
  overflow: hidden;
}

/* Base image styling */
.interactive-image-overlay {
  display: block;
  width: 100%;
  height: auto;
}

/* ==========================================================================
   D3 SVG Overlay Canvas
   ========================================================================== */

.overlay-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none; /* Allow interaction to pass through to wrapper */
  z-index: 10;
}

/* ==========================================================================
   Circle Reveal Animations
   ========================================================================== */

.overlay-circle {
  opacity: 0;
  transition: opacity 0.2s ease-in-out;
}

.overlay-circle.revealed {
  opacity: 1;
}

/* ==========================================================================
   Mobile Responsive Adjustments
   ========================================================================== */

@media (max-width: 767px) {
  .interactive-image-wrapper {
    /* Slightly reduce interaction sensitivity on mobile */
    cursor: default;
  }
}

/* ==========================================================================
   Performance Optimizations
   ========================================================================== */

/* Reduce animation impact for users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  .overlay-circle {
    transition-duration: 0.05s !important;
  }
}
