html {
	width: 100dvw;
	height: 100dvh;
}

/* Fixed container at the bottom-right */
#toast-container {
	position: fixed;
	bottom: 1em;
	right: 1em;
	z-index: 9999;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	pointer-events: none;
	/* Prevents blocking clicks underneath */
}

/* Base Toast Style */
.toast {
	pointer-events: auto;
	padding: 0.75rem 1.25rem;
	border-radius: 6px;
	color: #fff;
	font-weight: 500;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);

	/* Run the auto-dismiss animation */
	animation: toast-fade 5s forwards;
}

.toast-success {
	background-color: #10B981;
}

.toast-error {
	background-color: #EF4444;
}

/* 4-second lifecycle: Slide in -> Hold -> Fade out -> Hide */
@keyframes toast-fade {
	0% {
		opacity: 0;
		transform: translateY(20px);
	}

	10% {
		opacity: 1;
		transform: translateY(0);
	}

	90% {
		opacity: 1;
		transform: translateY(0);
	}

	100% {
		opacity: 0;
		transform: translateY(-10px);
		display: none;
		/* Collapses element visually at the end */
	}
}

.htmx-request #errors {
	display: none;
}