/* Centered toast notifications (EMS app) */
.ems-toast-container {
	position: fixed;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	z-index: 10050;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
	pointer-events: none;
	width: min(92vw, 420px);
}

.ems-toast {
	pointer-events: auto;
	width: 100%;
	background: #ffffff;
	border-radius: 16px;
	padding: 18px 20px;
	box-shadow:
		0 20px 50px rgba(15, 23, 42, 0.18),
		0 0 0 1px rgba(15, 23, 42, 0.06);
	display: flex;
	align-items: flex-start;
	gap: 14px;
	opacity: 0;
	transform: translateY(12px) scale(0.96);
	transition:
		opacity 0.28s ease,
		transform 0.28s cubic-bezier(0.34, 1.4, 0.64, 1);
	border-top: 4px solid #2563eb;
}

.ems-toast.ems-toast-show {
	opacity: 1;
	transform: translateY(0) scale(1);
}

.ems-toast.ems-toast-hide {
	opacity: 0;
	transform: translateY(-8px) scale(0.98);
}

.ems-toast--success {
	border-top-color: #10b981;
}

.ems-toast--error {
	border-top-color: #ef4444;
}

.ems-toast--warning {
	border-top-color: #f59e0b;
}

.ems-toast--info {
	border-top-color: #2563eb;
}

.ems-toast__icon {
	flex-shrink: 0;
	width: 40px;
	height: 40px;
	border-radius: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.25rem;
}

.ems-toast--success .ems-toast__icon {
	background: #d1fae5;
	color: #059669;
}

.ems-toast--error .ems-toast__icon {
	background: #fee2e2;
	color: #dc2626;
}

.ems-toast--warning .ems-toast__icon {
	background: #fef3c7;
	color: #d97706;
}

.ems-toast--info .ems-toast__icon {
	background: #dbeafe;
	color: #2563eb;
}

.ems-toast__body {
	flex: 1;
	min-width: 0;
	padding-top: 2px;
}

.ems-toast__title {
	font-weight: 700;
	font-size: 1rem;
	line-height: 1.3;
	color: #0f172a;
	margin: 0 0 4px;
}

.ems-toast__message {
	font-size: 0.9rem;
	line-height: 1.45;
	color: #64748b;
	margin: 0;
}

.ems-toast__close {
	flex-shrink: 0;
	background: #f1f5f9;
	border: none;
	border-radius: 8px;
	width: 32px;
	height: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #64748b;
	cursor: pointer;
	transition: background 0.15s, color 0.15s;
}

.ems-toast__close:hover {
	background: #e2e8f0;
	color: #0f172a;
}

.ems-toast-backdrop {
	position: fixed;
	inset: 0;
	background: rgba(15, 23, 42, 0.25);
	z-index: 10040;
	opacity: 0;
	transition: opacity 0.25s ease;
	pointer-events: none;
}

.ems-toast-backdrop.ems-toast-backdrop-show {
	opacity: 1;
	pointer-events: auto;
}
