/* ==========================================================================
   WOOCOMMERCE NOTICES -> TOAST STYLE
   ==========================================================================
   WooCommerce notices (add-to-cart success, stock validation errors, etc.)
   are relocated by assets/js/toast-notices.js into a single fixed container
   so they float top-right on every page (product, cart, checkout, shop —
   whichever wrapper or lack of wrapper WooCommerce happens to use), instead
   of rendering inline and pushing content down.

   The checkout "Have a coupon?" / "Returning customer?" toggle banners use
   the same underlying `.woocommerce-info` markup but are intentionally left
   alone by the JS (see the exclusion list there) and restyled separately,
   below, as a compact inline pill instead of a toast.
   ========================================================================== */

/* Hide every raw notice the instant CSS loads (before the relocating JS runs)
   so there's no flash of the old inline banner before the toast appears. */
.woocommerce-message,
.woocommerce-error,
.woocommerce-info,
ul.woocommerce-error {
	position: absolute;
	top: -9999px;
	left: -9999px;
	visibility: hidden;
}

.woocommerce-form-coupon-toggle .woocommerce-info,
.woocommerce-form-login-toggle .woocommerce-info,
.camfortmall-toast-stack .woocommerce-message,
.camfortmall-toast-stack .woocommerce-error,
.camfortmall-toast-stack .woocommerce-info,
.camfortmall-toast-stack ul.woocommerce-error {
	position: relative;
	top: auto;
	left: auto;
	visibility: visible;
}

.camfortmall-toast-stack {
	position: fixed;
	top: 96px;
	right: 20px;
	z-index: 99999;
	display: flex;
	flex-direction: column;
	gap: 10px;
	width: 100%;
	max-width: 360px;
	pointer-events: none;
}

.camfortmall-toast-stack > * {
	pointer-events: auto;
	position: relative;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 12px;
	border: none !important;
	border-left: 4px solid #6b7280 !important;
	border-radius: 12px !important;
	padding: 14px 40px 14px 18px !important;
	margin: 0 !important;
	font-size: 13.5px;
	font-weight: 600;
	line-height: 1.5;
	list-style: none !important;
	background: #ffffff !important;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12) !important;
	outline: none !important;
	box-sizing: border-box !important;
	animation: camfortmall-toast-in 0.25s ease-out;
}

/* Strip default WooCommerce / Storefront absolute pseudo-element icons
   (e.g. the "i" info icon) so they never overlap the notice text. */
.camfortmall-toast-stack > *::before,
.camfortmall-toast-stack > *::after,
.woocommerce-form-coupon-toggle .woocommerce-info::before,
.woocommerce-form-coupon-toggle .woocommerce-info::after,
.woocommerce-form-login-toggle .woocommerce-info::before,
.woocommerce-form-login-toggle .woocommerce-info::after {
	display: none !important;
	content: none !important;
}

.camfortmall-toast-stack .woocommerce-message,
.camfortmall-toast-stack .woocommerce-message *,
.camfortmall-toast-stack .woocommerce-message li,
.camfortmall-toast-stack .woocommerce-message p,
.camfortmall-toast-stack .woocommerce-message a:not(.wc-forward) {
	color: #00a32a !important;
	border-left-color: #00a32a !important;
}

.camfortmall-toast-stack .woocommerce-error,
.camfortmall-toast-stack .woocommerce-error *,
.camfortmall-toast-stack .woocommerce-error li,
.camfortmall-toast-stack .woocommerce-error p,
.camfortmall-toast-stack .woocommerce-error a:not(.wc-forward) {
	color: #d63638 !important;
	border-left-color: #d63638 !important;
}

.camfortmall-toast-stack .woocommerce-info,
.camfortmall-toast-stack .woocommerce-info *,
.camfortmall-toast-stack .woocommerce-info li,
.camfortmall-toast-stack .woocommerce-info p,
.camfortmall-toast-stack .woocommerce-info a:not(.wc-forward) {
	color: #2271b1 !important;
	border-left-color: #2271b1 !important;
}

.camfortmall-toast-stack li,
.camfortmall-toast-stack p {
	list-style: none !important;
	margin: 0 !important;
	padding: 0 !important;
	display: inline !important;
}

.camfortmall-toast-stack .button.wc-forward {
	flex-shrink: 0;
	order: 2;
	background: #f6f7f7 !important;
	color: #1d2327 !important;
	border: none !important;
	border-radius: 999px;
	padding: 6px 14px;
	font-size: 12.5px;
	font-weight: 600;
	white-space: nowrap;
}

.camfortmall-toast-stack .button.wc-forward:hover {
	background: #e9e9ea !important;
	color: #1d2327 !important;
}

.camfortmall-toast-text {
	flex: 1 1 100%;
	overflow: hidden;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}

.camfortmall-toast-text.is-expanded {
	-webkit-line-clamp: unset;
	display: block;
}

.camfortmall-toast-readmore {
	flex: 0 0 auto;
	border: none;
	background: none;
	padding: 0;
	font-size: 12px;
	font-weight: 700;
	text-decoration: underline;
	cursor: pointer;
	color: inherit;
	opacity: 0.8;
}

.camfortmall-toast-readmore:hover {
	opacity: 1;
}

.camfortmall-toast-close {
	position: absolute;
	top: 8px;
	right: 10px;
	border: none;
	background: none;
	font-size: 16px;
	line-height: 1;
	color: #6b7280;
	cursor: pointer;
	padding: 4px;
}

.camfortmall-toast-close:hover {
	color: #1d2327;
}

.camfortmall-toast-stack > .camfortmall-toast-out {
	animation: camfortmall-toast-out 0.2s ease-in forwards;
}

@keyframes camfortmall-toast-in {
	from {
		opacity: 0;
		transform: translateX(24px);
	}
	to {
		opacity: 1;
		transform: translateX(0);
	}
}

@keyframes camfortmall-toast-out {
	from {
		opacity: 1;
		transform: translateX(0);
	}
	to {
		opacity: 0;
		transform: translateX(24px);
	}
}

@media (max-width: 480px) {
	.camfortmall-toast-stack {
		right: 10px;
		left: 10px;
		max-width: none;
		width: auto;
	}
}

/* ==========================================================================
   CHECKOUT "HAVE A COUPON?" / "RETURNING CUSTOMER?" TOGGLE — compact pill
   instead of the default full-width banner.
   ========================================================================== */

.woocommerce-form-coupon-toggle,
.woocommerce-form-login-toggle {
	margin: 0 0 16px;
}

.woocommerce-form-coupon-toggle .woocommerce-info,
.woocommerce-form-login-toggle .woocommerce-info {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	width: auto;
	background: #f6f7f7;
	border: 1px solid #e5e7eb;
	border-radius: 999px;
	padding: 8px 16px;
	margin: 0;
	font-size: 12.5px;
	color: #50575e;
	list-style: none;
}

.woocommerce-form-coupon-toggle .showcoupon,
.woocommerce-form-login-toggle .showlogin {
	font-weight: 600;
	color: var(--color-success, #00a32a);
	text-decoration: underline;
}
