/* Add-to-cart feedback — see includes/cart-feedback.php (plain CSS, not part of the SCSS build). */

/* Quantity "+" at max stock */
[data-qty-control] {
	position: relative;
}

[data-qty-control] [data-qty-plus].is-at-max {
	opacity: 0.35;
	cursor: not-allowed;
}

[data-qty-control]::after {
	content: attr(data-max-hint);
	position: absolute;
	left: 0;
	bottom: calc(100% + 8px);
	z-index: 20;
	width: max-content;
	max-width: 240px;
	padding: 8px 12px;
	background: #ffae9e;
	color: #821600;
	font-size: 13px;
	line-height: 1.35;
	text-align: left;
	white-space: normal;
	pointer-events: none;
	opacity: 0;
	visibility: hidden;
	transform: translateY(4px);
	transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
}

/* Mobile/tablet: qty sits at the right end of the size row, so grow the hint leftwards */
.product-variations__row--size [data-qty-control]::after {
	left: auto;
	right: 0;
	max-width: min(240px, calc(100vw - 32px));
}

[data-qty-control]:not([data-max-hint])::after,
[data-qty-control][data-max-hint=""]::after {
	display: none;
}

[data-qty-control].is-hint-visible::after {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

@media (hover: hover) {
	[data-qty-control]:has([data-qty-plus].is-at-max:hover)::after {
		opacity: 1;
		visibility: visible;
		transform: translateY(0);
	}
}

/* Inline add-to-cart error on the product page */
.nautical-atc-notice {
	width: 100%;
	margin-top: 12px;
	padding: 12px 16px;
	font-size: 14px;
	line-height: 1.4;
}

.nautical-atc-notice--error {
	background: #ffae9e;
	color: #821600;
}

.nautical-atc-notice__link {
	color: inherit;
	font-weight: 600;
	text-decoration: underline;
	white-space: nowrap;
}

/* The inline notice replaces the side cart's 2 s slide-in on product pages */
.single-product .xoo-wsc-markup-notices {
	display: none !important;
}
