img[data-upload-thumbnail] {
  width: min(84px, 100%) !important;
  height: 72px !important;
  max-width: 100% !important;
  max-height: 72px !important;
  object-fit: contain !important;
  vertical-align: middle;
  border-radius: 7px;
  background: var(--surface-soft, #f7f3f5);
}

img[data-upload-thumbnail][role="button"] {
  cursor: zoom-in;
}

img[data-upload-thumbnail][role="button"]:focus-visible {
  outline: 2px solid var(--wine, #944a63);
  outline-offset: 2px;
}

.br-carousel-item,
[data-br-upload-dialog] .br-carousel-item {
  grid-template-columns: minmax(0, 84px) minmax(0, 1fr);
}

.br-carousel-thumb,
.br-carousel-root[data-br-carousel-device="mobile"] .br-carousel-thumb,
.pm-carousel-thumb {
  grid-column: 1;
  grid-row: 1 / span 2;
  width: min(84px, 100%);
  height: 72px;
  min-height: 0;
  max-height: 72px;
  aspect-ratio: auto;
}

.pm-carousel-selected figure {
  width: 84px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.pm-card .pm-preview:has(img[data-upload-thumbnail]),
.pm-brand-grid .pm-card .pm-preview:has(img[data-upload-thumbnail]),
.ls-photo-styling [data-photo-preview]:has(img[data-upload-thumbnail]),
[data-sh-image-preview]:has(img[data-upload-thumbnail]) {
  width: min(84px, 100%);
  height: 72px;
  min-height: 0;
  aspect-ratio: auto;
}

.ls-photo-styling [data-photo-preview]:has(img[data-upload-thumbnail]) {
  display: block;
  margin: 0 auto;
}

.sh-image-reviews .sh-product-image:has(img[data-upload-thumbnail]) {
  height: 96px;
  min-height: 0;
  aspect-ratio: auto;
}

.ls-photo-stage:not(:has(img[data-upload-thumbnail])) > .upload-thumb-enlarge,
.pm-card:not(:has(img[data-upload-thumbnail])) .upload-thumb-enlarge {
  display: none;
}

.upload-thumb-enlarge {
  display: block;
  margin: 4px auto 0;
}

.upload-thumb-selection {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-block: 6px;
}

.upload-thumb-selection:empty {
  display: none;
}

.upload-thumb-authorization {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.upload-thumb-authorization img {
  flex: none;
}

dialog.upload-thumb-viewer {
  position: fixed;
  inset: 0;
  width: min(800px, calc(100vw - 24px));
  max-width: none;
  max-height: calc(100vh - 24px);
  max-height: calc(100dvh - 24px);
  margin: auto;
  padding: 12px;
  box-sizing: border-box;
  overflow: auto;
  border: 1px solid var(--line, #e4d9df);
  border-radius: 14px;
  color: var(--ink, #3d3036);
  background: var(--paper, #fff);
}

dialog.upload-thumb-viewer::backdrop {
  background: rgba(46, 32, 41, .63);
}

.upload-thumb-viewer header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.upload-thumb-viewer > img {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 108px);
  max-height: calc(100dvh - 108px);
  margin: 0 auto;
  object-fit: contain;
}
