/* ============================================================
	Toasts
	Shared by admin pages, the Ops board and Hopper (which loads this file and
	assets/js/toast.js from the main domain). Self-contained on purpose: no
	site variables, fonts or icon set, so any page can include it. Pages with
	a fixed header of their own move the stack below it (standalone.css does
	this for Ops).
============================================================ */
.admin-toast-stack {
	display: flex;
	flex-direction: column;
	gap: 10px;
	pointer-events: none;
	position: fixed;
	right: 22px;
	top: 22px;
	width: min(340px, calc(100vw - 44px));
	z-index: 2000;
}

.admin-toast {
	background: #ffffff;
	border: 1px solid rgba(15, 23, 42, 0.1);
	border-radius: 14px;
	box-shadow: 0 14px 34px rgba(15, 23, 42, 0.16);
	overflow: hidden;
	pointer-events: auto;
	transition: opacity 0.25s ease, transform 0.25s ease;
}

.admin-toast-body {
	align-items: flex-start;
	display: flex;
	gap: 12px;
	justify-content: space-between;
}

.admin-toast-message {
	color: #111827;
	flex: 1 1 auto;
	font-size: 0.875rem;
	font-weight: 700;
	line-height: 1.45;
	padding: 13px 14px 11px;
}

.admin-toast-close {
	align-items: center;
	background: transparent;
	border: 0;
	border-radius: 999px;
	color: #667085;
	cursor: pointer;
	display: inline-flex;
	flex: 0 0 auto;
	height: 30px;
	justify-content: center;
	margin: 7px 7px 0 0;
	padding: 0;
	width: 30px;
}

.admin-toast-close svg {
	height: 14px;
	width: 14px;
}

.admin-toast-close:hover,
.admin-toast-close:focus-visible {
	background: rgba(15, 23, 42, 0.06);
	color: #111827;
	outline: none;
}

.admin-toast-progress {
	animation: admin-toast-progress linear forwards;
	background: #2563eb;
	height: 3px;
	transform-origin: left;
}

.admin-toast-success .admin-toast-progress {
	background: #16a34a;
}

.admin-toast-error .admin-toast-progress {
	background: #dc2626;
}

.admin-toast-warning .admin-toast-progress {
	background: #d97706;
}

.admin-toast-info .admin-toast-progress {
	background: #2563eb;
}

.admin-toast-hiding {
	opacity: 0;
	transform: translateX(18px);
}

@keyframes admin-toast-progress {
	from { transform: scaleX(1); }
	to { transform: scaleX(0); }
}

@media (max-width: 991.98px) {
	.admin-toast-stack {
		left: 16px;
		right: 16px;
		top: calc(16px + env(safe-area-inset-top));
		width: auto;
	}
}

@media (prefers-reduced-motion: reduce) {
	.admin-toast,
	.admin-toast-progress {
		animation: none;
		transition: none;
	}
}
