#allion-chatbot-root {
	--allion-action: #197fa8;
	--allion-action-dark: #126786;
	--allion-action-soft: #eef8fc;
	--allion-action-line: #8ac9e2;
	--allion-action-text: #175c78;
	--allion-avatar-sky: #ddf3fa;
	--allion-navy: #003b5c;
	--allion-ink: #172033;
	--allion-muted: #657085;
	--allion-line: #dfe4ec;
	--allion-surface: #ffffff;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	position: fixed;
	right: 22px;
	bottom: 22px;
	z-index: 2147483000;
}

#allion-chatbot-root *, #allion-chatbot-root *::before, #allion-chatbot-root *::after { box-sizing: border-box; }

.allion-chat-launcher {
	display: flex; align-items: center; gap: 9px; margin-left: auto; border: 0; border-radius: 999px;
	background: var(--allion-action); color: #fff; padding: 13px 18px; min-height: 50px;
	font: inherit; font-weight: 700; cursor: pointer; box-shadow: 0 10px 30px rgba(24, 32, 51, .24);
	transition: transform .18s ease, background .18s ease;
}
.allion-chat-launcher:hover { background: var(--allion-action-dark); transform: translateY(-1px); }
.allion-chat-launcher:focus-visible, #allion-chatbot-root button:focus-visible,
#allion-chatbot-root select:focus-visible, #allion-chatbot-root textarea:focus-visible {
	outline: 3px solid rgba(89, 181, 216, .38); outline-offset: 2px;
}
.allion-allie-avatar { position: relative; display: block; flex: 0 0 auto; width: 55px; height: 55px; overflow: visible; border: 2px solid rgba(255,255,255,.9); border-radius: 50%; background: var(--allion-avatar-sky); box-shadow: 0 3px 10px rgba(0,31,52,.24); }
.allion-allie-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: inherit; object-fit: cover; opacity: 0; transform: scale(1.025); transition: opacity .22s ease, transform .3s ease; }
.allion-allie-avatar::after { content: "✦"; position: absolute; z-index: 2; top: -9px; right: -7px; color: #59b5d8; font-size: 16px; line-height: 1; opacity: 0; transform: scale(.35) rotate(-15deg); text-shadow: 0 1px 2px rgba(0,31,52,.24); }
.allion-allie-avatar[data-state="idle"] .allion-avatar-idle,
.allion-allie-avatar[data-state="attentive"] .allion-avatar-attentive,
.allion-allie-avatar[data-state="thinking"] .allion-avatar-thinking,
.allion-allie-avatar[data-state="idea"] .allion-avatar-idea { opacity: 1; }
.allion-allie-avatar[data-state="idle"] { animation: allion-avatar-breathe 5s ease-in-out infinite; }
.allion-allie-avatar[data-state="attentive"] img { transform: scale(1.055); }
.allion-allie-avatar[data-state="thinking"] { animation: allion-avatar-think 1.6s ease-in-out infinite; }
.allion-allie-avatar[data-state="idea"] { animation: allion-avatar-idea .65s cubic-bezier(.2,.9,.3,1.35); }
.allion-allie-avatar[data-state="idea"]::after { opacity: 1; animation: allion-avatar-spark .9s cubic-bezier(.2,.9,.3,1.35); }
.allion-chat-launcher .allion-allie-avatar { width: 38px; height: 38px; border-color: #fff; box-shadow: none; }

.allion-chat-panel {
	display: flex; flex-direction: column; position: absolute; right: 0; bottom: 64px; width: min(390px, calc(100vw - 28px));
	height: min(650px, calc(100vh - 110px)); overflow: hidden; border: 1px solid rgba(23, 32, 51, .12);
	border-radius: 18px; background: var(--allion-surface); box-shadow: 0 22px 65px rgba(23, 32, 51, .25);
	opacity: 0; visibility: hidden; transform: translateY(12px) scale(.98); transform-origin: bottom right;
	transition: opacity .18s ease, transform .18s ease, visibility .18s;
}
.allion-chat-panel.is-open { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }

.allion-chat-header { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 14px 9px 13px; color: #fff; background: var(--allion-navy); }
.allion-chat-identity { display: flex; align-items: center; gap: 10px; min-width: 0; }
.allion-chat-title { display: block; font-size: 16px; line-height: 1.2; }
.allion-chat-status { display: block; margin-top: 3px; color: #b9f5cb; font-size: 11px; }
.allion-chat-header-actions { display: flex; align-items: center; gap: 5px; }
.allion-chat-language { width: 100px; height: 34px; border: 1px solid rgba(255,255,255,.28); border-radius: 8px; color: #fff; background: #29344a; padding: 0 7px; font: inherit; font-size: 12px; }
.allion-chat-reset, .allion-chat-close { width: 34px; height: 34px; border: 0; border-radius: 8px; color: #fff; background: transparent; font: inherit; font-size: 20px; cursor: pointer; }
.allion-chat-reset:hover, .allion-chat-close:hover { background: rgba(255,255,255,.12); }

.allion-chat-messages { flex: 1; overflow-y: auto; padding: 18px 16px 10px; background: #f6f8fb; scroll-behavior: smooth; }
.allion-chat-message { width: fit-content; max-width: 88%; margin: 0 0 11px; padding: 11px 13px; border-radius: 14px; color: var(--allion-ink); background: #fff; box-shadow: 0 1px 2px rgba(23, 32, 51, .08); font-size: 12px; line-height: 1.52; white-space: pre-wrap; overflow-wrap: anywhere; }
.allion-chat-message-user { margin-left: auto; border-bottom-right-radius: 4px; color: #fff; background: var(--allion-action); }
.allion-chat-message-assistant { border-bottom-left-radius: 4px; }
.allion-chat-message.is-temporary { color: var(--allion-muted); font-style: italic; }
.allion-chat-message-content { white-space: pre-wrap; overflow-wrap: anywhere; }
.allion-chat-feedback { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; margin-top: 9px; padding-top: 7px; border-top: 1px solid var(--allion-line); color: var(--allion-muted); white-space: normal; }
.allion-chat-feedback-question { margin-right: 2px; font-size: 10px; }
.allion-chat-feedback-vote { width: 28px; height: 25px; border: 1px solid var(--allion-action-line); border-radius: 8px; background: var(--allion-action-soft); color: var(--allion-action-text); font: inherit; font-size: 13px; line-height: 1; cursor: pointer; }
.allion-chat-feedback-vote:hover { border-color: var(--allion-action); background: #e2f3fa; }
.allion-chat-feedback-reasons { display: flex; flex-wrap: wrap; gap: 4px; width: 100%; }
.allion-chat-feedback-reasons button { border: 1px solid var(--allion-action-line); border-radius: 999px; background: var(--allion-action-soft); color: var(--allion-action-text); padding: 4px 7px; font: inherit; font-size: 9px; line-height: 1.2; cursor: pointer; }
.allion-chat-feedback-reasons button:hover { border-color: var(--allion-action); background: #e2f3fa; }
.allion-chat-feedback-thanks { font-size: 10px; color: var(--allion-action-text); }

.allion-chat-starters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; overflow: visible; padding: 8px 14px 10px; background: #f6f8fb; }
.allion-chat-starters[hidden] { display: none; }
.allion-chat-starters button { width: 100%; min-width: 0; border: 1px solid var(--allion-action-line); border-radius: 12px; background: var(--allion-action-soft); color: var(--allion-action-text); padding: 7px 8px; font: inherit; font-size: 11px; line-height: 1.25; white-space: normal; cursor: pointer; }
.allion-chat-starters button:last-child:nth-child(odd) { grid-column: 1 / -1; }
.allion-chat-starters button:hover { border-color: var(--allion-action); background: #e2f3fa; }

.allion-chat-turnstile { min-height: 0; padding: 0 14px; background: #fff; }
.allion-chat-turnstile iframe { max-width: 100%; }
.allion-chat-form { display: grid; grid-template-columns: 1fr auto; align-items: stretch; gap: 8px; padding: 11px 12px 8px; border-top: 1px solid var(--allion-line); background: #fff; }
.allion-chat-input { width: 100%; height: 48px; min-height: 48px; max-height: 48px; resize: none; border: 1px solid #cbd2dd; border-radius: 12px; padding: 13px 12px; color: var(--allion-ink); background: #fff; font: inherit; font-size: 13px; line-height: 1.4; }
.allion-chat-send { min-width: 62px; height: 48px; border: 0; border-radius: 11px; padding: 0 13px; color: #fff; background: var(--allion-action); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.allion-chat-send:hover { background: var(--allion-action-dark); }
.allion-chat-send:disabled { cursor: wait; opacity: .55; }

.allion-chat-footer { display: flex; justify-content: flex-end; align-items: center; padding: 0 13px 9px; color: var(--allion-muted); background: #fff; font-size: 10px; line-height: 1.3; }
.allion-chat-contact { color: var(--allion-action-text); font-weight: 700; text-decoration: none; white-space: nowrap; }
.allion-chat-contact:hover { text-decoration: underline; }

@media (max-width: 600px) {
	#allion-chatbot-root { right: 12px; bottom: 12px; }
	.allion-chat-panel { position: fixed; inset: 8px 8px 74px; width: auto; height: auto; border-radius: 16px; transform-origin: bottom center; }
	.allion-chat-launcher-label { display: none; }
	.allion-chat-launcher { width: 54px; height: 54px; justify-content: center; padding: 0; }
	.allion-chat-launcher .allion-allie-avatar { width: 42px; height: 42px; }
	.allion-chat-language { width: 91px; }
}

@media (prefers-reduced-motion: reduce) {
	.allion-chat-panel, .allion-chat-launcher, .allion-allie-avatar { transition: none; animation: none !important; }
	.allion-allie-avatar img { transition: none; }
}

@keyframes allion-avatar-breathe {
	0%, 100% { transform: translateY(0); }
	50% { transform: translateY(-1px); }
}

@keyframes allion-avatar-think {
	0%, 100% { transform: rotate(0deg); }
	50% { transform: rotate(-1.5deg) translateY(-1px); }
}

@keyframes allion-avatar-idea {
	0% { transform: scale(.94); }
	55% { transform: scale(1.07); }
	100% { transform: scale(1); }
}

@keyframes allion-avatar-spark {
	0% { opacity: 0; transform: scale(.35) rotate(-15deg); }
	45%, 80% { opacity: 1; transform: scale(1) rotate(8deg); }
	100% { opacity: .65; transform: scale(.85) rotate(4deg); }
}
