/* Photo and video viewer (client sheet IT-90), viewer.js. Shared by Seller Center (auto-loaded part) and the
   storefront (Support\Viewer). Full screen, charcoal see-through backdrop, white controls, 48 px+ touch targets. */
dialog.igv {
	position: fixed; inset: 0; z-index: 2147483000;
	width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0;
	border: 0; border-radius: 0; box-shadow: none; overflow: hidden;
	background: rgba(30, 26, 29, .96); color: #fff; font: inherit; line-height: 1.3;
}
dialog.igv::backdrop { background: rgba(30, 26, 29, .7); }
dialog.igv[open] { animation: igv-in .16s ease-out; }
@keyframes igv-in { from { opacity: 0; } }

.igv-stage { position: absolute; left: 0; right: 0; top: 60px; bottom: calc(82px + env(safe-area-inset-bottom, 0px)); touch-action: none; }
.igv.is-video .igv-stage { touch-action: manipulation; }
.igv-media { position: absolute; left: 50%; top: 50%; transform-origin: 50% 50%; transition: transform .2s ease, width .2s ease, height .2s ease, margin .2s ease; }
.igv.is-dragging .igv-media, .igv.is-live .igv-media { transition: none; }
.igv-media img, .igv-media video { display: block; width: 100%; height: 100%; object-fit: contain; -webkit-user-select: none; user-select: none; -webkit-user-drag: none; }
.igv-media img { cursor: zoom-in; }
.igv.is-zoomed .igv-media img { cursor: grab; }
.igv.is-zoomed.is-dragging .igv-media img { cursor: grabbing; }
.igv-media video { background: #000; }
.igv-msg { position: absolute; left: 16px; right: 16px; top: 50%; margin: -10px 0 0; text-align: center; font-size: 14px; color: rgba(255, 255, 255, .8); }
.igv-msg[hidden] { display: none; }

.igv-top { position: absolute; left: 0; right: 0; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 60px; padding: 0 6px 0 16px; background: rgba(30, 26, 29, .72); }
.igv-count { font-size: 15px; font-weight: 700; letter-spacing: .02em; font-variant-numeric: tabular-nums; }
.igv-x { margin-left: auto; }

.igv-btn {
	display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
	min-width: 48px; min-height: 48px; padding: 4px 8px; margin: 0;
	border: 0; border-radius: 10px; background: transparent; color: #fff; font: inherit; line-height: 1.2;
	cursor: pointer; -webkit-tap-highlight-color: transparent; box-shadow: none; text-transform: none;
}
.igv-btn svg { display: block; width: 24px; height: 24px; flex: none; }
.igv-btn:hover { background: rgba(255, 255, 255, .14); color: #fff; }
.igv-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.igv-btn:disabled { opacity: .35; cursor: default; background: transparent; }

.igv-bar { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; display: flex; justify-content: center; gap: 2px; padding: 8px 6px calc(8px + env(safe-area-inset-bottom, 0px)); background: rgba(30, 26, 29, .72); }
.igv-tool { min-width: 64px; min-height: 58px; }
.igv-tool span { font-size: 11.5px; font-weight: 600; white-space: nowrap; }

.igv-nav { position: absolute; top: 50%; z-index: 2; width: 48px; height: 56px; margin-top: -28px; background: rgba(30, 26, 29, .6); }
.igv-nav:hover { background: rgba(30, 26, 29, .85); }
.igv-prev { left: 6px; }
.igv-next { right: 6px; }
.igv-nav:disabled { visibility: hidden; }
.igv.is-single .igv-nav, .igv.is-single .igv-count { display: none; }

@media (min-width: 768px) {
	.igv-stage { left: 80px; right: 80px; top: 64px; bottom: 92px; }
	.igv-top { height: 64px; padding: 0 12px 0 24px; }
	.igv-nav { width: 56px; height: 64px; margin-top: -32px; }
	.igv-prev { left: 12px; }
	.igv-next { right: 12px; }
	.igv-bar { gap: 6px; padding: 12px 12px 14px; }
	.igv-tool { min-width: 84px; }
	.igv-tool span { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
	dialog.igv[open] { animation: none; }
	.igv-media { transition: none; }
}

/* Thumbnails that open the viewer ------------------------------------------------------------------------------ */
[data-mcc-view] { cursor: zoom-in; }
/* Return evidence video (Returns::media_html): a still frame with a play mark; the click plays it in the viewer. */
a.rt-vid { position: relative; overflow: hidden; color: #fff; cursor: pointer; text-decoration: none; }
a.rt-vid video { display: block; width: 100%; height: auto; max-height: inherit; object-fit: contain; pointer-events: none; }
.rt-vid-play { position: absolute; left: 50%; top: 50%; display: flex; align-items: center; justify-content: center; width: 52px; height: 52px; margin: -26px 0 0 -26px; border-radius: 14px; background: rgba(30, 26, 29, .72); color: #fff; pointer-events: none; }
.rt-vid-play svg { display: block; width: 26px; height: 26px; }
a.rt-vid:hover .rt-vid-play { background: rgba(30, 26, 29, .9); }
/* Storefront review photos (parts/reviews.php): the link wraps the 72 px thumbnail. */
.xrv-photos a { display: block; flex: none; line-height: 0; border-radius: 10px; }
.xrv-photos a:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
