/**
 * Toast: .mk-toast (templates/components/toast.php, D-92).
 *
 * Centred above the bottom of the window, over the page and the cookie banner
 * (dialogs stay on top); success colours, or error colours with
 * .mk-toast--error. Tokens: theme.json `custom.toast`, `custom.color.toast`.
 */

.mk-toast-region {
	position: fixed;
	inset-inline: 0;
	inset-block-end: var(--wp--custom--toast--offset);
	z-index: var(--wp--custom--toast--z-index);
	display: flex;
	justify-content: center;
	padding-inline: var(--wp--custom--toast--offset);
	pointer-events: none;
}

.mk-toast-region--inline {
	position: static;
	justify-content: start;
	padding-inline: 0;
}

.mk-toast {
	box-sizing: border-box;
	max-inline-size: var(--wp--custom--toast--max-width);
	padding-block: var(--wp--custom--toast--padding-block);
	padding-inline: var(--wp--custom--toast--padding-inline);
	border-radius: var(--wp--custom--toast--radius);
	background: var(--wp--custom--color--toast--background);
	box-shadow: var(--wp--custom--toast--shadow);
	color: var(--wp--custom--color--toast--text);
	pointer-events: auto;
	animation: mk-toast-in var(--wp--custom--motion--duration--base)
		var(--wp--custom--motion--easing--standard);
}

.mk-toast[hidden] {
	display: none;
}

.mk-toast--error {
	background: var(--wp--custom--color--toast--error-background);
	color: var(--wp--custom--color--toast--error-text);
}

.mk-toast__message {
	margin: 0;
	font-family: var(--wp--custom--text--body-medium--font-family);
	font-size: var(--wp--custom--text--body-medium--font-size);
	font-weight: var(--wp--custom--text--body-medium--font-weight);
	line-height: var(--wp--custom--text--body-medium--line-height);
	letter-spacing: var(--wp--custom--text--body-medium--letter-spacing);
	text-align: center;
}

@keyframes mk-toast-in {
	from {
		opacity: 0;
		transform: translateY(var(--wp--custom--toast--offset));
	}
}

@media (prefers-reduced-motion: reduce) {
	.mk-toast {
		animation: none;
	}
}
