/* Atomic Addons - Min/Max Quantities storefront */

.atomel-minmax-active {
	--atomel-minmax-text: #172033;
	--atomel-minmax-muted: #647084;
	--atomel-minmax-border: #dfe4ec;
	--atomel-minmax-surface: #fff;
	--atomel-minmax-danger: #e23d62;
	--atomel-minmax-danger-soft: #fff5f7;
	--atomel-minmax-notice: #b76e00;
	--atomel-minmax-notice-soft: #fffbeb;
}

/* Validation notices */
.atomel-minmax-active .woocommerce-error:has(.atomel-minmax-notice),
.atomel-minmax-active .woocommerce-info:has(.atomel-minmax-notice),
.atomel-minmax-active .woocommerce-message:has(.atomel-minmax-notice) {
	box-sizing: border-box;
	margin: 0 0 20px;
	padding: 14px 16px !important;
	color: var(--atomel-minmax-text);
	background: var(--atomel-minmax-surface);
	border: 1px solid var(--atomel-minmax-border) !important;
	border-radius: 12px;
	box-shadow: 0 8px 28px rgba(15, 23, 42, 0.07);
	font-size: 14px;
	line-height: 1.5;
}

.atomel-minmax-active .woocommerce-error:has(.atomel-minmax-notice)::before,
.atomel-minmax-active .woocommerce-info:has(.atomel-minmax-notice)::before,
.atomel-minmax-active .woocommerce-message:has(.atomel-minmax-notice)::before {
	display: none;
}

.atomel-minmax-active .woocommerce-error:has(.atomel-minmax-notice) {
	background: var(--atomel-minmax-danger-soft);
	border-color: rgba(226, 61, 98, 0.2) !important;
}

.atomel-minmax-active .woocommerce-info:has(.atomel-minmax-notice),
.atomel-minmax-active .woocommerce-message:has(.atomel-minmax-notice) {
	background: var(--atomel-minmax-notice-soft);
	border-color: rgba(183, 110, 0, 0.2) !important;
}

.atomel-minmax-active .woocommerce-error:has(.atomel-minmax-notice) li {
	margin: 0;
	padding: 0;
}

.atomel-minmax-notice {
	display: flex;
	align-items: flex-start;
	gap: 11px;
	width: 100%;
	color: var(--atomel-minmax-text);
	font-weight: 500;
}

.atomel-minmax-notice__icon {
	display: inline-flex;
	flex: 0 0 24px;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	margin-top: -1px;
	color: #fff;
	background: var(--atomel-minmax-notice);
	border-radius: 999px;
	font-size: 13px;
	font-weight: 700;
	line-height: 1;
}

.atomel-minmax-notice__icon::before {
	content: "!";
}

.atomel-minmax-notice--error .atomel-minmax-notice__icon {
	background: var(--atomel-minmax-danger);
}

.atomel-minmax-notice__text {
	flex: 1;
	min-width: 0;
}

/* WooCommerce Cart and Checkout blocks */
.atomel-minmax-active .wc-block-components-notice-banner:has(.atomel-minmax-notice) {
	position: relative;
	display: flex;
	align-items: center;
	gap: 12px;
	min-height: 58px;
	margin: 0 0 22px;
	padding: 13px 52px 13px 16px !important;
	color: var(--atomel-minmax-text) !important;
	background: var(--atomel-minmax-danger-soft) !important;
	border: 1px solid rgba(226, 61, 98, 0.2) !important;
	border-radius: 12px !important;
	box-shadow: 0 8px 26px rgba(15, 23, 42, 0.06);
	font-size: 14px;
	font-weight: 500;
	line-height: 1.5;
}

.atomel-minmax-active .wc-block-components-notice-banner:has(.atomel-minmax-notice) > svg {
	flex: 0 0 22px;
	width: 22px;
	height: 22px;
	margin: 0;
	fill: var(--atomel-minmax-danger);
}

.atomel-minmax-active .wc-block-components-notice-banner:has(.atomel-minmax-notice) .wc-block-components-notice-banner__content {
	flex: 1;
	min-width: 0;
	padding: 0 !important;
}

.atomel-minmax-active .wc-block-components-notice-banner:has(.atomel-minmax-notice) .atomel-minmax-notice {
	display: block;
	font-weight: inherit;
}

.atomel-minmax-active .wc-block-components-notice-banner:has(.atomel-minmax-notice) .atomel-minmax-notice__icon {
	display: none;
}

.atomel-minmax-active .wc-block-components-notice-banner:has(.atomel-minmax-notice) .wc-block-components-notice-banner__dismiss {
	position: absolute;
	top: 50%;
	right: 12px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	min-width: 30px;
	height: 30px;
	min-height: 30px;
	margin: 0;
	padding: 0 !important;
	color: var(--atomel-minmax-muted) !important;
	background: transparent !important;
	border: 0 !important;
	border-radius: 999px !important;
	box-shadow: none !important;
	opacity: 0.78;
	transform: translateY(-50%);
	transition: color 0.18s ease, background-color 0.18s ease, opacity 0.18s ease;
}

.atomel-minmax-active .wc-block-components-notice-banner:has(.atomel-minmax-notice) .wc-block-components-notice-banner__dismiss:hover {
	color: var(--atomel-minmax-text) !important;
	background: rgba(226, 61, 98, 0.08) !important;
	opacity: 1;
}

