/**
 * FBM UI Core — zentrierte Toast-Hinweise (Erfolg, Fehler, Info, Warnung)
 * Container: #fbm-ui-toast-container
 */

#fbm-ui-toast-container {
	position: fixed;
	inset: 0;
	z-index: 30000;
	display: flex;
	align-items: center;
	justify-content: center;
	pointer-events: none;
}

.fbm-ui-toast {
	background: #ffffff;
	border-radius: 8px;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.28);
	padding: 16px 24px;
	min-width: 280px;
	max-width: min(520px, calc(100vw - 2rem));
	pointer-events: auto;
	opacity: 0;
	transform: translateY(-16px);
	transition: opacity 0.28s ease, transform 0.28s ease;
	display: flex;
	align-items: flex-start;
	gap: 12px;
	box-sizing: border-box;
}

.fbm-ui-toast--visible {
	opacity: 1;
	transform: translateY(0);
}

.fbm-ui-toast__icon {
	flex-shrink: 0;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 13px;
	font-weight: 700;
	line-height: 1;
	margin-top: 1px;
}

.fbm-ui-toast__message {
	flex: 1;
	font-size: 14px;
	line-height: 1.5;
	color: #1f2937;
	word-break: break-word;
}

.fbm-ui-toast__message a {
	color: inherit;
	font-weight: 600;
	text-decoration: underline;
}

.fbm-ui-toast--success {
	border-left: 4px solid #28a745;
	background: #d4edda;
}

.fbm-ui-toast--success .fbm-ui-toast__icon {
	background: #28a745;
	color: #fff;
}

.fbm-ui-toast--success .fbm-ui-toast__icon::before {
	content: '✓';
}

.fbm-ui-toast--error {
	border-left: 4px solid #dc3545;
	background: #f8d7da;
}

.fbm-ui-toast--error .fbm-ui-toast__icon {
	background: #dc3545;
	color: #fff;
}

.fbm-ui-toast--error .fbm-ui-toast__icon::before {
	content: '×';
}

.fbm-ui-toast--info {
	border-left: 4px solid #17a2b8;
	background: #d1ecf1;
}

.fbm-ui-toast--info .fbm-ui-toast__icon {
	background: #17a2b8;
	color: #fff;
}

.fbm-ui-toast--info .fbm-ui-toast__icon::before {
	content: 'i';
	font-style: italic;
}

.fbm-ui-toast--warning {
	border-left: 4px solid #ffc107;
	background: #fff3cd;
}

.fbm-ui-toast--warning .fbm-ui-toast__icon {
	background: #e0a800;
	color: #1f2937;
}

.fbm-ui-toast--warning .fbm-ui-toast__icon::before {
	content: '!';
}

html[data-theme='dark-mode'] .fbm-ui-toast {
	background: #1f2937;
	box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
}

html[data-theme='dark-mode'] .fbm-ui-toast__message {
	color: #f3f4f6;
}

html[data-theme='dark-mode'] .fbm-ui-toast--success {
	background: #14532d;
	border-left-color: #22c55e;
}

html[data-theme='dark-mode'] .fbm-ui-toast--error {
	background: #450a0a;
	border-left-color: #ef4444;
}

html[data-theme='dark-mode'] .fbm-ui-toast--info {
	background: #164e63;
	border-left-color: #22d3ee;
}

html[data-theme='dark-mode'] .fbm-ui-toast--warning {
	background: #422006;
	border-left-color: #fbbf24;
}
