/*
 * Familienplaner Bot – funktionales Grundlayout.
 * Bewusst schlicht/neutral. Optischer Feinschliff läuft separat über
 * Elementor/Theme-CSS (leicht überschreibbar, da niedrige Spezifität).
 */

.fp-bot {
	--fp-accent: #2f7d5b;
	--fp-bot-bg: #f3f4f6;
	--fp-user-bg: #2f7d5b;
	--fp-user-fg: #ffffff;
	--fp-border: #e2e4e8;
	display: flex;
	flex-direction: column;
	max-width: 640px;
	margin: 0 auto;
	border: 1px solid var(--fp-border);
	border-radius: 14px;
	overflow: hidden;
	background: #fff;
	font-size: 16px;
	line-height: 1.45;
}

.fp-bot__log {
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 16px;
	height: 420px;
	max-height: 60vh;
	overflow-y: auto;
}

.fp-bot__msg {
	display: flex;
	flex-direction: column;
	max-width: 85%;
}

.fp-bot__msg--user {
	align-self: flex-end;
	align-items: flex-end;
}

.fp-bot__msg--bot {
	align-self: flex-start;
	align-items: flex-start;
}

.fp-bot__bubble {
	padding: 10px 14px;
	border-radius: 14px;
	word-wrap: break-word;
	overflow-wrap: anywhere;
}

.fp-bot__msg--bot .fp-bot__bubble {
	background: var(--fp-bot-bg);
	color: #1f2328;
	border-bottom-left-radius: 4px;
}

.fp-bot__msg--user .fp-bot__bubble {
	background: var(--fp-user-bg);
	color: var(--fp-user-fg);
	border-bottom-right-radius: 4px;
}

.fp-bot__bubble a {
	color: inherit;
	text-decoration: underline;
}

/* Tipp-Indikator */
.fp-bot__bubble--loading {
	display: inline-flex;
	gap: 5px;
}

.fp-bot__bubble--loading span {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: #9aa0a6;
	animation: fp-bounce 1.2s infinite ease-in-out;
}

.fp-bot__bubble--loading span:nth-child(2) { animation-delay: 0.15s; }
.fp-bot__bubble--loading span:nth-child(3) { animation-delay: 0.3s; }

@keyframes fp-bounce {
	0%, 80%, 100% { transform: translateY(0); opacity: 0.5; }
	40% { transform: translateY(-5px); opacity: 1; }
}

/* Quick-Reply-Pills unter einer Bot-Antwort */
.fp-bot__pills {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 8px;
}

.fp-bot__pill {
	display: inline-block;
	padding: 7px 12px;
	border: 1px solid var(--fp-accent);
	border-radius: 999px;
	color: var(--fp-accent);
	background: #fff;
	text-decoration: none;
	font-size: 14px;
	line-height: 1.2;
}

.fp-bot__pill:hover {
	background: var(--fp-accent);
	color: #fff;
}

/* Schnellstart-Chips */
.fp-bot__chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	padding: 0 16px 4px;
}

.fp-bot__chip {
	padding: 7px 12px;
	border: 1px solid var(--fp-border);
	border-radius: 999px;
	background: #fafafa;
	color: #333;
	font-size: 14px;
	cursor: pointer;
}

.fp-bot__chip:hover {
	border-color: var(--fp-accent);
	color: var(--fp-accent);
}

/* Eingabezeile */
.fp-bot__form {
	display: flex;
	align-items: flex-end;
	gap: 8px;
	padding: 12px 16px 16px;
	border-top: 1px solid var(--fp-border);
}

.fp-bot__input {
	flex: 1;
	resize: none;
	border: 1px solid var(--fp-border);
	border-radius: 10px;
	padding: 10px 12px;
	font: inherit;
	line-height: 1.4;
	max-height: 140px;
}

.fp-bot__input:focus {
	outline: 2px solid var(--fp-accent);
	outline-offset: 1px;
}

.fp-bot__send {
	flex: 0 0 auto;
	padding: 10px 18px;
	border: 0;
	border-radius: 10px;
	background: var(--fp-accent);
	color: #fff;
	font: inherit;
	cursor: pointer;
}

.fp-bot__send:disabled {
	opacity: 0.6;
	cursor: default;
}

.fp-bot__sronly {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

@media (max-width: 480px) {
	.fp-bot { font-size: 15px; border-radius: 0; }
	.fp-bot__msg { max-width: 92%; }
}
