.chiebot-chat-root {
	position: fixed;
	bottom: 1.5rem;
	right: 1.5rem;
	z-index: 99999;
	font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	--chiebot-bg: #ffffff;
	--chiebot-text: #111827;
	--chiebot-muted: #6b7280;
	--chiebot-border: #e5e7eb;
}

.chiebot-chat-root .chiebot-launcher {
	width: 56px;
	height: 56px;
	border-radius: 9999px;
	border: none;
	background: var(--chiebot-accent, #2563eb);
	color: #fff;
	box-shadow: 0 10px 30px rgba(37, 99, 235, 0.3);
	cursor: pointer;
	animation: chiebot-bounce 2s infinite;
}

.chiebot-chat-root.chiebot-open .chiebot-launcher {
	display: none;
}

.chiebot-chat-root .chiebot-panel {
	position: absolute;
	bottom: 72px;
	right: 0;
	width: min(360px, 90vw);
	max-height: 80vh;
	background: var(--chiebot-bg);
	border: 1px solid var(--chiebot-border);
	border-radius: 16px;
	box-shadow: 0 30px 60px rgba(15, 23, 42, 0.25);
	opacity: 0;
	visibility: hidden;
	transform: translateY(10px);
	transition: all 0.2s ease;
	display: flex;
	flex-direction: column;
}

.chiebot-chat-root.chiebot-open .chiebot-panel {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.chiebot-panel header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 0.75rem 1rem;
	border-bottom: 1px solid var(--chiebot-border);
}

.chiebot-panel header p {
	margin: 0;
	font-size: 0.8rem;
	color: var(--chiebot-muted);
}

.chiebot-panel .chiebot-close {
	border: none;
	background: transparent;
	font-size: 1.2rem;
	cursor: pointer;
}

.chiebot-panel .chiebot-body {
	flex: 1;
	padding: 1rem;
	overflow-y: auto;
	gap: 0.75rem;
	display: flex;
	flex-direction: column;
}

.chiebot-bubble {
	padding: 0.75rem 1rem;
	border-radius: 12px;
	max-width: 90%;
	line-height: 1.5;
	font-size: 0.95rem;
}

.chiebot-user {
	background: rgba(37, 99, 235, 0.1);
	margin-left: auto;
}

.chiebot-assistant {
	background: #f3f4f6;
	margin-right: auto;
}

.chiebot-panel footer {
	border-top: 1px solid var(--chiebot-border);
	padding: 0.75rem;
	display: flex;
	gap: 0.5rem;
}

.chiebot-panel textarea {
	flex: 1;
	resize: none;
	border-radius: 10px;
	border: 1px solid var(--chiebot-border);
	padding: 0.5rem;
	font-family: inherit;
}

.chiebot-panel .chiebot-send {
	background: var(--chiebot-accent, #2563eb);
	border: none;
	color: #fff;
	padding: 0 1rem;
	border-radius: 10px;
	cursor: pointer;
}

.chiebot-suggestions {
	padding: 0.5rem 1rem;
	border-top: 1px dashed var(--chiebot-border);
	display: flex;
	gap: 0.5rem;
	flex-wrap: wrap;
}

.chiebot-suggestions button {
	border: 1px solid var(--chiebot-border);
	border-radius: 999px;
	padding: 0.25rem 0.75rem;
	background: #fff;
	cursor: pointer;
	font-size: 0.85rem;
}

@keyframes chiebot-bounce {
	0%, 100% { transform: translateY(0); }
	50% { transform: translateY(-5px); }
}

/* Typing indicator */
.chiebot-typing {
	display: flex;
	align-items: center;
	gap: 4px;
	padding: 0.75rem 1rem;
	background: #f3f4f6;
	border-radius: 12px;
	max-width: 60px;
	margin-right: auto;
}

.chiebot-typing span {
	width: 8px;
	height: 8px;
	background: var(--chiebot-muted, #6b7280);
	border-radius: 50%;
	animation: chiebot-typing-dot 1.4s infinite ease-in-out both;
}

.chiebot-typing span:nth-child(1) { animation-delay: -0.32s; }
.chiebot-typing span:nth-child(2) { animation-delay: -0.16s; }
.chiebot-typing span:nth-child(3) { animation-delay: 0s; }

@keyframes chiebot-typing-dot {
	0%, 80%, 100% {
		transform: scale(0.6);
		opacity: 0.4;
	}
	40% {
		transform: scale(1);
		opacity: 1;
	}
}
