/*
 * Feature styles ported from uncode-child (grind picker, checkout overlay,
 * coffee loaders, qty steppers, pay banner, login
 * spinner, preloader), restyled onto the dx tokens in dx.css so they follow
 * light/dark and RTL. Markup and JS contracts are unchanged.
 * No colour literals here except artwork that must stay fixed.
 */

/* =====================================================================
   GRIND PICKER — modal opened from coffee cards (dm-grind-picker.js).
   Centered dialog on desktop, bottom sheet on mobile.
   ===================================================================== */
html.dm-gp-open {
	overflow: hidden;
	scrollbar-gutter: stable;
}

.dm-gp {
	position: fixed;
	inset: 0;
	/* Above the site's cookie bar (.gdpr-privacy-bar, z-index 9999999), otherwise it
	   covers the Add to cart button on mobile for first-time visitors. */
	z-index: 10000000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	font-family: var(--dm-font);
	color: var(--dm-text);
}

.dm-gp[hidden] {
	display: none;
}

.dm-gp__backdrop {
	position: absolute;
	inset: 0;
	background: var(--dm-overlay);
	-webkit-backdrop-filter: blur(3px);
	backdrop-filter: blur(3px);
	opacity: 0;
	transition: opacity 0.22s ease;
}

.dm-gp__dialog {
	position: relative;
	width: 100%;
	max-width: 460px;
	max-height: calc(100vh - 40px);
	overflow-y: auto;
	background: var(--dm-card);
	border: 1px solid var(--dm-border);
	border-radius: 24px;
	box-shadow: 0 28px 70px var(--dm-shadow);
	/* bottom padding lives on the last child so the sticky footer sits flush */
	padding: 24px 24px 0;
	outline: 0;
	opacity: 0;
	transform: translateY(10px) scale(0.985);
	transition: opacity 0.22s cubic-bezier(0.32, 0.72, 0, 1), transform 0.22s cubic-bezier(0.32, 0.72, 0, 1);
}

.dm-gp.is-open .dm-gp__backdrop {
	opacity: 1;
}

.dm-gp.is-open .dm-gp__dialog {
	opacity: 1;
	transform: none;
}

/* Explicit resets: page-builder button styles otherwise leak in (width /
   max-width / padding pinned: WPBakery custom CSS once made the tiles overlap). */
:is(.dm-gp, .dm-gp-inline) button {
	-webkit-appearance: none;
	appearance: none;
	margin: 0;
	padding: 0;
	width: auto;
	max-width: none;
	border: 0;
	box-shadow: none;
	background: none;
	color: inherit;
	font: inherit;
	line-height: 1;
	text-transform: none;
	letter-spacing: normal;
	cursor: pointer;
}

:is(.dm-gp, .dm-gp-inline) button:focus-visible,
.dm-gp a:focus-visible {
	outline: 3px solid var(--dm-focus);
	outline-offset: 2px;
}

.dm-gp .dm-gp__close {
	position: absolute;
	top: 14px;
	inset-inline-end: 14px;
	width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	border: 1px solid var(--dm-border);
	font-size: 22px;
	color: var(--dm-text);
	transition: background-color 0.2s ease;
}

.dm-gp .dm-gp__close:hover {
	background: var(--dm-subtle);
}

.dm-gp__body:has(> .dm-gp__loading) {
	padding-bottom: 24px; /* the dialog's own bottom padding moved to .dm-gp__more */
}

.dm-gp__loading {
	width: 36px;
	height: 36px;
	margin: 46px auto;
	border: 2px solid var(--dm-border);
	border-top-color: var(--dm-accent);
	border-radius: 50%;
	animation: dm-spin 0.8s linear infinite;
}

.dm-gp__head {
	display: flex;
	align-items: center;
	gap: 14px;
	padding-inline-end: 48px;
	margin-bottom: 22px;
}

.dm-gp__img {
	flex: 0 0 72px;
	width: 72px;
	height: 72px;
	object-fit: contain;
	border-radius: 14px;
	background: var(--dm-subtle);
	display: block;
}

.dm-gp__meta {
	min-width: 0;
}

.dm-gp .dm-gp__title {
	margin: 0 0 4px;
	padding: 0;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.35;
	color: var(--dm-text);
}

.dm-gp__price {
	font-size: 15px;
	font-weight: 600;
	font-variant-numeric: tabular-nums;
	color: var(--dm-text-2);
}

