/* Base layout and body settings */
html, body {
  /* margin, padding, font-family, background are inherited from baseInteractive.css */
   /* Specific to panandzoom.html */
}

/* Mobile-first layout for viewer */
.interactive-container {
  /* width, margin, border-radius, overflow, position are inherited from baseInteractive.css */
  /* These are specific overrides or additions for panandzoom.html */
  
}

/* Container that handles pan and zoom */
.pan-zoom-container {
  width: 100%;
  height: 100%;
  cursor: grab;
  overflow: hidden;
  position: relative;
  user-select: none;
}

/* The image element itself */
.pan-zoom-container img {
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: top left;
  transition: transform 0.05s ease-out;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

/* Zoom control buttons */
.pan-zoom-controls {
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.pan-zoom-controls button {
  background: rgba(0, 0, 0, 0.6);
  color: white;
  border: none;
  padding: 0.5rem;
  font-size: 1.2rem;
  border-radius: 4px;
  cursor: pointer;
}

.pan-zoom-controls button:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Zoom level indicator (fades in/out) */
.zoom-indicator.hud {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.7);
  color: white;
  font-size: 1rem;
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  z-index: 10;
  font-family: monospace;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

/* Spinner shown during image loading */
.loading-spinner {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 3rem;
  height: 3rem;
  margin: -1.5rem 0 0 -1.5rem;
  border: 4px solid rgba(0,0,0,0.2);
  border-top-color: rgba(0,0,0,0.7);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  z-index: 5;
}

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

/* Prevent text/image selection when dragging */
body.noselect {
  user-select: none;
}

/* Enhancements for large screens */
@media (min-width: 1150px) {
  .interactive-container {
    /* max-width, margin, border-radius, height are inherited from baseInteractive.css */
    /* These are specific overrides or additions for panandzoom.html desktop view */
    
  }
}
