/* AI Agents chatbot widget */
#aia-chat-root { --aia-accent: #624bff; position: fixed; right: 20px; bottom: 20px; z-index: 999999; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }

#aia-fab {
	width: 58px; height: 58px; border-radius: 50%; border: 0; cursor: pointer;
	background: linear-gradient(135deg, var(--aia-accent), #9b7bff);
	color: #fff; display: flex; align-items: center; justify-content: center;
	box-shadow: 0 8px 24px rgba(20, 12, 60, .35);
	transition: transform .2s ease, box-shadow .2s ease;
}
#aia-fab:hover { transform: translateY(-2px) scale(1.05); }
#aia-fab.aia-hidden { display: none; }

#aia-panel {
	width: min(370px, calc(100vw - 32px)); height: min(540px, calc(100vh - 90px));
	background: #fff; border-radius: 18px; overflow: hidden;
	display: flex; flex-direction: column;
	box-shadow: 0 18px 50px rgba(15, 10, 45, .35);
	animation: aia-pop .22s ease;
}
@keyframes aia-pop { from { opacity: 0; transform: translateY(12px) scale(.97); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { #aia-panel { animation: none; } #aia-fab { transition: none; } }

#aia-header {
	background: linear-gradient(135deg, #0b1327, #1c1145);
	color: #fff; padding: 14px 16px; display: flex; align-items: center; justify-content: space-between;
}
#aia-title { font-weight: 600; font-size: 15px; }
#aia-title::before { content: "●"; color: #4ade80; margin-right: 8px; font-size: 11px; }
#aia-close { background: none; border: 0; color: #fff; font-size: 22px; cursor: pointer; line-height: 1; opacity: .8; }
#aia-close:hover { opacity: 1; }

#aia-msgs { flex: 1; overflow-y: auto; padding: 14px; background: #f6f6fb; display: flex; flex-direction: column; gap: 8px; }
.aia-msg { max-width: 82%; padding: 10px 13px; border-radius: 14px; font-size: 14px; line-height: 1.45; word-wrap: break-word; white-space: pre-wrap; }
.aia-bot  { background: #fff; color: #1c1c2e; border: 1px solid #e8e8f2; border-bottom-left-radius: 4px; align-self: flex-start; }
.aia-user { background: var(--aia-accent); color: #fff; border-bottom-right-radius: 4px; align-self: flex-end; }
.aia-typing { color: #999; letter-spacing: 3px; }

#aia-form { display: flex; gap: 8px; padding: 10px; background: #fff; border-top: 1px solid #ececf4; }
#aia-input { flex: 1; border: 1px solid #ddd; border-radius: 999px; padding: 10px 15px; font-size: 14px; outline: none; }
#aia-input:focus { border-color: var(--aia-accent); box-shadow: 0 0 0 3px rgba(98, 75, 255, .15); }
#aia-send { border: 0; border-radius: 50%; width: 40px; height: 40px; background: var(--aia-accent); color: #fff; cursor: pointer; font-size: 15px; }
#aia-send:hover { filter: brightness(1.1); }