/* Product and cart quantity controls */
.atomel-minmax-active .woocommerce .quantity {
	display: inline-flex;
	align-items: stretch;
	min-height: 46px;
	margin: 0;
	background: var(--atomel-minmax-surface);
	border: 1px solid var(--atomel-minmax-border);
	border-radius: 10px;
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
	overflow: hidden;
	transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.atomel-minmax-active .woocommerce .quantity:focus-within {
	border-color: rgba(226, 61, 98, 0.55);
	box-shadow: 0 0 0 3px rgba(226, 61, 98, 0.1);
}

.atomel-minmax-active .woocommerce .quantity .qty {
	width: 70px;
	min-width: 0;
	min-height: 44px;
	margin: 0 !important;
	padding: 0 10px !important;
	color: var(--atomel-minmax-text);
	background: transparent !important;
	border: 0 !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	font-size: 14px;
	font-weight: 600;
	line-height: 44px;
	text-align: center;
}

.atomel-minmax-active .woocommerce .quantity .qty:focus {
	outline: 0;
}

.atomel-minmax-active .woocommerce .quantity .qty:disabled {
	color: var(--atomel-minmax-muted);
	cursor: not-allowed;
	opacity: 0.65;
}

.atomel-minmax-active .woocommerce .quantity .minus,
.atomel-minmax-active .woocommerce .quantity .plus {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	min-width: 38px;
	min-height: 44px;
	margin: 0;
	padding: 0;
	color: var(--atomel-minmax-muted);
	background: #f8fafc;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	font-size: 17px;
	font-weight: 500;
	line-height: 1;
	cursor: pointer;
	transition: color 0.18s ease, background-color 0.18s ease;
}

.atomel-minmax-active .woocommerce .quantity .minus:hover,
.atomel-minmax-active .woocommerce .quantity .plus:hover {
	color: var(--atomel-minmax-text);
	background: #f1f5f9;
}

/* Block-based cart quantity selector */
.atomel-minmax-active .wc-block-components-quantity-selector {
	display: inline-flex;
	align-items: stretch;
	width: 112px;
	height: 42px;
	min-height: 42px;
	margin: 0;
	color: var(--atomel-minmax-text);
	background: var(--atomel-minmax-surface);
	border: 1px solid var(--atomel-minmax-border) !important;
	border-radius: 10px !important;
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
	overflow: hidden;
	transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.atomel-minmax-active .wc-block-components-quantity-selector::after {
	display: none !important;
}

.atomel-minmax-active .wc-block-components-quantity-selector:focus-within {
	border-color: rgba(226, 61, 98, 0.55) !important;
	box-shadow: 0 0 0 3px rgba(226, 61, 98, 0.1);
}

.atomel-minmax-active .wc-block-components-quantity-selector input.wc-block-components-quantity-selector__input {
	flex: 1 1 auto;
	order: 2;
	width: 42px;
	min-width: 42px;
	height: 40px;
	min-height: 40px;
	margin: 0;
	padding: 0 !important;
	color: var(--atomel-minmax-text);
	background: transparent !important;
	border: 0 !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	font-size: 14px;
	font-weight: 650;
	line-height: 40px;
	text-align: center;
}

.atomel-minmax-active .wc-block-components-quantity-selector .wc-block-components-quantity-selector__button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	min-width: 34px;
	height: 40px;
	min-height: 40px;
	margin: 0;
	padding: 0 !important;
	color: var(--atomel-minmax-muted) !important;
	background: transparent !important;
	border: 0 !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	font-size: 16px;
	font-weight: 500;
	line-height: 1;
	opacity: 1;
	transition: color 0.18s ease, background-color 0.18s ease;
}

.atomel-minmax-active .wc-block-components-quantity-selector .wc-block-components-quantity-selector__button:hover {
	color: var(--atomel-minmax-text) !important;
	background: #f6f8fb !important;
}

.atomel-minmax-active .wc-block-components-quantity-selector .wc-block-components-quantity-selector__button:focus-visible {
	outline: 2px solid rgba(226, 61, 98, 0.45);
	outline-offset: -3px;
}

.atomel-minmax-active .wc-block-components-quantity-selector .wc-block-components-quantity-selector__button:disabled {
	cursor: not-allowed;
	opacity: 0.38;
}

@media (max-width: 480px) {
	.atomel-minmax-active .woocommerce-error:has(.atomel-minmax-notice),
	.atomel-minmax-active .woocommerce-info:has(.atomel-minmax-notice),
	.atomel-minmax-active .woocommerce-message:has(.atomel-minmax-notice) {
		padding: 12px 13px !important;
		border-radius: 10px;
		font-size: 13px;
	}

	.atomel-minmax-active .woocommerce .quantity {
		min-height: 44px;
	}

	.atomel-minmax-active .woocommerce .quantity .qty {
		min-height: 42px;
		line-height: 42px;
	}

	.atomel-minmax-active .wc-block-components-notice-banner:has(.atomel-minmax-notice) {
		min-height: 54px;
		padding: 12px 46px 12px 13px !important;
		border-radius: 10px !important;
		font-size: 13px;
	}

	.atomel-minmax-active .wc-block-components-notice-banner:has(.atomel-minmax-notice) .wc-block-components-notice-banner__dismiss {
		right: 9px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.atomel-minmax-active .woocommerce .quantity,
	.atomel-minmax-active .woocommerce .quantity .minus,
	.atomel-minmax-active .woocommerce .quantity .plus,
	.atomel-minmax-active .wc-block-components-quantity-selector,
	.atomel-minmax-active .wc-block-components-quantity-selector .wc-block-components-quantity-selector__button,
	.atomel-minmax-active .wc-block-components-notice-banner:has(.atomel-minmax-notice) .wc-block-components-notice-banner__dismiss {
		transition: none;
	}
}
