/**
 * Image Zoom Styles
 * Styling for medium-zoom library
 */

/* Ensure zoomed images appear above all other content */
.medium-zoom-overlay,
.medium-zoom-image--opened {
  z-index: 9999;
}

/* Overlay background */
.medium-zoom-overlay {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  opacity: 0;
  transition: opacity 300ms;
  will-change: opacity;
}

/* Zoomed image styling */
.medium-zoom-image {
  cursor: pointer;
  cursor: zoom-in;
  transition: transform 300ms cubic-bezier(0.2, 0, 0.2, 1);
}

.medium-zoom-image--hidden {
  visibility: hidden;
}

.medium-zoom-image--opened {
  position: relative;
  cursor: pointer;
  cursor: zoom-out;
  will-change: transform;
}

/* Add a subtle hint that images are zoomable */
.prose img,
.markdown img,
main article img {
  cursor: pointer;
  cursor: zoom-in;
  transition: opacity 0.2s ease;
}

.prose img:hover,
.markdown img:hover,
main article img:hover {
  opacity: 0.9;
}

/* Constrain documentation images for readability */
body:not(.print) .prose img,
body:not(.print) .prose p img,
body:not(.print) .prose-lg img,
body:not(.print) .markdown img,
body:not(.print) main article img,
body:not(.print) main img {
  max-width: 500px !important;
  width: auto !important;
  height: auto !important;
  display: block !important;
  margin-left: auto !important;
  margin-right: auto !important;
  margin-top: 1.5rem !important;
  margin-bottom: 1.5rem !important;
}

/* Mobile - allow full width */
@media (max-width: 768px) {
  body:not(.print) .prose img,
  body:not(.print) .prose p img,
  body:not(.print) .prose-lg img,
  body:not(.print) .markdown img,
  body:not(.print) main article img,
  body:not(.print) main img {
    max-width: 100% !important;
  }
}

/* Prevent zoom cursor on excluded images */
.sidebar-logo img,
.nav-icon img,
.app-icon,
.theme-switcher img,
[data-no-zoom] {
  cursor: default !important;
}

/* Loading state (optional) */
.medium-zoom-image--loading {
  cursor: wait;
}

/* Responsive improvements */
@media (max-width: 768px) {
  .medium-zoom-overlay,
  .medium-zoom-image--opened {
    z-index: 99999; /* Higher on mobile to ensure it's above mobile menus */
  }
}

