/* VTON host: the drawer shell around the try-on iframe, and the capsule. */
.vton-try-on-button {
	margin-inline-start: 0.5em;
}

/* Under a product in shop and category grids. */
.vton-try-on-button--listing {
	display: block;
	margin: 0.5em auto 0;
}

.vton-host-overlay {
	position: fixed;
	inset: 0;
	z-index: 2147482999;
	background: rgba(17, 17, 17, 0.4);
}

.vton-host-panel {
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	z-index: 2147483000;
	display: flex;
	width: min(480px, 100vw);
	background: #fff;
	box-shadow: -8px 0 32px rgba(0, 0, 0, 0.18);
}

.vton-host-overlay[hidden],
.vton-host-panel[hidden],
.vton-host-capsule[hidden] {
	display: none !important;
}

.vton-host-iframe {
	display: block;
	flex: 1;
	width: 100%;
	height: 100%;
	border: 0;
	background: #fff;
	opacity: 0;
	transition: opacity 80ms linear;
}

.vton-host-iframe.is-ready {
	opacity: 1;
}

html.vton-host-open,
html.vton-host-open body {
	overflow: hidden;
}

/* Capsule: the parked try-on, bottom right on every shop page. */
.vton-host-capsule {
	position: fixed;
	right: 16px;
	bottom: calc(16px + env(safe-area-inset-bottom, 0px));
	z-index: 2147482998;
	display: flex;
	align-items: center;
	gap: 2px;
	padding: 4px;
	border-radius: 999px;
	background: #1f1a2e;
	color: #fff;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
	font: 500 14px/1.2 system-ui, -apple-system, "Segoe UI", sans-serif;
}

.vton-host-capsule[data-vton-edition="jewelry"] {
	bottom: calc(76px + env(safe-area-inset-bottom, 0px));
}

.vton-host-capsule button {
	margin: 0;
	border: 0;
	background: transparent;
	color: inherit;
	font: inherit;
	cursor: pointer;
}

.vton-host-capsule__open {
	display: flex;
	align-items: center;
	gap: 10px;
	min-height: 44px;
	padding: 0 12px 0 4px;
	border-radius: 999px;
}

.vton-host-capsule__thumbs {
	display: flex;
}

.vton-host-capsule__thumbs img {
	width: 36px;
	height: 36px;
	margin-inline-start: -10px;
	border: 2px solid #1f1a2e;
	border-radius: 50%;
	background: #fff;
	object-fit: cover;
}

.vton-host-capsule__thumbs img:first-child {
	margin-inline-start: 0;
}

.vton-host-capsule__close {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	font-size: 20px;
	line-height: 1;
	opacity: 0.75;
}

.vton-host-capsule button:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
}

.vton-host-capsule.is-running .vton-host-capsule__label::after {
	content: "";
	display: inline-block;
	width: 10px;
	height: 10px;
	margin-inline-start: 8px;
	border: 2px solid currentColor;
	border-right-color: transparent;
	border-radius: 50%;
	vertical-align: -1px;
	animation: vton-host-spin 0.8s linear infinite;
}

.vton-host-capsule.is-ready {
	background: #6d28d9;
}

@keyframes vton-host-spin {
	to {
		transform: rotate(360deg);
	}
}

@media (prefers-reduced-motion: reduce) {
	.vton-host-capsule.is-running .vton-host-capsule__label::after {
		animation: none;
	}
}
