/* Fullscreen Image Dialog */
.fullscreen-dialog {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: rgba(0, 0, 0, 0.9);
  touch-action: none; /* Disable browser's default touch handling */
}

.fullscreen-dialog-content {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
  overflow: auto;
  touch-action: pan-x pan-y pinch-zoom; /* Enable horizontal swiping and panning */
}

#fullscreen-image {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
  transition: max-width 0.3s, max-height 0.3s;
  cursor: zoom-in;
  user-select: none; /* Prevent image selection during swipe */
  -webkit-user-drag: none; /* Prevent image dragging */
  pointer-events: auto; /* Ensure image receives pointer events */
}

.close-dialog {
  position: absolute;
  top: 15px;
  right: 35px;
  color: #f1f1f1;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  z-index: 10000;
}

.close-dialog:hover,
.close-dialog:focus {
  color: #bbb;
  text-decoration: none;
  cursor: pointer;
}

.dialog-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  background-color: #fff;
  color: #b2b2b2;
  display: flex;
  justify-content: center;
  cursor: pointer;
  font-size: 32px;
  line-height: 32px;
  font-weight: 600;
  transition: opacity 0.3s ease;
  border-radius: 50%;
  border: 5px solid rgba(255, 255, 255, 0.3);
  z-index: 10000;
  background-clip: content-box;
}

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

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

.dialog-nav:hover {
  color: #88570c;
}

.zoom-hint {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background-color: rgba(0, 0, 0, 0.5);
  color: white;
  padding: 5px 15px;
  border-radius: 20px;
  font-size: 14px;
  opacity: 0.7;
  transition: opacity 0.3s;
}

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