/* Form answer (ahan-form-toast) — the notice forms.js shows at the bottom of the screen after a send.
   Fixed, so it never changes the layout of the form it answers. Logical properties only. */
.ahan-form-toast {
	position: fixed;
	inset-block-end: 24px;
	inset-inline: 16px;
	z-index: 100000;
	display: flex;
	align-items: center;
	gap: 12px;
	width: fit-content;
	max-width: min(92vw, 440px);
	margin-inline: auto;
	padding: 12px 16px;
	border-inline-start: 4px solid var(--c-primary);
	border-radius: var(--radius-sm);
	background: var(--c-surface, #fff);
	box-shadow: 0 8px 28px rgba(0, 0, 0, 0.2);
	color: var(--c-text, #1f1f1f);
	font-size: var(--fs-sm);
	line-height: var(--lh-body);
	opacity: 0;
	translate: 0 12px;
	transition: opacity var(--dur) var(--ease), translate var(--dur) var(--ease);
	pointer-events: none;
}

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

.ahan-form-toast.is-visible {
	opacity: 1;
	translate: none;
	pointer-events: auto;
}

.ahan-form-toast--ok {
	border-inline-start-color: #0a7a35;
}

.ahan-form-toast--ok::before {
	content: '✓';
	color: #0a7a35;
	font-weight: var(--fw-bold);
}

.ahan-form-toast--error {
	border-inline-start-color: var(--c-accent);
}

.ahan-form-toast--error::before {
	content: '!';
	color: var(--c-accent);
	font-weight: var(--fw-bold);
}

.ahan-form-toast__close {
	margin-inline-start: auto;
	padding: 2px 4px;
	border: 0;
	background: none;
	color: var(--c-text-muted);
	cursor: pointer;
	font-size: var(--fs-xs);
}

[aria-invalid="true"] {
	outline: 2px solid var(--c-accent);
	outline-offset: 1px;
}

form[data-busy] button[type="submit"] {
	opacity: .7;
	cursor: progress;
}

@media (prefers-reduced-motion: reduce) {
	.ahan-form-toast {
		transition-duration: .01ms;
	}
}
