/* Quantity guard (store-profile feature "qty_limit") - visual half of
   assets/buy-now-js/qty-guard.js. Loaded on storefront pages only while the
   per-order quantity limit is on. */

/* A greyed-out - / + : at the minimum (1) or at the maximum (the order limit).
   Covers Blocksy's steppers (.ct-increase / .ct-decrease, on the product page and
   in the side cart) and this plugin's cart-page stepper (.wd-ncart-qty-btn). */
.quantity .ct-increase.wd-qty-disabled,
.quantity .ct-decrease.wd-qty-disabled,
.wd-ncart-qty .wd-ncart-qty-btn.wd-qty-disabled {
	opacity: .3;
	cursor: not-allowed;
	background: transparent;
	box-shadow: none;
}
.quantity .ct-increase.wd-qty-disabled:hover,
.quantity .ct-decrease.wd-qty-disabled:hover,
.wd-ncart-qty .wd-ncart-qty-btn.wd-qty-disabled:hover {
	background: transparent;
	color: inherit;
}

/* The number itself is not typed into. */
.quantity input.qty[readonly],
.wd-ncart-qty input.qty[readonly] {
	cursor: default;
	caret-color: transparent;
	-moz-appearance: textfield;
	appearance: textfield;
}
.quantity input.qty[readonly]::-webkit-inner-spin-button,
.quantity input.qty[readonly]::-webkit-outer-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

/* "You can order at most N ..." when a greyed-out + is pressed */
.wd-qg-toast {
	display: flex;
	align-items: center;
	gap: 10px;
	position: fixed;
	left: 50%;
	top: 50%;
	z-index: 2147483000; /* above the theme's off-canvas panels (side cart, menu) */
	/* Size to the text (a fixed element centred with left:50% is only offered half
	   the screen, which made this toast wrap into a narrow column). */
	width: max-content;
	max-width: min(440px, calc(100vw - 32px));
	box-sizing: border-box;
	padding: 12px 18px;
	background: #1f2937;
	color: #fff;
	font-size: 14px;
	line-height: 1.4;
	border-radius: 10px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, .25);
	transform: translate(-50%, calc(-50% + 16px));
	opacity: 0;
	pointer-events: none;
	transition: opacity .2s ease, transform .2s ease;
}
.wd-qg-toast::before {
	content: "";
	flex: none;
	width: 22px;
	height: 22px;
	background-color: #fbbf24;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='black'%3E%3Cellipse cx='4.6' cy='11' rx='2' ry='2.7' transform='rotate(-20 4.6 11)'/%3E%3Cellipse cx='9' cy='5.9' rx='2.1' ry='2.9' transform='rotate(-8 9 5.9)'/%3E%3Cellipse cx='15' cy='5.9' rx='2.1' ry='2.9' transform='rotate(8 15 5.9)'/%3E%3Cellipse cx='19.4' cy='11' rx='2' ry='2.7' transform='rotate(20 19.4 11)'/%3E%3Cpath d='M12 11.2c-3 0-6 2.8-6 5.6 0 2 1.5 3.2 3.2 3.2 1 0 1.8-.5 2.8-.5s1.8.5 2.8.5c1.7 0 3.2-1.2 3.2-3.2 0-2.8-3-5.6-6-5.6z'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='black'%3E%3Cellipse cx='4.6' cy='11' rx='2' ry='2.7' transform='rotate(-20 4.6 11)'/%3E%3Cellipse cx='9' cy='5.9' rx='2.1' ry='2.9' transform='rotate(-8 9 5.9)'/%3E%3Cellipse cx='15' cy='5.9' rx='2.1' ry='2.9' transform='rotate(8 15 5.9)'/%3E%3Cellipse cx='19.4' cy='11' rx='2' ry='2.7' transform='rotate(20 19.4 11)'/%3E%3Cpath d='M12 11.2c-3 0-6 2.8-6 5.6 0 2 1.5 3.2 3.2 3.2 1 0 1.8-.5 2.8-.5s1.8.5 2.8.5c1.7 0 3.2-1.2 3.2-3.2 0-2.8-3-5.6-6-5.6z'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
}
.wd-qg-toast-show {
	opacity: 1;
	transform: translate(-50%, -50%);
}
@media (prefers-reduced-motion: reduce) {
	.wd-qg-toast { transition: none; }
}
