/* Toasts — assets/js/toast.js (`window.ankerToast( text, { type, action } )`), on every page.
   A stack at the bottom centre, shown as a manual popover (top layer: above an open side cart's backdrop).
   Dark card, white text; a 22px circle at the start: green check (success) / red «!» (error) / blue «i» (info);
   the next step as orange text with «←»; wraps past 560px; errors stay longer and get a close button. Every
   WooCommerce notice is shown this way (toast.js turns them into toasts). */
.toast-stack {
	position: fixed;
	inset: auto auto var(--sp-24) 50%;
	z-index: 1000;
	translate: -50% 0;
	display: grid;
	justify-items: center;
	gap: var(--sp-8);
	width: max-content;
	max-width: calc(100vw - 32px);
	margin: 0;
	padding: 0;
	border: 0;
	overflow: visible;
	background: none;
}
.toast {
	--toast-icon: var(--c-success);
	--toast-glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E");
	display: flex;
	align-items: center;
	gap: var(--sp-8);
	max-width: min(560px, calc(100vw - 32px));
	padding: var(--sp-12) var(--sp-16);
	border-radius: var(--r-16);
	color: var(--n-100);
	background: var(--n-10);
	box-shadow: 0 10px 30px rgb(0 0 0 / .2);
	font-size: var(--fs-body-m);
	line-height: 1.7;
	-webkit-font-smoothing: antialiased; /* light text on dark: avoids the heavy, glowing look of subpixel smoothing */
	-moz-osx-font-smoothing: grayscale;
	animation: toast-in .25s ease-out;
	transition: opacity .3s, translate .3s;
}
.toast--error { --toast-icon: var(--c-danger); --toast-glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M12 6.5v7M12 17.5v.5'/%3E%3C/svg%3E") }
.toast--info { --toast-icon: var(--blue); --toast-glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M12 11v6M12 7.5v.5'/%3E%3C/svg%3E"); }
.toast::before { content: ""; flex: none; align-self: flex-start; width: 22px; height: 22px; margin-block: 2px; border-radius: var(--r-pill); background: var(--toast-icon) var(--toast-glyph) center / 13px no-repeat; }
.toast__text { flex: 1; min-width: 0; white-space: pre-line; } /* several errors = one line each */
.toast .toast__action { flex: none; display: inline-flex; align-items: center; gap: 4px; margin-inline-start: var(--sp-8); color: var(--orange-hover); font-size: var(--fs-body-m); font-weight: 600; white-space: nowrap; } /* a touch deeper and lighter weight: bright bold orange "blooms" on the dark toast */
.toast .toast__action::after { content: "←"; transition: translate .2s; }
.toast .toast__action:hover { color: var(--orange); text-decoration: none; } /* hover = brighter colour + the arrow nudge, no underline */
.toast .toast__action:hover::after { translate: -3px 0; }
.toast__close { flex: none; display: grid; place-items: center; width: 28px; height: 28px; margin-inline-start: 4px; padding: 0; border: 0; border-radius: 50%; color: rgb(255 255 255 / .6); background: none; cursor: pointer; }
.toast__close:hover { color: var(--n-100); background: rgb(255 255 255 / .1); }
.toast__close .icon { font-size: 14px; }
.toast.is-gone { opacity: 0; translate: 0 12px; }
@keyframes toast-in { from { opacity: 0; translate: 0 12px; } }
@media (prefers-reduced-motion: reduce) { .toast { animation: none; transition: none; } }
