#swac-chatbot-root {
	--swac-primary: #4f46e5;
	--swac-bg: #ffffff;
	--swac-text: #1f2937;
	--swac-bubble-bot: #f3f4f6;
	--swac-bubble-user: var(--swac-primary);
	position: fixed;
	bottom: 20px;
	right: 20px;
	z-index: 999999;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
#swac-chatbot-root.swac-pos-left { right: auto; left: 20px; }

.swac-launcher {
	width: 60px; height: 60px; border-radius: 50%;
	background: var(--swac-primary); color: #fff; border: none;
	box-shadow: 0 4px 14px rgba(0,0,0,.2); cursor: pointer;
	display: flex; align-items: center; justify-content: center;
	font-size: 26px;
}
.swac-launcher:hover { filter: brightness(1.05); }

.swac-panel {
	position: absolute; bottom: 76px; right: 0;
	width: 360px; max-width: calc(100vw - 40px);
	height: 520px; max-height: calc(100vh - 120px);
	background: var(--swac-bg); color: var(--swac-text);
	border-radius: 14px; box-shadow: 0 10px 40px rgba(0,0,0,.25);
	display: none; flex-direction: column; overflow: hidden;
}
#swac-chatbot-root.swac-pos-left .swac-panel { right: auto; left: 0; }
.swac-panel.swac-open { display: flex; }

.swac-header {
	background: var(--swac-primary); color: #fff; padding: 14px 16px;
	display: flex; justify-content: space-between; align-items: center;
}
.swac-header-title { font-weight: 600; }
.swac-close { background: none; border: none; color: #fff; font-size: 20px; cursor: pointer; }
.swac-toggle-dark { background: none; border: none; color: #fff; cursor: pointer; font-size: 16px; }

.swac-messages { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.swac-msg { max-width: 82%; padding: 9px 13px; border-radius: 14px; line-height: 1.4; font-size: 14px; white-space: pre-wrap; }
.swac-msg.bot { background: var(--swac-bubble-bot); align-self: flex-start; border-bottom-left-radius: 4px; }
.swac-msg.user { background: var(--swac-bubble-user); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.swac-msg .swac-sources { display: block; margin-top: 6px; font-size: 11px; opacity: .7; }
.swac-msg .swac-sources a { color: inherit; }

.swac-typing { align-self: flex-start; padding: 9px 13px; }
.swac-typing span { display: inline-block; width: 6px; height: 6px; margin-right: 3px; border-radius: 50%; background: #999; animation: swac-bounce 1.2s infinite; }
.swac-typing span:nth-child(2) { animation-delay: .2s; }
.swac-typing span:nth-child(3) { animation-delay: .4s; }
@keyframes swac-bounce { 0%,80%,100% { transform: translateY(0); } 40% { transform: translateY(-4px); } }

.swac-suggested { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 10px; }
.swac-chip { border: 1px solid var(--swac-primary); color: var(--swac-primary); background: transparent; border-radius: 16px; padding: 5px 11px; font-size: 12px; cursor: pointer; }
.swac-chip:hover { background: var(--swac-primary); color: #fff; }

.swac-inputbar { display: flex; gap: 8px; padding: 12px; border-top: 1px solid #e5e7eb; }
.swac-inputbar input { flex: 1; border: 1px solid #d1d5db; border-radius: 20px; padding: 9px 14px; font-size: 14px; outline: none; }
.swac-inputbar button { background: var(--swac-primary); color: #fff; border: none; border-radius: 50%; width: 38px; height: 38px; cursor: pointer; }

.swac-lead-form { padding: 12px 14px; border-top: 1px solid #e5e7eb; display: flex; flex-direction: column; gap: 6px; }
.swac-lead-form input { border: 1px solid #d1d5db; border-radius: 8px; padding: 7px 10px; font-size: 13px; }
.swac-lead-form button { background: var(--swac-primary); color: #fff; border: none; border-radius: 8px; padding: 8px; cursor: pointer; font-size: 13px; }
.swac-lead-skip { background: none !important; color: #666 !important; text-decoration: underline; }

#swac-chatbot-root.swac-dark { --swac-bg: #1f2937; --swac-text: #f3f4f6; --swac-bubble-bot: #374151; }
#swac-chatbot-root.swac-dark .swac-inputbar { border-top-color: #374151; }
#swac-chatbot-root.swac-dark .swac-inputbar input { background: #111827; color: #f3f4f6; border-color: #374151; }

@media (max-width: 480px) {
	.swac-panel { width: calc(100vw - 24px); height: calc(100vh - 140px); }
}
