/* iMoschee Chat-FAQ */
.imc-root {
	--imc-color: #1f6f5c;
	--imc-bg: #ffffff;
	--imc-soft: #f3f5f4;
	--imc-text: #1d2422;
	--imc-muted: #66716d;
	position: fixed;
	bottom: 20px;
	z-index: 2147483000;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	font-size: 15px;
	line-height: 1.45;
	color: var(--imc-text);
}
.imc-root.imc-pos-right { right: 20px; }
.imc-root.imc-pos-left { left: 20px; }
.imc-root *, .imc-root *::before, .imc-root *::after { box-sizing: border-box; }
.imc-root button { font: inherit; margin: 0; letter-spacing: normal; text-transform: none; }

/* Chat-Blase */
.imc-launcher {
	display: flex; align-items: center; justify-content: center; gap: 8px;
	height: 58px; min-width: 58px; padding: 0 17px;
	border: 0; border-radius: 999px; cursor: pointer;
	background: var(--imc-color); color: #fff;
	box-shadow: 0 6px 22px rgba(0, 0, 0, .22);
	transition: transform .15s ease, box-shadow .15s ease;
	margin-left: auto;
}
.imc-pos-left .imc-launcher { margin-left: 0; }
.imc-launcher:hover { transform: translateY(-2px); box-shadow: 0 9px 26px rgba(0, 0, 0, .26); }
.imc-launcher:focus-visible { outline: 3px solid #fff; box-shadow: 0 0 0 6px var(--imc-color); }
.imc-launcher-text { font-weight: 600; font-size: 15px; }
.imc-ico-close { display: none; }
.imc-open .imc-ico-chat, .imc-open .imc-launcher-text { display: none; }
.imc-open .imc-ico-close { display: block; }
.imc-open .imc-launcher { padding: 0; width: 58px; }

/* Fenster */
.imc-panel {
	position: absolute; bottom: 72px; right: 0;
	width: 370px; height: min(600px, calc(100vh - 110px));
	display: flex; flex-direction: column;
	background: var(--imc-bg); border-radius: 18px; overflow: hidden;
	box-shadow: 0 12px 48px rgba(0, 0, 0, .25);
	animation: imc-in .18s ease-out;
}
.imc-pos-left .imc-panel { right: auto; left: 0; }
.imc-panel[hidden] { display: none; }
@keyframes imc-in { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }

.imc-head {
	display: flex; align-items: center; gap: 10px;
	padding: 14px 12px 14px 16px; background: var(--imc-color); color: #fff;
}
.imc-avatar {
	width: 38px; height: 38px; flex: 0 0 38px; border-radius: 50%;
	display: flex; align-items: center; justify-content: center;
	background: rgba(255, 255, 255, .2); font-size: 20px;
}
.imc-titles { flex: 1; min-width: 0; }
.imc-title { font-weight: 700; font-size: 16px; line-height: 1.2; }
.imc-sub { font-size: 12.5px; opacity: .85; }
.imc-head-btn {
	width: 34px; height: 34px; border: 0; border-radius: 50%; cursor: pointer;
	display: flex; align-items: center; justify-content: center;
	background: transparent; color: #fff; padding: 0;
}
.imc-head-btn:hover, .imc-head-btn:focus-visible { background: rgba(255, 255, 255, .18); outline: none; }

.imc-msgs {
	flex: 1; overflow-y: auto; padding: 16px 14px 8px;
	display: flex; flex-direction: column; gap: 8px;
	background: var(--imc-soft); overscroll-behavior: contain;
}
.imc-msg {
	max-width: 86%; padding: 9px 13px; border-radius: 16px;
	word-wrap: break-word; overflow-wrap: anywhere;
	animation: imc-pop .16s ease-out;
}
@keyframes imc-pop { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.imc-bot { align-self: flex-start; background: #fff; border-bottom-left-radius: 5px; box-shadow: 0 1px 2px rgba(0, 0, 0, .06); }
.imc-user { align-self: flex-end; background: var(--imc-color); color: #fff; border-bottom-right-radius: 5px; }
.imc-answer p { margin: 0 0 .6em; }
.imc-answer p:last-child { margin-bottom: 0; }
.imc-answer ul, .imc-answer ol { margin: .3em 0 .6em 1.2em; padding: 0; }
.imc-answer a { color: var(--imc-color); text-decoration: underline; }
.imc-answer img { max-width: 100%; height: auto; border-radius: 8px; }

.imc-typing { display: flex; gap: 4px; padding: 13px 14px; }
.imc-typing span {
	width: 7px; height: 7px; border-radius: 50%; background: #b5bdba;
	animation: imc-dot 1s infinite ease-in-out;
}
.imc-typing span:nth-child(2) { animation-delay: .15s; }
.imc-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes imc-dot { 0%, 80%, 100% { opacity: .35; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }

.imc-chips { display: flex; flex-wrap: wrap; gap: 7px; margin: 2px 0 4px; }
.imc-chip {
	border: 1.5px solid var(--imc-color); background: #fff; color: var(--imc-color);
	border-radius: 999px; padding: 7px 13px; cursor: pointer;
	font-size: 14px; font-weight: 600; line-height: 1.25; text-align: left;
	transition: background .12s ease, color .12s ease;
}
.imc-chip:hover:not(:disabled), .imc-chip:focus-visible { background: var(--imc-color); color: #fff; outline: none; }
.imc-chip-q { border-radius: 12px; width: 100%; font-weight: 500; }
.imc-chip-muted { border-color: #c9d0cd; color: var(--imc-muted); font-weight: 500; }
.imc-chip-muted:hover:not(:disabled), .imc-chip-muted:focus-visible { background: #e7ebe9; color: var(--imc-text); }
.imc-chips.imc-used { display: none; }

.imc-wa { align-self: flex-start; max-width: 86%; }
.imc-wa-btn {
	display: inline-flex; align-items: center; gap: 8px;
	background: #25d366; color: #fff !important; text-decoration: none !important;
	padding: 10px 16px; border-radius: 999px; font-weight: 700; font-size: 14.5px;
	box-shadow: 0 2px 6px rgba(37, 211, 102, .35);
}
.imc-wa-btn:hover, .imc-wa-btn:focus-visible { background: #1ebe5a; outline: none; }
.imc-wa-hours { font-size: 12.5px; color: var(--imc-muted); margin: 5px 0 0 6px; }

.imc-form { display: flex; gap: 8px; padding: 10px 12px 6px; background: #fff; border-top: 1px solid #e6eae8; margin: 0; }
.imc-input {
	flex: 1; min-width: 0; height: 42px; padding: 0 14px; margin: 0;
	border: 1.5px solid #d6dcd9; border-radius: 999px; background: #fff; color: var(--imc-text);
	font: inherit; font-size: 16px; box-shadow: none;
}
.imc-input:focus { border-color: var(--imc-color); outline: none; }
.imc-send {
	width: 42px; height: 42px; flex: 0 0 42px; border: 0; border-radius: 50%; padding: 0;
	display: flex; align-items: center; justify-content: center; cursor: pointer;
	background: var(--imc-color); color: #fff;
}
.imc-privacy { font-size: 11px; color: var(--imc-muted); padding: 2px 16px 10px; background: #fff; line-height: 1.35; }

/* Handy */
@media (max-width: 480px) {
	.imc-root { bottom: 14px; }
	.imc-root.imc-pos-right { right: 14px; }
	.imc-root.imc-pos-left { left: 14px; }
	.imc-panel {
		position: fixed; inset: 0; width: auto; height: auto; border-radius: 0;
		height: 100%; height: 100dvh;
	}
	.imc-open .imc-launcher { display: none; }
	.imc-msg, .imc-wa { max-width: 92%; }
}

@media (prefers-reduced-motion: reduce) {
	.imc-panel, .imc-msg { animation: none; }
	.imc-typing span { animation: none; opacity: .6; }
}
