/* v85: Independence artwork viewer. Scoped to the existing shirt story dialog. */
.shirt-dialog-art > img.qs-image-zoom-source {
  cursor: zoom-in;
  touch-action: pan-y;
  -webkit-user-select: none;
  user-select: none;
}

.qs-image-viewer-launch {
  min-height: 44px;
  color: #fff;
  cursor: pointer;
  touch-action: manipulation;
  background: #ffffff14;
  border: 1px solid #ffffff38;
  border-radius: 999px;
  align-self: center;
  padding: 10px 17px;
  font-size: .75rem;
  font-weight: 780;
  line-height: 1;
}

.qs-image-viewer-launch:hover,
.qs-image-viewer-launch:focus-visible {
  background: #1557ff;
  border-color: #7fa2ff;
}

.shirt-dialog.qs-image-viewer-open {
  isolation: isolate;
}

.qs-image-viewer {
  z-index: 100;
  color: #fff;
  touch-action: pan-x pan-y;
  overscroll-behavior: none;
  background:
    radial-gradient(circle at 18% 14%, #1557ff3d, transparent 34%),
    radial-gradient(circle at 86% 82%, #d3132a24, transparent 30%),
    #030711;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: 100%;
  height: 100%;
  min-height: 0;
  display: grid;
  position: absolute;
  inset: 0;
  overflow: hidden;
  animation: qs-image-viewer-in .24s cubic-bezier(.16, 1, .3, 1) both;
}

.qs-image-viewer-header {
  z-index: 2;
  background: linear-gradient(#030711f5 72%, transparent);
  padding: max(14px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) 12px max(14px, env(safe-area-inset-left));
}

.qs-image-viewer-head {
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding-right: 108px;
  display: flex;
}

.qs-image-viewer-label {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.qs-image-viewer-label small {
  color: #8cafff;
  letter-spacing: .15em;
  text-transform: uppercase;
  font-size: .58rem;
  font-weight: 820;
}

.qs-image-viewer-title {
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  font-family: Iowan Old Style, Palatino Linotype, Palatino, Georgia, serif;
  font-size: clamp(1rem, 2.5vw, 1.35rem);
  font-weight: 500;
}

.qs-image-viewer-close,
.qs-image-viewer-control {
  min-width: 46px;
  min-height: 46px;
  color: #fff;
  cursor: pointer;
  touch-action: manipulation;
  background: #ffffff12;
  border: 1px solid #ffffff3b;
  border-radius: 999px;
  justify-content: center;
  align-items: center;
  padding: 0 15px;
  font-weight: 790;
  display: inline-flex;
}

.qs-image-viewer-close {
  z-index: 20;
  flex: none;
  gap: 8px;
  position: absolute;
  top: max(14px, env(safe-area-inset-top));
  right: max(14px, env(safe-area-inset-right));
}

.qs-image-viewer-close span[aria-hidden="true"] {
  font-size: 1.35rem;
  font-weight: 300;
  line-height: 1;
}

.qs-image-viewer-close:hover,
.qs-image-viewer-close:focus-visible,
.qs-image-viewer-control:hover,
.qs-image-viewer-control:focus-visible {
  background: #1557ff;
  border-color: #91afff;
}

.qs-image-viewer-controls {
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  display: flex;
}

.qs-image-viewer-control[data-action="zoom-out"],
.qs-image-viewer-control[data-action="zoom-in"] {
  width: 46px;
  padding: 0;
  font-size: 1.35rem;
  font-weight: 500;
}

.qs-image-viewer-control:disabled {
  opacity: .42;
  cursor: default;
  background: #ffffff0a;
}

.qs-image-viewer-percent {
  min-width: 64px;
  color: #ffffffd1;
  text-align: center;
  font-variant-numeric: tabular-nums;
  font-size: .72rem;
  font-weight: 760;
}

.qs-image-viewer-stage {
  min-width: 0;
  min-height: 0;
  cursor: grab;
  touch-action: none;
  overscroll-behavior: none;
  -webkit-user-select: none;
  user-select: none;
  background: #00050bd9;
  border: 1px solid #ffffff21;
  border-radius: 22px;
  place-items: center;
  margin: 0 max(10px, env(safe-area-inset-right)) 0 max(10px, env(safe-area-inset-left));
  display: grid;
  position: relative;
  overflow: hidden;
}

.qs-image-viewer-stage[data-dragging="true"] {
  cursor: grabbing;
}

.qs-image-viewer-image {
  max-width: 100%;
  max-height: 100%;
  min-width: 0;
  min-height: 0;
  width: auto;
  height: auto;
  pointer-events: none;
  -webkit-user-drag: none;
  user-select: none;
  object-fit: contain;
  transform: translate3d(0, 0, 0) scale(1);
  transform-origin: center;
  will-change: transform;
}

.qs-image-viewer-hint {
  color: #ffffffa8;
  text-align: center;
  background: linear-gradient(transparent, #030711f5 35%);
  margin: 0;
  padding: 18px max(18px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left));
  font-size: .68rem;
  line-height: 1.4;
}

@keyframes qs-image-viewer-in {
  from { opacity: 0; transform: scale(.985); }
  to { opacity: 1; transform: scale(1); }
}

@media (max-width: 600px) {
  .qs-image-viewer {
    border-radius: 0;
  }

  .qs-image-viewer-header {
    padding-bottom: 9px;
  }

  .qs-image-viewer-controls {
    margin-top: 8px;
  }

  .qs-image-viewer-stage {
    border-radius: 16px;
  }

  .qs-image-viewer-hint {
    padding-top: 13px;
    font-size: .64rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .qs-image-viewer {
    animation: none;
  }
}
