/* OTLT loading look. The loading states themselves are the theme's (evov-sub pjax-nav.js and its
   skeleton classes, shared with evov): here only the outlet's colours, the cart totals while they
   update, and the product card states. */

/* The theme's skeleton is drawn for evov's dark store; on the outlet it takes this light palette. */
:root:root {
	--sk-base: #e9ebef;
	--sk-hi: #f8f9fb;
	--sk-p: var(--wd-primary-color, #1c61e7);
	--evov-skel-surface: var(--sk-base);
	--evov-skel-sweep: var(--sk-hi);
	--evov-skel-bg: var(--sk-base);
	--evov-skel-shimmer: var(--sk-hi);
	--evov-skel-line-hi: var(--sk-hi);
	--evov-wl-sweep: linear-gradient(90deg, transparent, var(--sk-hi), transparent);
	/* The outlet's active-filters bar (chips) is 35px tall: the stand-in while a filter loads matches it. */
	--evov-active-filters-h: 35px;
}

/* Cart, mini cart and checkout totals while they update: the figures turn into the same pills (the
   labels stay), instead of the faded pulse. */
#ocm-root#ocm-root .ocm-tot.is-busy {
	opacity: 1;
}

#ocm-root#ocm-root .ocm-tot.is-busy dd {
	position: relative;
	overflow: hidden;
	animation: none;
	color: transparent !important;
	-webkit-text-fill-color: transparent;
	background-color: var(--sk-base);
	border-radius: 4px;
}

#ocm-root#ocm-root .ocm-tot.is-busy dd * {
	visibility: hidden !important;
}

#ocm-root#ocm-root .ocm-tot.is-busy dd::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(90deg, transparent 0%, var(--sk-hi) 50%, transparent 100%);
	animation: otltSkSweep 1.4s ease-in-out infinite;
}

/* The theme's sweep (evovSkeletonShimmer), here too: cart and checkout pages may not load its sheet. */
@keyframes otltSkSweep {
	from { transform: translateX(-100%); }
	to { transform: translateX(200%); }
}

/* Product card states (card-states.js): a small pill on the SKU line, opposite the SKU. */
.otlt-st-row {
	display: flex !important;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
}

.otlt-chip {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	flex: none;
	margin-inline-start: auto;
	padding: 3px 8px;
	border-radius: 20px;
	font-size: 11px;
	font-weight: 600;
	line-height: 1.3;
	white-space: nowrap;
	background: #eef3fd;
	color: var(--sk-p);
	animation: otltPop .3s cubic-bezier(.34, 1.56, .64, 1);
}

@keyframes otltPop {
	from { opacity: 0; transform: scale(.85); }
	to { opacity: 1; transform: none; }
}

.otlt-chip i {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	border: 2px solid rgba(28, 97, 231, .25);
	border-top-color: currentColor;
	animation: otltSpin .7s linear infinite;
}

@keyframes otltSpin {
	to { transform: rotate(360deg); }
}

.otlt-chip.is-ok {
	background: #e8f6ee;
	color: #15803d;
}

.otlt-adding .wd-product-thumb {
	position: relative;
}

.otlt-adding .wd-product-thumb::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 3px;
	background: linear-gradient(90deg, transparent, var(--sk-p), transparent);
	background-size: 50% 100%;
	background-repeat: no-repeat;
	animation: otltBar 1s cubic-bezier(.22, .61, .36, 1) infinite;
	z-index: 3;
}

@keyframes otltBar {
	from { background-position: -50% 0; }
	to { background-position: 150% 0; }
}

/* Phones: the add-to-cart button's own spinner shows "Adding", and the cart drawer opening shows
   "Added", so no pills there. */
@media (max-width: 768px) {
	.otlt-chip,
	.otlt-adding .wd-product-thumb::after {
		display: none !important;
	}

	.otlt-st-row {
		display: block !important;
	}
}

/* Sold out: the price already says so; the image is dimmed. */
.wd-product.outofstock .wd-product-thumb img {
	opacity: .5;
}

@media (prefers-reduced-motion: reduce) {
	#ocm-root#ocm-root .ocm-tot.is-busy dd::after,
	.otlt-chip,
	.otlt-chip i,
	.otlt-adding .wd-product-thumb::after {
		animation: none !important;
	}
}
