/* Asyntai Chat Window v1.1 – Styles für Inline-Widget und optionale Bubble. */

/* ---------- Gemeinsame Chat-Box (Inline + Panel) ---------- */
.asyntai-chat {
	--asyntai-primary: #1b3f8f;
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 1px solid #e4e8f0;
	border-radius: 14px;
	overflow: hidden;
	font-family: inherit;
	line-height: 1.45;
	height: 480px;
	box-shadow: 0 4px 18px rgba(0, 0, 0, 0.06);
}
.asyntai-chat *,
.asyntai-chat *::before,
.asyntai-chat *::after { box-sizing: border-box; }

/* Inline-Variante: volle Breite des Content-Bereichs */
.asyntai-inline {
	width: 100%;
	margin: 24px 0;
}

/* ---------- Overlay-Wurzel (nur wenn Bubble aktiviert) ---------- */
#asyntai-chat-root {
	--asyntai-primary: #1b3f8f;
	position: fixed;
	right: 20px;
	bottom: 20px;
	z-index: 99999;
	font-family: inherit;
	line-height: 1.45;
}
#asyntai-chat-root *,
#asyntai-chat-root *::before,
#asyntai-chat-root *::after { box-sizing: border-box; }

/* ---------- Bubble ---------- */
.asyntai-bubble {
	width: 56px;
	height: 56px;
	border: none;
	border-radius: 50%;
	background: var(--asyntai-primary);
	color: #fff;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.22);
	transition: transform 0.15s ease;
}
.asyntai-bubble:hover { transform: scale(1.06); }
.asyntai-bubble--open { opacity: 0.85; }

/* ---------- Panel (Bubble-Variante, nutzt die gemeinsame .asyntai-chat-Optik) ---------- */
.asyntai-panel {
	position: absolute;
	right: 0;
	bottom: 72px;
	width: 360px;
	max-width: calc(100vw - 32px);
	max-height: calc(100vh - 120px);
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}

/* ---------- Header ---------- */
.asyntai-header {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 12px 14px;
	background: var(--asyntai-primary);
	color: #fff;
}
.asyntai-status {
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: #4ade80;
	flex: none;
}
.asyntai-title {
	font-size: 15px;
	font-weight: 600;
	flex: 1;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.asyntai-close {
	border: none;
	background: transparent;
	color: #fff;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	padding: 0 4px;
	opacity: 0.85;
}
.asyntai-close:hover { opacity: 1; }

/* ---------- Nachrichten ---------- */
.asyntai-messages {
	flex: 1;
	overflow-y: auto;
	padding: 14px;
	display: flex;
	flex-direction: column;
	gap: 8px;
	background: #f6f7fa;
}
.asyntai-msg {
	max-width: 82%;
	padding: 9px 12px;
	border-radius: 12px;
	font-size: 14px;
	white-space: pre-wrap;
	word-wrap: break-word;
}
.asyntai-msg--bot {
	align-self: flex-start;
	background: #fff;
	color: #1c2333;
	border: 1px solid #e4e8f0;
	border-bottom-left-radius: 4px;
}
.asyntai-msg--user {
	align-self: flex-end;
	background: var(--asyntai-primary);
	color: #fff;
	border-bottom-right-radius: 4px;
}

/* ---------- Tipp-Indikator ---------- */
.asyntai-typing { display: flex; gap: 4px; padding: 12px 14px; }
.asyntai-typing span {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: #9aa3b5;
	animation: asyntai-blink 1.2s infinite ease-in-out;
}
.asyntai-typing span:nth-child(2) { animation-delay: 0.15s; }
.asyntai-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes asyntai-blink {
	0%, 80%, 100% { opacity: 0.3; transform: translateY(0); }
	40% { opacity: 1; transform: translateY(-3px); }
}

/* ---------- Eingabe ---------- */
.asyntai-inputrow {
	display: flex;
	align-items: flex-end;
	gap: 8px;
	padding: 10px 12px;
	border-top: 1px solid #e4e8f0;
	background: #fff;
	margin: 0;
}
.asyntai-input {
	flex: 1;
	border: 1px solid #d5dae4;
	border-radius: 10px;
	padding: 8px 10px;
	font: inherit;
	font-size: 14px;
	resize: none;
	max-height: 120px;
	background: #fff;
	color: #1c2333;
}
.asyntai-input:focus {
	outline: none;
	border-color: var(--asyntai-primary);
	box-shadow: 0 0 0 2px rgba(27, 63, 143, 0.15);
}
.asyntai-send {
	border: none;
	background: var(--asyntai-primary);
	color: #fff;
	width: 38px;
	height: 38px;
	border-radius: 10px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	flex: none;
}
.asyntai-send:hover { filter: brightness(1.1); }

/* ---------- Datenschutzhinweis ---------- */
.asyntai-privacy {
	font-size: 11px;
	color: #7a8296;
	padding: 6px 12px 10px;
	background: #fff;
	text-align: center;
}

/* ---------- Mobil ---------- */
@media (max-width: 480px) {
	.asyntai-panel {
		position: fixed;
		right: 8px;
		left: 8px;
		bottom: 84px;
		width: auto;
		height: 70vh;
	}
}
