:root {
	--woo-ai-primary: #0f766e;
	--woo-ai-bg: #ffffff;
	--woo-ai-text: #0f172a;
	--woo-ai-muted: #64748b;
	--woo-ai-border: rgba(15, 23, 42, 0.14);
	--woo-ai-shadow: 0 18px 42px rgba(2, 6, 23, 0.18);
	--woo-ai-radius: 16px;
	--woo-ai-z: 999999;
}

.woo-ai-agent-root {
	position: fixed;
	bottom: 20px;
	right: 20px;
	z-index: var(--woo-ai-z);
	font-family: "Space Grotesk", "Segoe UI", sans-serif;
}

.woo-ai-agent-root[data-position="bottom-left"] {
	left: 20px;
	right: auto;
}

.woo-ai-launcher {
	width: 58px;
	height: 58px;
	border-radius: 999px;
	border: 0;
	background: linear-gradient(135deg, var(--woo-ai-primary), #10b981);
	color: #fff;
	box-shadow: var(--woo-ai-shadow);
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.woo-ai-launcher:hover,
.woo-ai-launcher:focus-visible {
	transform: translateY(-2px);
	box-shadow: 0 24px 52px rgba(2, 6, 23, 0.25);
}

.woo-ai-launcher:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
}

.woo-ai-launcher-icon {
	font-weight: 700;
	font-size: 0.94rem;
	letter-spacing: 0.08em;
}

.woo-ai-chat {
	position: absolute;
	bottom: 72px;
	right: 0;
	width: min(94vw, 390px);
	max-height: min(78vh, 620px);
	background: color-mix(in srgb, var(--woo-ai-bg) 92%, #fff);
	color: var(--woo-ai-text);
	border-radius: var(--woo-ai-radius);
	border: 1px solid var(--woo-ai-border);
	box-shadow: var(--woo-ai-shadow);
	display: flex;
	flex-direction: column;
	overflow: hidden;
	transform: translateY(14px) scale(0.98);
	opacity: 0;
	pointer-events: none;
	transition: transform 0.2s ease, opacity 0.2s ease;
	backdrop-filter: blur(8px);
}

.woo-ai-agent-root[data-position="bottom-left"] .woo-ai-chat {
	left: 0;
	right: auto;
}

.woo-ai-chat.is-open {
	transform: translateY(0) scale(1);
	opacity: 1;
	pointer-events: auto;
}

.woo-ai-chat__header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 12px 14px;
	background: linear-gradient(155deg, var(--woo-ai-primary), #0b4f47);
	color: #fff;
}

.woo-ai-chat__bot {
	display: inline-flex;
	align-items: center;
	gap: 10px;
}

.woo-ai-chat__avatar {
	width: 30px;
	height: 30px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.18);
	background-size: cover;
	background-position: center;
}

.woo-ai-chat__controls {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.woo-ai-chat__controls button {
	border: 0;
	background: rgba(255, 255, 255, 0.18);
	color: #fff;
	width: 28px;
	height: 28px;
	border-radius: 8px;
	cursor: pointer;
}

.woo-ai-chat__messages {
	padding: 14px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	overflow: auto;
	min-height: 220px;
	max-height: min(58vh, 460px);
	background:
		radial-gradient(circle at 0 0, rgba(15, 118, 110, 0.08), transparent 48%),
		radial-gradient(circle at 100% 100%, rgba(16, 185, 129, 0.08), transparent 44%);
}

.woo-ai-message {
	max-width: 87%;
	padding: 10px 12px;
	border-radius: 14px;
	line-height: 1.4;
	font-size: 0.92rem;
	word-break: break-word;
}

.woo-ai-message--bot {
	align-self: flex-start;
	background: rgba(241, 245, 249, 0.92);
	color: var(--woo-ai-text);
	border-bottom-left-radius: 6px;
}

.woo-ai-message--user {
	align-self: flex-end;
	background: var(--woo-ai-primary);
	color: #fff;
	border-bottom-right-radius: 6px;
}

.woo-ai-message p {
	margin: 0;
}

.woo-ai-message ul,
.woo-ai-message ol {
	padding-left: 18px;
	margin: 6px 0;
}

.woo-ai-message a {
	color: inherit;
	text-decoration: underline;
}

.woo-ai-chat__typing {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 0 14px 10px;
	color: var(--woo-ai-muted);
}

.woo-ai-chat__typing span {
	width: 6px;
	height: 6px;
	border-radius: 999px;
	background: var(--woo-ai-muted);
	animation: wooAiBlink 1.2s infinite;
}

.woo-ai-chat__typing span:nth-child(2) {
	animation-delay: 0.2s;
}

.woo-ai-chat__typing span:nth-child(3) {
	animation-delay: 0.4s;
}

@keyframes wooAiBlink {
	0%, 80%, 100% { opacity: 0.25; transform: translateY(0); }
	40% { opacity: 1; transform: translateY(-2px); }
}

.woo-ai-chat__quick {
	padding: 0 12px 10px;
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.woo-ai-quick-btn {
	border: 1px solid var(--woo-ai-border);
	background: #fff;
	color: var(--woo-ai-text);
	font-size: 0.78rem;
	padding: 7px 10px;
	border-radius: 999px;
	cursor: pointer;
}

.woo-ai-chat__input {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 8px;
	padding: 12px;
	border-top: 1px solid var(--woo-ai-border);
	background: #fff;
}

.woo-ai-chat__input input {
	width: 100%;
	min-height: 42px;
	padding: 10px 12px;
	border: 1px solid var(--woo-ai-border);
	border-radius: 10px;
	background: #fff;
	color: var(--woo-ai-text);
}

.woo-ai-chat__input button {
	border: 0;
	border-radius: 10px;
	min-width: 72px;
	background: var(--woo-ai-primary);
	color: #fff;
	padding: 0 14px;
	cursor: pointer;
	font-weight: 600;
}

.woo-ai-card-list {
	display: grid;
	gap: 8px;
}

.woo-ai-card {
	display: grid;
	grid-template-columns: 64px 1fr;
	gap: 10px;
	padding: 8px;
	border: 1px solid var(--woo-ai-border);
	border-radius: 12px;
	background: #fff;
}

.woo-ai-card img {
	width: 64px;
	height: 64px;
	object-fit: cover;
	border-radius: 8px;
}

.woo-ai-card__name {
	font-weight: 600;
	font-size: 0.84rem;
	margin: 0 0 2px;
}

.woo-ai-card__meta {
	font-size: 0.76rem;
	color: var(--woo-ai-muted);
	margin-bottom: 6px;
}

.woo-ai-card__cta {
	font-size: 0.74rem;
	border: 0;
	background: var(--woo-ai-primary);
	color: #fff;
	border-radius: 8px;
	padding: 6px 9px;
	cursor: pointer;
}

@media (max-width: 640px) {
	.woo-ai-agent-root {
		bottom: 12px;
		right: 12px;
		left: auto;
	}
	.woo-ai-agent-root[data-position="bottom-left"] {
		left: 12px;
	}
	.woo-ai-chat {
		width: min(96vw, 430px);
		max-height: 78vh;
	}
}

@media (prefers-color-scheme: dark) {
	:root {
		--woo-ai-bg: #111827;
		--woo-ai-text: #f8fafc;
		--woo-ai-muted: #cbd5e1;
		--woo-ai-border: rgba(148, 163, 184, 0.25);
	}
	.woo-ai-chat {
		background: color-mix(in srgb, var(--woo-ai-bg) 92%, #000);
	}
	.woo-ai-message--bot,
	.woo-ai-chat__input,
	.woo-ai-card,
	.woo-ai-quick-btn,
	.woo-ai-chat__input input {
		background: rgba(15, 23, 42, 0.75);
		color: var(--woo-ai-text);
	}
}