.dm-gp__price del,
.dm-gp__price del span {
	color: var(--dm-muted);
	font-weight: 400;
}

.dm-gp__price ins {
	text-decoration: none;
}

.dm-gp__label {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	margin-bottom: 10px;
	font-size: 13px;
	font-weight: 600;
	color: var(--dm-text);
}

.dm-gp__hint {
	font-weight: 400;
	color: var(--dm-muted);
}

.dm-gp__opts {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 8px;
}

:is(.dm-gp, .dm-gp-inline) .dm-gp__opt {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: flex-start;
	gap: 8px;
	padding: 14px 6px 12px;
	border-radius: 14px;
	background: var(--dm-card);
	box-shadow: inset 0 0 0 1.5px var(--dm-border);
	font-size: 12.5px;
	font-weight: 600;
	line-height: 1.3;
	text-align: center;
	color: var(--dm-text);
	transition: background-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}

:is(.dm-gp, .dm-gp-inline) .dm-gp__opt:hover:not(:disabled):not(.is-selected) {
	box-shadow: inset 0 0 0 1.5px var(--dm-hover-rule);
}

:is(.dm-gp, .dm-gp-inline) .dm-gp__opt.is-selected {
	background: var(--dm-btn-bg);
	box-shadow: inset 0 0 0 1.5px var(--dm-btn-bg);
	color: var(--dm-btn-text);
}

:is(.dm-gp, .dm-gp-inline) .dm-gp__opt:disabled {
	opacity: 0.4;
	cursor: not-allowed;
}

:is(.dm-gp, .dm-gp-inline) .dm-gp__opt:disabled .dm-gp__opt-label {
	text-decoration: line-through;
}

.dm-gp__ico {
	width: 28px;
	height: 28px;
	color: var(--dm-text-2);
	transition: color 0.2s ease;
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	justify-content: center;
}

.dm-gp__ico svg {
	display: block;
	width: 100%;
	height: 100%;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.5;
	stroke-linecap: round;
	stroke-linejoin: round;
}

:is(.dm-gp, .dm-gp-inline) .dm-gp__opt.is-selected .dm-gp__ico {
	color: inherit;
}

.dm-gp__opt-label {
	display: block;
	overflow-wrap: anywhere;
}

/* ---- Variation picker: several attribute rows, colours, photos ---- */
.dm-gp__row + .dm-gp__row {
	margin-top: 20px;
}

.dm-gp__opts--dense {
	grid-template-columns: repeat(4, minmax(0, 1fr));
}

.dm-gp__opts--wide {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* Greyed: cannot go with the other choices, but still selectable (clears them). */
:is(.dm-gp, .dm-gp-inline) .dm-gp__opt.is-dim {
	opacity: 0.45;
}

.dm-gp__opts--photo .dm-gp__ico {
	width: 44px;
	height: 44px;
}

.dm-gp__ph {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
	border-radius: 8px;
	background: var(--dm-subtle);
	transition: box-shadow 0.2s ease;
}

.dm-gp__sw {
	display: block;
	width: 26px;
	height: 26px;
	border-radius: 50%;
	/* inner ring keeps light colours crisp, outer ring keeps dark ones visible */
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.22), 0 0 0 1px var(--dm-border);
	transition: box-shadow 0.2s ease;
}

.dm-gp__sw.is-clear {
	box-shadow: inset 0 0 0 1.5px var(--dm-hover-rule);
}

