.zoom-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  align-items: center;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  justify-content: center;
  touch-action: none;
  z-index: 99999;
}

.zoom-content {
  height: 90%;
  overflow: hidden;
  position: relative;
  width: 90%;
}

.zoom-image-container,
.zoom-gallery-container {
  align-items: center;
  display: flex;
  height: 100%;
  justify-content: center;
  overflow: visible;
  position: relative;
  width: 100%;
}

.zoom-gallery-track {
  display: flex;
  height: 100%;
  transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  width: 100%;
  will-change: transform;
}

.zoom-gallery-track.swiping {
  transition: none;
}

.zoom-gallery-slide {
  align-items: center;
  display: flex;
  flex: 0 0 100%;
  justify-content: center;
}

.zoom-image-container img,
.zoom-gallery-slide img {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
  transform-origin: center;
  transition: transform 0.1s ease-out;
  user-select: none;
  -webkit-user-drag: none;
}

.zoom-close,
.zoom-reset-button,
.zoom-control-button,
.zoom-navigation {
  background: var(--button-color, rgba(0, 0, 0, 0.6));
  border: none;
  border-radius: 50%;
  color: var(--button-text-color, white);
  cursor: pointer;
  touch-action: manipulation;
  transition: background 0.3s, opacity 0.3s;
  z-index: 100000;
}

.zoom-close {
  font-size: 24px;
  height: 40px;
  position: absolute;
  right: 10px;
  top: 10px;
  width: 40px;
}

.zoom-reset-button {
  bottom: 20px;
  font-size: 16px;
  height: 40px;
  left: 20px;
  position: absolute;
  width: 40px;
}

.zoom-controls {
  bottom: 20px;
  display: flex;
  position: absolute;
  right: 20px;
}

.zoom-control-button {
  font-size: 20px;
  height: 40px;
  margin-left: 10px;
  width: 40px;
}

.zoom-navigation {
  font-size: 24px;
  height: 50px;
  opacity: 0.7;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
}

.zoom-navigation:hover {
  opacity: 1;
}

.zoom-navigation:disabled {
  cursor: not-allowed;
  opacity: 0.3;
}

.zoom-nav-prev {
  left: 20px;
}

.zoom-nav-next {
  right: 20px;
}

.zoom-counter {
  background: rgba(0, 0, 0, 0.6);
  border-radius: 20px;
  color: white;
  font-size: 14px;
  left: 50%;
  padding: 8px 16px;
  position: absolute;
  top: 20px;
  transform: translateX(-50%);
  z-index: 100000;
}

.zoom-instructions,
.zoom-swipe-hint {
  background: rgba(0, 0, 0, 0.5);
  border-radius: 8px;
  color: white;
  font-size: 14px;
  opacity: 0.8;
  padding: 8px 16px;
  pointer-events: none;
  position: absolute;
  text-align: center;
  transition: opacity 0.5s;
  z-index: 100000;
}

.zoom-instructions {
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
}

.zoom-swipe-hint {
  bottom: 80px;
  font-size: 12px;
  left: 50%;
  transform: translateX(-50%);
}

.zoomable,
.wp-block-image img:not(.shortcode-image) {
  cursor: zoom-in;
}

.wp-block-image {
  overflow: visible;
  position: relative;
}

.wp-block-image img:not(.shortcode-image) {
  transition: all 0.3s ease;
}

@media (max-width: 768px) {
  .zoom-close,
  .zoom-control-button,
  .zoom-reset-button {
    font-size: 18px;
    height: 36px;
    width: 36px;
  }

  .zoom-navigation {
    font-size: 20px;
    height: 44px;
    width: 44px;
  }

  .zoom-nav-prev {
    left: 10px;
  }

  .zoom-nav-next {
    right: 10px;
  }

  .zoom-instructions,
  .zoom-counter {
    font-size: 12px;
    padding: 6px 12px;
  }
}
