#sadiq-ai-bot-root {
	--sadiq-primary: #4f46e5;
	--sadiq-secondary: #f3f4f6;
	position: fixed;
	bottom: 24px;
	z-index: 999999;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
#sadiq-ai-bot-root.sadiq-position-bottom-right { right: 24px; }
#sadiq-ai-bot-root.sadiq-position-bottom-left { left: 24px; }

#sadiq-launcher {
	width: 60px; height: 60px; border-radius: 50%; border: none; cursor: pointer;
	background: var(--sadiq-primary); box-shadow: 0 8px 24px rgba(0,0,0,.2);
	display: flex; align-items: center; justify-content: center;
	transition: transform .2s ease;
}
#sadiq-launcher:hover { transform: scale(1.06); }

#sadiq-window {
	position: absolute; bottom: 76px; width: 360px; max-width: calc(100vw - 32px);
	height: 520px; max-height: 70vh; background: #fff; border-radius: 16px;
	box-shadow: 0 16px 48px rgba(0,0,0,.2); display: none; flex-direction: column;
	overflow: hidden;
}
#sadiq-ai-bot-root.sadiq-position-bottom-right #sadiq-window { right: 0; }
#sadiq-ai-bot-root.sadiq-position-bottom-left #sadiq-window { left: 0; }
#sadiq-ai-bot-root.sadiq-open #sadiq-window { display: flex; }

#sadiq-header {
	background: var(--sadiq-primary); color: #fff; padding: 14px 16px;
	display: flex; align-items: center; justify-content: space-between;
}
.sadiq-header-info { display: flex; align-items: center; gap: 10px; }
.sadiq-avatar {
	width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,.25);
	display: inline-block;
}
#sadiq-bot-name { display: block; font-size: 14px; }
.sadiq-status { font-size: 11px; opacity: .85; }
#sadiq-header-close {
	background: none; border: none; color: #fff; font-size: 22px; cursor: pointer; line-height: 1;
}

#sadiq-messages {
	flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px;
	background: #fafafa;
}
.sadiq-msg { display: flex; }
.sadiq-msg-user { justify-content: flex-end; }
.sadiq-bubble {
	max-width: 80%; padding: 10px 14px; border-radius: 14px; font-size: 14px; line-height: 1.45;
	white-space: pre-wrap; word-wrap: break-word;
}
.sadiq-msg-bot .sadiq-bubble { background: var(--sadiq-secondary); color: #1f2937; border-bottom-left-radius: 4px; }
.sadiq-msg-user .sadiq-bubble { background: var(--sadiq-primary); color: #fff; border-bottom-right-radius: 4px; }
.sadiq-bubble code { background: rgba(0,0,0,.08); padding: 1px 5px; border-radius: 4px; font-size: 12px; }
.sadiq-bubble pre { background: #1e1e2e; color: #e2e2e2; padding: 10px; border-radius: 8px; overflow-x: auto; font-size: 12px; }

.sadiq-msg-actions { display: flex; gap: 6px; margin-top: 4px; }
.sadiq-msg-actions button {
	background: none; border: none; cursor: pointer; opacity: .5; font-size: 12px; padding: 2px;
}
.sadiq-msg-actions button:hover { opacity: 1; }

.sadiq-typing { padding: 0 16px 8px; display: flex; gap: 4px; }
.sadiq-typing span {
	width: 6px; height: 6px; border-radius: 50%; background: #bbb;
	animation: sadiq-bounce 1.2s infinite ease-in-out;
}
.sadiq-typing span:nth-child(2) { animation-delay: .15s; }
.sadiq-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes sadiq-bounce { 0%, 60%, 100% { transform: translateY(0); } 30% { transform: translateY(-5px); } }

#sadiq-input-form {
	display: flex; gap: 8px; padding: 10px; border-top: 1px solid #eee; background: #fff;
}
#sadiq-input {
	flex: 1; resize: none; border: 1px solid #e2e2e2; border-radius: 10px; padding: 8px 10px;
	font-size: 14px; max-height: 90px; font-family: inherit;
}
#sadiq-input:focus { outline: none; border-color: var(--sadiq-primary); }
#sadiq-send {
	width: 38px; height: 38px; border-radius: 10px; border: none; background: var(--sadiq-primary);
	display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0;
}
#sadiq-send:disabled { opacity: .5; cursor: default; }

.sadiq-powered-by { text-align: center; font-size: 11px; color: #999; padding: 4px 0 8px; }

@media (max-width: 480px) {
	#sadiq-window { width: calc(100vw - 24px); height: calc(100vh - 120px); bottom: 76px; }
}