.dm-gp__sw.is-unknown {
	background: radial-gradient(circle at 35% 30%, #9a958d, #5d5953);
}

:is(.dm-gp, .dm-gp-inline) .dm-gp__opt.is-selected :is(.dm-gp__sw, .dm-gp__ph) {
	box-shadow: 0 0 0 2px var(--dm-btn-text);
}

.dm-gp__err {
	margin-top: 16px;
	padding: 11px 14px;
	border-radius: 14px;
	background: var(--dm-surface);
	border: 1.5px solid var(--dm-accent);
	color: var(--dm-text);
	font-size: 13px;
	line-height: 1.55;
}

.dm-gp__err[hidden] {
	display: none;
}

.dm-gp__foot {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-top: 14px;
	/* Stays reachable when many tiles (e.g. 15+ colours) make the dialog scroll. */
	position: sticky;
	bottom: 0;
	z-index: 1;
	padding-block: 10px;
	background: var(--dm-card);
	box-shadow: 0 -12px 12px -6px var(--dm-card);
}

.dm-gp__qty {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	height: 48px;
	border-radius: 999px;
	border: 1.5px solid var(--dm-border);
	background: var(--dm-card);
}

.dm-gp .dm-gp__step {
	width: 40px;
	height: 44px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 20px;
	color: var(--dm-text);
}

.dm-gp .dm-gp__step:disabled {
	opacity: 0.3;
	cursor: not-allowed;
}

.dm-gp__qtyval {
	min-width: 22px;
	text-align: center;
	font-size: 15px;
	font-weight: 600;
	font-variant-numeric: tabular-nums;
}

.dm-gp .dm-gp__add {
	flex: 1 1 auto;
	position: relative;
	min-height: 48px;
	padding: 0 22px;
	border-radius: 999px;
	background: var(--dm-btn-bg);
	color: var(--dm-btn-text);
	font-size: 15px;
	font-weight: 600;
	transition: background-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.dm-gp .dm-gp__add:hover:not(:disabled) {
	background: var(--dm-btn-hover-bg);
	color: var(--dm-btn-hover-text);
}

.dm-gp .dm-gp__add:active:not(:disabled) {
	transform: scale(0.98);
}

.dm-gp .dm-gp__add:disabled {
	background: var(--dm-surface);
	box-shadow: inset 0 0 0 1.5px var(--dm-border);
	color: var(--dm-muted);
	cursor: not-allowed;
}

.dm-gp .dm-gp__add.is-busy:disabled {
	background: var(--dm-btn-bg);
	color: var(--dm-btn-text);
	opacity: 0.75;
	cursor: progress;
}

.dm-gp a.dm-gp__more {
	display: block;
	margin-top: 4px;
	padding-bottom: 22px;
	text-align: center;
	font-size: 14px;
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 3px;
	border: 0;
	color: var(--dm-text-2);
}

.dm-gp a.dm-gp__more:hover {
	color: var(--dm-text);
}

@media (max-width: 640px) {
	.dm-gp {
		align-items: flex-end;
		padding: 0;
	}

	.dm-gp__dialog {
		max-width: none;
		max-height: 88vh;
		border-radius: 24px 24px 0 0;
		border-bottom: 0;
		padding: 22px 18px 0;
		transform: translateY(24px);
	}

	.dm-gp a.dm-gp__more {
		padding-bottom: calc(22px + env(safe-area-inset-bottom));
	}
}

@media (prefers-reduced-motion: reduce) {
	.dm-gp__backdrop,
	.dm-gp__dialog {
		transition: none;
	}
}


/* ---- Grind picker: product-page selector (icon tiles replace the native select) ---- */
select.dm-gp-native {
	display: none !important;
}

.dm-gp-inline {
	font-family: var(--dm-font);
	color: var(--dm-text);
	margin: 6px 0 8px;
}

.dm-gp-inline .dm-gp__opts {
	grid-template-columns: repeat(4, minmax(0, 1fr));
}

.dm-gp-inline .dm-gp__opt {
	padding: 16px 6px 13px;
}

.dm-gp-inline .dm-gp__opt-label {
	font-size: 13px;
	line-height: 1.4;
}

.dm-gp-inline .dm-gp__opts--dense {
	grid-template-columns: repeat(6, minmax(0, 1fr));
}

.dm-gp-inline .dm-gp__opts.dm-gp__opts--wide {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 641px) {
	.dm-gp-inline .dm-gp__opts[style*="--dm-gp-cols"] {
		grid-template-columns: repeat(var(--dm-gp-cols), minmax(0, 1fr));
	}
}

@media (max-width: 640px) {
	.dm-gp-inline .dm-gp__opts {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.dm-gp-inline .dm-gp__opts.dm-gp__opts--dense {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}

	/* ~73px tiles: tighter text so long words don't split mid-word */
	.dm-gp-inline .dm-gp__opts--dense .dm-gp__opt {
		padding-inline: 2px;
		font-size: 11px;
	}
}


/* =====================================================================
   CHECKOUT — PROCESSING OVERLAY
   Shown while the place-order request is in flight (markup + toggling in
   inc/cart.php). Our own layer because disable-wc-overlays.php removes
   every WooCommerce blockUI overlay sitewide.
   ===================================================================== */

.dm-processing {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 99990;
	align-items: center;
	justify-content: center;
	background: var(--dm-overlay);
	-webkit-backdrop-filter: blur(3px);
	backdrop-filter: blur(3px);
}

.dm-processing.is-active {
	display: flex;
}

.dm-processing__box {
	background: var(--dm-card);
	border: 1px solid var(--dm-border);
	border-radius: 24px;
	box-shadow: 0 24px 60px var(--dm-shadow);
	padding: 30px 38px 28px;
	margin: 0 20px;
	max-width: 360px;
	text-align: center;
	animation: dm-processing-in 0.18s ease-out;
}

.dm-processing__spin {
	display: inline-block;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	border: 3px solid var(--dm-border);
	border-top-color: var(--dm-accent);
	animation: dm-spin 0.7s linear infinite;
}

.dm-processing__title {
	font-family: var(--dm-font);
	font-size: 16px;
	font-weight: 700;
	color: var(--dm-text);
	margin: 16px 0 6px;
}

.dm-processing__sub {
	font-family: var(--dm-font);
	font-size: 14px;
	line-height: 1.5;
	color: var(--dm-muted);
	margin: 0;
}

@keyframes dm-spin {
	to { transform: rotate(360deg); }
}

@keyframes dm-processing-in {
	from { opacity: 0; transform: translateY(6px); }
	to   { opacity: 1; transform: translateY(0); }
}

/* =====================================================================
   COFFEE LOADERS — shared loading animations (dm-coffee-loader.js).
   Thirteen brew-themed loaders built from the grind-picker icon set;
   one is picked at random per use. Consumers: checkout processing
   overlay, grind picker modal. Caption via .dm-cl__text.
   ===================================================================== */

.dm-cl {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 64px;
}

.dm-cl__text {
	display: block;
	margin-top: 12px;
	font-family: var(--dm-font);
	font-size: 12.5px;
	line-height: 1.5;
	color: var(--dm-muted);
	text-align: center;
}

.dm-cl-ico path,
.dm-cl-ico ellipse,
.dm-cl-ico rect {
	fill: none;
	stroke: var(--dm-text);
	stroke-width: 1.5;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.dm-cl-ico [class] {
	transform-box: fill-box;
	transform-origin: center;
}

/* 1. espresso cup: steam rising red */
.dm-cl-esp .dm-cl-ico { width: 52px; height: 52px; }
.dm-cl-esp .st { stroke: var(--dm-accent); animation: dmcl-steamup 1.6s ease-in-out infinite; }
.dm-cl-esp .st + .st { animation-delay: 0.5s; }
@keyframes dmcl-steamup {
	0% { opacity: 0; transform: translateY(2.5px); }
	35% { opacity: 1; }
	100% { opacity: 0; transform: translateY(-3px); }
}

/* 2. bouncing beans */
.dm-cl-beans { display: inline-flex; gap: 10px; align-items: flex-end; height: 44px; }
.dm-cl-beans .dm-cl-ico { width: 18px; height: 18px; animation: dmcl-bean 0.85s ease-in-out infinite; }
.dm-cl-beans .dm-cl-ico:nth-child(2) { animation-delay: 0.14s; }
.dm-cl-beans .dm-cl-ico:nth-child(3) { animation-delay: 0.28s; }
.dm-cl-beans path, .dm-cl-beans ellipse { stroke: var(--dm-accent); stroke-width: 2; }
@keyframes dmcl-bean {
	0%, 100% { transform: translateY(0) rotate(40deg); }
	45% { transform: translateY(-16px) rotate(70deg); }
}

/* 3. spinning bean */
.dm-cl-beanspin .dm-cl-ico { width: 34px; height: 34px; animation: dmcl-beanspin 1.4s cubic-bezier(0.6, 0.1, 0.4, 0.9) infinite; }
.dm-cl-beanspin path, .dm-cl-beanspin ellipse { stroke: var(--dm-accent); stroke-width: 1.8; }
@keyframes dmcl-beanspin {
	0% { transform: rotate(0); }
	50% { transform: rotate(180deg) scale(0.85); }
	100% { transform: rotate(360deg); }
}

/* 4. bean orbit */
.dm-cl-orbit { position: relative; width: 52px; height: 52px; display: inline-block; animation: dmcl-spin 1.8s linear infinite; }
.dm-cl-orbit .dm-cl-ico { position: absolute; width: 15px; height: 15px; }
.dm-cl-orbit .dm-cl-ico:nth-child(1) { top: 0; left: 50%; margin-left: -7.5px; }
.dm-cl-orbit .dm-cl-ico:nth-child(2) { bottom: 3px; left: 2px; }
.dm-cl-orbit .dm-cl-ico:nth-child(3) { bottom: 3px; right: 2px; }
.dm-cl-orbit path, .dm-cl-orbit ellipse { stroke: var(--dm-accent); stroke-width: 2; }
.dm-cl-orbit .dm-cl-ico:nth-child(2) { opacity: .72; }
.dm-cl-orbit .dm-cl-ico:nth-child(3) { opacity: .5; }
@keyframes dmcl-spin { to { transform: rotate(360deg); } }

/* 5. bean row */
.dm-cl-row { display: inline-flex; gap: 9px; }
.dm-cl-row .dm-cl-ico { width: 15px; height: 15px; animation: dmcl-row 1.25s ease-in-out infinite; }
.dm-cl-row .dm-cl-ico:nth-child(2) { animation-delay: 0.12s; }
.dm-cl-row .dm-cl-ico:nth-child(3) { animation-delay: 0.24s; }
.dm-cl-row .dm-cl-ico:nth-child(4) { animation-delay: 0.36s; }
.dm-cl-row .dm-cl-ico:nth-child(5) { animation-delay: 0.48s; }
.dm-cl-row path, .dm-cl-row ellipse { stroke: var(--dm-accent); stroke-width: 2; }
@keyframes dmcl-row {
	0%, 100% { opacity: 0.22; transform: scale(0.85); }
	40% { opacity: 1; transform: scale(1.08); }
}

/* 6. V60 drip */
.dm-cl-v60 { position: relative; width: 60px; height: 60px; display: inline-block; }
.dm-cl-v60 .dm-cl-ico { width: 60px; height: 60px; }
.dm-cl-v60 .drop { position: absolute; top: 34px; left: 50%; width: 4px; height: 7px; margin-left: -2px; border-radius: 3px; background: var(--dm-accent); opacity: 0; animation: dmcl-drip 1.1s ease-in infinite; }
.dm-cl-v60 .drop + .drop { animation-delay: 0.55s; }
@keyframes dmcl-drip {
	0% { opacity: 0; transform: translateY(0) scaleY(0.7); }
	15% { opacity: 1; }
	80% { opacity: 1; transform: translateY(9px) scaleY(1.1); }
	100% { opacity: 0; transform: translateY(11px); }
}

/* 7. moka brew: red steam puffs */
.dm-cl-moka { position: relative; width: 64px; height: 64px; display: inline-block; }
.dm-cl-moka .dm-cl-ico { position: absolute; left: 14px; bottom: 0; width: 38px; height: 38px; }
.dm-cl-moka .puff { position: absolute; bottom: 44px; width: 5px; height: 5px; border-radius: 50%; background: var(--dm-accent); opacity: 0; animation: dmcl-puff 1.7s ease-out infinite; }
.dm-cl-moka .puff:nth-child(1) { left: 26px; }
.dm-cl-moka .puff:nth-child(2) { left: 33px; animation-delay: 0.55s; }
.dm-cl-moka .puff:nth-child(3) { left: 29px; animation-delay: 1.1s; }
@keyframes dmcl-puff {
	0% { opacity: 0; transform: translateY(4px) scale(0.6); }
	30% { opacity: 0.95; }
	100% { opacity: 0; transform: translateY(-14px) scale(1.25); }
}

/* 8. crema swirl: cup from above */
.dm-cl-swirl { position: relative; width: 46px; height: 46px; display: inline-block; }
.dm-cl-swirl .rim { position: absolute; inset: 0; border: 2.5px solid var(--dm-text); border-radius: 50%; }
.dm-cl-swirl .rim:after { content: ''; position: absolute; right: -12px; top: 50%; width: 9px; height: 12px; margin-top: -6px; border: 2.5px solid var(--dm-text); border-left: 0; border-radius: 0 7px 7px 0; }
.dm-cl-swirl .stir { position: absolute; inset: 8px; border: 3px solid transparent; border-top-color: var(--dm-accent); border-right-color: var(--dm-accent); border-right-color: color-mix(in srgb, var(--dm-accent) 35%, transparent); border-radius: 50%; animation: dmcl-spin 1s linear infinite; }
.dm-cl-swirl .dotc { position: absolute; left: 50%; top: 50%; width: 5px; height: 5px; margin: -2.5px 0 0 -2.5px; border-radius: 50%; background: var(--dm-accent); animation: dmcl-cpulse 1s linear infinite; }
@keyframes dmcl-cpulse {
	0%, 100% { transform: scale(0.7); opacity: 0.5; }
	50% { transform: scale(1.1); opacity: 1; }
}

/* grind picker modal: coffee loader replaces the plain ring */
.dm-gp__loading--coffee {
	width: auto;
	height: auto;
	border: 0;
	border-radius: 0;
	animation: none;
	margin: 40px auto;
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
}

/* page preloader: the shared coffee loaders, scaled up for the full-screen
   moment (the loaders' own child animations are unaffected by this wrapper
   transform) */
.dm-preloader .dm-cl {
	transform: scale(1.7);
	transform-origin: center bottom;
	margin-bottom: 20px;
}



/* =====================================================================
   QTY STEPPERS (markup from dm-product-ui.js) — dx pill look
   ===================================================================== */
:is(body.woocommerce-cart table.shop_table, body.single-product form.cart) .quantity.dm-qty {
	display: inline-flex;
	align-items: center;
	float: none;
	margin: 0;
	height: 52px;
	padding: 0 4px;
	border-radius: 999px;
	background: var(--dm-card);
	border: 1.5px solid var(--dm-border);
	box-shadow: none;
}

body.woocommerce-cart table.shop_table .quantity.dm-qty {
	height: 46px;
}

:is(body.woocommerce-cart table.shop_table, body.single-product form.cart) .quantity.dm-qty input.qty {
	width: 44px;
	height: 40px;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
	text-align: center;
	font-family: var(--dm-font);
	font-size: 16px;
	font-weight: 600;
	color: var(--dm-text);
	-moz-appearance: textfield;
	appearance: textfield;
}

:is(body.woocommerce-cart table.shop_table, body.single-product form.cart) .quantity.dm-qty input.qty::-webkit-outer-spin-button,
:is(body.woocommerce-cart table.shop_table, body.single-product form.cart) .quantity.dm-qty input.qty::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

:is(body.woocommerce-cart table.shop_table, body.single-product form.cart) .quantity.dm-qty .dm-qty__btn {
	-webkit-appearance: none;
	appearance: none;
	flex: 0 0 auto;
	width: 40px;
	height: 40px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	box-shadow: none;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--dm-text);
	cursor: pointer;
	transition: background-color 0.2s ease;
}

:is(body.woocommerce-cart table.shop_table, body.single-product form.cart) .quantity.dm-qty .dm-qty__btn svg {
	width: 18px;
	height: 18px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.8;
	stroke-linecap: round;
	stroke-linejoin: round;
}

:is(body.woocommerce-cart table.shop_table, body.single-product form.cart) .quantity.dm-qty .dm-qty__btn:hover:not(:disabled) {
	background: var(--dm-subtle);
}

:is(body.woocommerce-cart table.shop_table, body.single-product form.cart) .quantity.dm-qty .dm-qty__btn:focus-visible {
	outline: 3px solid var(--dm-focus);
	outline-offset: 1px;
}

:is(body.woocommerce-cart table.shop_table, body.single-product form.cart) .quantity.dm-qty .dm-qty__btn:disabled {
	opacity: 0.3;
	cursor: not-allowed;
}

/* Cart qty auto-update running (inc/cart.php): number fades under a thin ring,
   row subtotal dims. Stepper stays clickable — edits queue. */
body.woocommerce-cart table.shop_table tr.dm-qty-busy .quantity.dm-qty {
	position: relative;
}

body.woocommerce-cart table.shop_table tr.dm-qty-busy .quantity.dm-qty input.qty,
body.woocommerce-cart table.shop_table tr.dm-qty-busy td.product-subtotal {
	opacity: 0.4;
	transition: opacity 0.15s ease;
}

body.woocommerce-cart table.shop_table tr.dm-qty-busy .quantity.dm-qty::after {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	width: 18px;
	height: 18px;
	margin: -9px 0 0 -9px;
	border: 1.5px solid var(--dm-border);
	border-top-color: var(--dm-accent);
	border-radius: 50%;
	animation: dm-spin 0.7s linear infinite;
	pointer-events: none;
}

/* Last item removed: nothing left worth showing until the server's empty-cart
   view replaces it. !important: mu-plugin disable-wc-overlays forces
   .cross-sells styles with it. */
body.woocommerce-cart.dm-cart-emptying .woocommerce-cart-form,
body.woocommerce-cart.dm-cart-emptying .cart-collaterals,
body.woocommerce-cart.dm-cart-emptying .cross-sells {
	display: none !important;
}

@media (prefers-reduced-motion: reduce) {
	body.woocommerce-cart table.shop_table tr.dm-qty-busy .quantity.dm-qty::after {
		animation: none;
	}
}

/* =====================================================================
   ORDER-RECEIVED PAYMENT BANNER (inc/commerce.php)
   ===================================================================== */
.dm-pay-banner {
	background: var(--dm-card);
	border: 1px solid var(--dm-border);
	border-inline-start: 4px solid var(--dm-border);
	border-radius: 18px;
	padding: 20px 22px;
	margin: 0 0 28px;
}

.dm-pay-banner h3 {
	font-family: var(--dm-font);
	font-weight: 700;
	font-size: 20px;
	line-height: 1.3;
	color: var(--dm-text);
	margin: 0 0 8px;
	text-transform: none;
}

.dm-pay-banner p {
	font-family: var(--dm-font);
	font-size: 15px;
	line-height: 1.6;
	color: var(--dm-text-2);
	margin: 0;
}

/* status colours: fixed signal hues, readable as borders on both grounds */
.dm-pay-banner--confirmed {
	border-inline-start-color: var(--dm-ok);
}

.dm-pay-banner--pending {
	border-inline-start-color: var(--dm-warn);
}

.dm-pay-banner--failed,
.dm-pay-banner--cancelled {
	border-inline-start-color: var(--dm-accent);
}

.dm-pay-banner__retry.button {
	display: inline-flex;
	align-items: center;
	min-height: 48px;
	margin: 16px 0 0;
	background: var(--dm-btn-bg) !important; /* WooCommerce .button rules */
	color: var(--dm-btn-text) !important;
	border: 0 !important;
	border-radius: 999px !important;
	padding: 0 26px !important;
	font-family: var(--dm-font);
	font-size: 15px;
	font-weight: 600;
	line-height: 1;
	cursor: pointer;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.dm-pay-banner__retry.button:hover {
	background: var(--dm-btn-hover-bg) !important;
	color: var(--dm-btn-hover-text) !important;
}

.dm-pay-banner ~ h3.woocommerce-thankyou-order-received,
.dm-pay-banner ~ h3.woocommerce-thankyou-order-failed,
.dm-pay-banner ~ p.woocommerce-thankyou-order-failed-actions {
	display: none;
}

/* ---- login spinner (Theme My Login; class toggled in inc/ui.php) ---- */
.tml .tml-submit-wrap button.dm-loading {
	position: relative;
	color: transparent !important; /* hide the label under the spinner */
	pointer-events: none;
}

.tml .tml-submit-wrap button.dm-loading::after {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	width: 18px;
	height: 18px;
	margin: -9px 0 0 -9px;
	border-radius: 50%;
	border: 2px solid var(--dm-muted);
	border-top-color: var(--dm-btn-text);
	animation: dm-spin 0.6s linear infinite;
}

/* ---- page preloader shell (inc/ui.php) ---- */
html.dm-loading { overflow: hidden; }

.dm-preloader {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--dm-bg);
	transition: opacity 0.5s ease, visibility 0.5s ease;
}
.dm-no-pl .dm-preloader { display: none; }
.dm-preloader.is-done { opacity: 0; visibility: hidden; pointer-events: none; }

.dm-preloader__inner { display: flex; flex-direction: column; align-items: center; }
.dm-preloader__label {
	margin-top: 30px;
	font-family: var(--dm-font);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: var(--dm-muted);
	animation: dmPreloaderPulse 1.6s ease-in-out infinite;
}
@keyframes dmPreloaderPulse {
	0%, 100% { opacity: 0.45; }
	50% { opacity: 1; }
}
