/* =====================================================================
 * Aluta Image Viewer — zoom/rotate/fullscreen for featured image
 * Pairs with assets/js/aluta-image-viewer.js
 * ===================================================================== */

/* Host wrapper around the featured image — clips overflow so zoomed
   image stays inside its column. */
.aluta-img-viewer-host {
  overflow: hidden;
}

.aluta-img-viewer-host img {
  display: block;
  max-width: 100%;
  user-select: none;
  -webkit-user-drag: none;
  touch-action: none;
  will-change: transform;
}

/* Toolbar controls — small inline buttons the user added in Elementor.
   Keep these unobtrusive; user controls visuals via Elementor itself. */
.aluta-img-zoom-out,
.aluta-img-zoom-in,
.aluta-img-rotate,
.aluta-img-fullscreen {
  cursor: pointer;
}

.aluta-img-zoom-percent {
  user-select: none;
}

/* =====================================================================
 * Fullscreen modal
 * ===================================================================== */
body.aluta-img-modal-open {
  overflow: hidden;
}

.aluta-img-modal {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.aluta-img-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.aluta-img-modal-toolbar {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 100px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  z-index: 2;
}

.aluta-img-modal-toolbar button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 50%;
  color: #1a1a1a;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.aluta-img-modal-toolbar button:hover {
  background: #f0f0f0;
  border-color: #d0d0d0;
}

.aluta-img-modal-toolbar .aluta-img-modal-close {
  margin-left: 4px;
  color: #c62828;
}

.aluta-img-modal-toolbar .aluta-img-zoom-percent {
  min-width: 48px;
  text-align: center;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: #1a1a1a;
}

.aluta-img-modal-stage {
  position: relative;
  z-index: 1;
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 80px 20px 20px;
  box-sizing: border-box;
}

.aluta-img-modal-stage img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
  touch-action: none;
  will-change: transform;
}

@media (max-width: 600px) {
  .aluta-img-modal-toolbar {
    top: 10px;
    padding: 6px 10px;
    gap: 4px;
  }
  .aluta-img-modal-toolbar button {
    width: 32px;
    height: 32px;
  }
  .aluta-img-modal-stage {
    padding: 70px 10px 10px;
  }
}
