/*
 * Fritz & Fritz Superchat – Platzhalter-Button und Einwilligungs-Popup.
 * Optik angelehnt an das Superchat-Widget (roter Kreis, hellblauer Panel-Kopf).
 */
.fuf-superchat {
	--fuf-superchat-color: #b60000;
	--fuf-superchat-color-hover: #910020;
	--fuf-superchat-icon: #ffffff;
	--fuf-superchat-header-bg: #dee7f4;
	--fuf-superchat-text: #151414;
	--fuf-superchat-muted: #4b4b4b;
	--fuf-superchat-offset-x: 20px;
	--fuf-superchat-offset-y: 20px;
	--fuf-superchat-size: 56px;
	--fuf-superchat-radius: 16px;
	--fuf-superchat-shadow: 0 0 4px 0 rgba(0, 0, 0, 0.08), 0 6px 24px 0 rgba(0, 0, 0, 0.18);

	position: fixed;
	right: var(--fuf-superchat-offset-x);
	bottom: var(--fuf-superchat-offset-y);
	z-index: 2147483000;
	font-family: inherit;
	font-size: 16px;
	line-height: 1.5;
	color: var(--fuf-superchat-text);
}

/* --- Runder Button --- */
.fuf-superchat__toggle {
	display: flex;
	align-items: center;
	justify-content: center;
	width: var(--fuf-superchat-size);
	height: var(--fuf-superchat-size);
	margin: 0 0 0 auto;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--fuf-superchat-color);
	color: var(--fuf-superchat-icon);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
	cursor: pointer;
	transition: transform 0.15s ease, background-color 0.15s ease;
}

.fuf-superchat__toggle:hover,
.fuf-superchat__toggle:focus-visible {
	background: var(--fuf-superchat-color-hover);
	transform: scale(1.05);
}

.fuf-superchat__toggle:focus-visible {
	outline: 3px solid var(--fuf-superchat-header-bg);
	outline-offset: 2px;
}

.fuf-superchat__icon {
	width: 28px;
	height: 28px;
	transition: opacity 0.1s ease, transform 0.15s ease;
}

.fuf-superchat__icon-lines {
	stroke: var(--fuf-superchat-color);
}

.fuf-superchat__toggle:hover .fuf-superchat__icon-lines,
.fuf-superchat__toggle:focus-visible .fuf-superchat__icon-lines {
	stroke: var(--fuf-superchat-color-hover);
}

.fuf-superchat__icon--close,
.fuf-superchat--open .fuf-superchat__icon--chat {
	display: none;
}

.fuf-superchat--open .fuf-superchat__icon--close {
	display: block;
}

/* Ladezustand nach Einwilligung */
.fuf-superchat--loading .fuf-superchat__toggle {
	cursor: wait;
	pointer-events: none;
}

.fuf-superchat--loading .fuf-superchat__icon {
	animation: fuf-superchat-pulse 1s ease-in-out infinite;
}

@keyframes fuf-superchat-pulse {
	0%, 100% { opacity: 1; }
	50% { opacity: 0.35; }
}

/* --- Popup --- */
.fuf-superchat__panel {
	width: min(400px, calc(100vw - 2 * var(--fuf-superchat-offset-x)));
	margin-bottom: 16px;
	overflow: hidden;
	border-radius: var(--fuf-superchat-radius);
	background: #ffffff;
	box-shadow: var(--fuf-superchat-shadow);
	transform-origin: 100% 100%;
	animation: fuf-superchat-grow 0.2s ease-out;
}

@keyframes fuf-superchat-grow {
	from { opacity: 0; transform: scale(0.85); }
	to { opacity: 1; transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
	.fuf-superchat__panel,
	.fuf-superchat--loading .fuf-superchat__icon {
		animation: none;
	}

	.fuf-superchat__toggle,
	.fuf-superchat__icon {
		transition: none;
	}
}

.fuf-superchat__header {
	padding: 28px 24px 24px;
	background: var(--fuf-superchat-header-bg);
}

.fuf-superchat__title {
	margin: 0 0 8px;
	font-size: 1.5rem;
	font-weight: 600;
	line-height: 1.2;
	color: var(--fuf-superchat-text);
}

.fuf-superchat__title:focus {
	outline: none;
}

.fuf-superchat__intro {
	margin: 0;
	font-size: 1rem;
	color: var(--fuf-superchat-text);
}

.fuf-superchat__body {
	padding: 20px 24px 24px;
}

.fuf-superchat__notice {
	margin: 0 0 20px;
	font-size: 0.875rem;
	line-height: 1.5;
	color: var(--fuf-superchat-muted);
}

.fuf-superchat__notice a {
	color: var(--fuf-superchat-color);
	text-decoration: underline;
}

.fuf-superchat__status {
	margin: 0 0 16px;
	font-size: 0.875rem;
	color: var(--fuf-superchat-color);
}

.fuf-superchat__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 16px;
	align-items: center;
}

.fuf-superchat__accept,
.fuf-superchat__decline {
	margin: 0;
	border: 0;
	border-radius: 8px;
	font: inherit;
	font-size: 0.9375rem;
	font-weight: 600;
	line-height: 1.2;
	cursor: pointer;
}

.fuf-superchat__accept {
	padding: 12px 20px;
	background: var(--fuf-superchat-color);
	color: #ffffff;
}

.fuf-superchat__accept:hover,
.fuf-superchat__accept:focus-visible {
	background: var(--fuf-superchat-color-hover);
}

.fuf-superchat__decline {
	padding: 12px 8px;
	background: transparent;
	color: var(--fuf-superchat-muted);
	text-decoration: underline;
}

.fuf-superchat__decline:hover,
.fuf-superchat__decline:focus-visible {
	color: var(--fuf-superchat-text);
}

.fuf-superchat__accept:focus-visible,
.fuf-superchat__decline:focus-visible {
	outline: 3px solid var(--fuf-superchat-header-bg);
	outline-offset: 2px;
}

@media (max-width: 480px) {
	.fuf-superchat__header {
		padding: 24px 20px 20px;
	}

	.fuf-superchat__body {
		padding: 16px 20px 20px;
	}
}
