.gj-image-preview-float {
  position: fixed;
  z-index: 350;
  pointer-events: none;
  padding: 6px;
  border-radius: 6px;
  background: rgba(255, 252, 245, 0.98);
  border: 1px solid rgba(109, 76, 65, 0.25);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
  opacity: 0;
  visibility: hidden;
  transition: opacity 120ms ease, visibility 120ms ease;
}

.gj-image-preview-float.is-visible {
  opacity: 1;
  visibility: visible;
}

.gj-image-preview-float img {
  display: block;
  max-width: min(90vw, 720px);
  max-height: 80vh;
  width: auto;
  height: auto;
  object-fit: contain;
}

.gj-image-preview-modal {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(20, 16, 12, 0.72);
}

.gj-image-preview-modal[hidden] {
  display: none !important;
}

.gj-image-preview-modal-inner {
  position: relative;
  max-width: 100%;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.gj-image-preview-modal img {
  max-width: min(100vw - 32px, 960px);
  max-height: min(85vh, 900px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 4px;
  background: #f7f1e6;
}

.gj-image-preview-close {
  min-width: 44px;
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 15px;
  cursor: pointer;
}

.gj-image-preview-close:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

[data-image-preview] {
  cursor: zoom-in;
}

@media (prefers-reduced-motion: reduce) {
  .gj-image-preview-float {
    transition: none;
  }
}
