/* AI Site Assistant widget — all classes prefixed .aisa- to avoid theme clashes */
.aisa-root, .aisa-root * { box-sizing: border-box; }
.aisa-root {
	--aisa-accent: #1f6feb;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.aisa-bubble {
	position: fixed; bottom: 22px; right: 22px; width: 56px; height: 56px;
	border: 0; border-radius: 50%; background: var(--aisa-accent); color: #fff;
	font-size: 24px; line-height: 1; cursor: pointer; z-index: 2147483646;
	box-shadow: 0 6px 24px rgba(0,0,0,.22); transition: transform .15s;
}
.aisa-bubble:hover { transform: scale(1.06); }
.aisa-bubble:focus-visible { outline: 3px solid rgba(0,0,0,.35); outline-offset: 2px; }

.aisa-panel {
	position: fixed; bottom: 88px; right: 22px; width: 380px; height: 560px;
	max-width: calc(100vw - 32px); max-height: calc(100vh - 120px);
	background: #fff; border-radius: 16px; z-index: 2147483646; display: none;
	flex-direction: column; overflow: hidden; box-shadow: 0 12px 48px rgba(0,0,0,.28);
}
.aisa-panel.aisa-open { display: flex; }

.aisa-head {
	padding: 15px 18px; border-bottom: 1px solid #ececf0;
	display: flex; align-items: center; gap: 9px; flex: 0 0 auto;
}
.aisa-head .aisa-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--aisa-accent); }
.aisa-head h2 { margin: 0; font-size: 15px; font-weight: 600; color: #1a1a1f; letter-spacing: -.01em; }
.aisa-head .aisa-tag { margin-left: auto; font-size: 11px; color: #6b7280; }

.aisa-log { flex: 1 1 auto; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.aisa-msg { max-width: 88%; font-size: 14.5px; line-height: 1.55; }
.aisa-msg.aisa-user {
	align-self: flex-end; background: var(--aisa-accent); color: #fff;
	padding: 10px 13px; border-radius: 14px 14px 4px 14px;
}
.aisa-msg.aisa-bot { align-self: flex-start; color: #1a1a1f; }
.aisa-msg.aisa-bot p { margin: 0 0 .6em; } .aisa-msg.aisa-bot p:last-child { margin: 0; }
.aisa-msg.aisa-bot ul { margin: .3em 0; padding-left: 1.2em; }

.aisa-sources { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.aisa-sources a {
	font-size: 11.5px; color: #6b7280; text-decoration: none;
	border: 1px solid #ececf0; border-radius: 999px; padding: 3px 9px;
	max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.aisa-sources a:hover { border-color: var(--aisa-accent); color: var(--aisa-accent); }

.aisa-think { display: inline-flex; gap: 4px; align-items: center; height: 18px; }
.aisa-think i { width: 6px; height: 6px; border-radius: 50%; background: #9aa0aa; animation: aisa-pulse 1.1s infinite ease-in-out; }
.aisa-think i:nth-child(2) { animation-delay: .15s; }
.aisa-think i:nth-child(3) { animation-delay: .3s; }
@keyframes aisa-pulse { 0%,100% { transform: translateY(0); opacity: .35; } 50% { transform: translateY(-3px); opacity: .9; } }

.aisa-foot { flex: 0 0 auto; border-top: 1px solid #ececf0; padding: 12px; display: flex; gap: 8px; }
.aisa-input {
	flex: 1; border: 1px solid #ececf0; border-radius: 11px; padding: 11px 13px;
	font: inherit; font-size: 14px; outline: none; resize: none; max-height: 120px; color: #1a1a1f; background: #fff;
}
.aisa-input:focus { border-color: var(--aisa-accent); }
.aisa-send { border: 0; background: var(--aisa-accent); color: #fff; border-radius: 11px; padding: 0 16px; font: inherit; font-weight: 600; cursor: pointer; }
.aisa-send:disabled { opacity: .5; cursor: default; }

@media (prefers-reduced-motion: reduce) { .aisa-think i { animation: none; } .aisa-bubble { transition: none; } }
