/* Restore the existing original/result comparison action in fashion tools. */
#previewArea > .preview-header,
#previewArea.has-feature-preview > .preview-header {
  display: flex !important;
  flex: 0 0 auto;
  justify-content: flex-end;
  align-items: center;
  padding: 10px 16px;
  min-height: 44px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
#previewArea > .preview-header h1,
#previewArea > .preview-header #previewNavBtns {
  display: none !important;
}
#previewCompareBtn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 6px 14px !important;
}
/* Use a compact overlay action instead of a full-width preview header. */
#previewArea { position: relative; }
#previewArea > .preview-header,
#previewArea.has-feature-preview > .preview-header {
  position: absolute;
  top: 12px;
  right: 16px;
  z-index: 5;
  width: auto;
  min-height: 0;
  height: auto;
  padding: 0;
  margin: 0;
  border: 0;
  background: transparent;
}
#previewArea > .preview-header > h1,
#previewArea > .preview-header #previewTitle {
  display: none !important;
}

#gdCompareToggle.gd-no-source{opacity:1;cursor:pointer}

#previewArea > .preview-header,#previewArea.has-feature-preview > .preview-header{display:none!important}
#previewArea.original-compare-selected > .preview-header{display:flex!important}
#gdCompareToggle.gd-no-source{opacity:.45;cursor:help}

/* Fit once from natural dimensions: do not shrink with CSS and scale again. */
#gdImageWrap{flex:none;max-width:none;max-height:none;transform-origin:center center}
#gdImageWrap #gdImage{max-width:none;max-height:none;object-fit:contain}

/* Gallery close action: square hit area without a rectangular background. */
#galleryDetailOverlay .gallery-detail-head > button:last-child {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}
#galleryDetailOverlay .gallery-detail-head > button:last-child:hover {
  background: var(--surface2, rgba(128,128,128,.15));
}
