#aicb-chatbot-root {
	--aicb-primary: #0a1f44;
	--aicb-accent: #d4af37;
	--aicb-bg: #f7f8fb;
	--aicb-panel: #ffffff;
	--aicb-text: #1a1a1a;
	--aicb-bot-bubble: #ffffff;
	--aicb-border: #eee;
	position: fixed;
	bottom: 20px;
	right: 20px;
	z-index: 999999;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}
#aicb-chatbot-root.aicb-pos-left { right: auto; left: 20px; }

/* ============ THEME: Smart Tech (dark, glowing, futuristic) ============ */
#aicb-chatbot-root.aicb-theme-tech {
	--aicb-bg: #0b1120;
	--aicb-panel: #10192e;
	--aicb-text: #e7ecff;
	--aicb-bot-bubble: #16213d;
	--aicb-border: rgba(212, 175, 55, 0.18);
}
#aicb-chatbot-root.aicb-theme-tech .aicb-window {
	background: linear-gradient(180deg, #0b1120 0%, #0e1526 100%);
	border: 1px solid rgba(212, 175, 55, 0.25);
	box-shadow: 0 0 0 1px rgba(212,175,55,.08), 0 20px 60px rgba(0,0,0,.55), 0 0 40px rgba(10,31,68,.35);
}
#aicb-chatbot-root.aicb-theme-tech .aicb-header {
	background: linear-gradient(120deg, #0a1f44 0%, #0d2a5c 45%, #142a52 100%);
	position: relative;
	overflow: hidden;
}
#aicb-chatbot-root.aicb-theme-tech .aicb-header::after {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(100deg, transparent 30%, rgba(212,175,55,.18) 50%, transparent 70%);
	background-size: 200% 100%;
	animation: aicb-shimmer 5s linear infinite;
	pointer-events: none;
}
@keyframes aicb-shimmer {
	0% { background-position: 200% 0; }
	100% { background-position: -200% 0; }
}
#aicb-chatbot-root.aicb-theme-tech .aicb-bubble { border: 1px solid rgba(212,175,55,0.08); }
#aicb-chatbot-root.aicb-theme-tech .aicb-msg-bot .aicb-bubble { box-shadow: 0 0 14px rgba(212,175,55,.06); }
#aicb-chatbot-root.aicb-theme-tech .aicb-lead-form,
#aicb-chatbot-root.aicb-theme-tech .aicb-product-card,
#aicb-chatbot-root.aicb-theme-tech .aicb-footer,
#aicb-chatbot-root.aicb-theme-tech .aicb-powered,
#aicb-chatbot-root.aicb-theme-tech .aicb-typing { background: var(--aicb-panel); border-color: var(--aicb-border); }
#aicb-chatbot-root.aicb-theme-tech .aicb-lead-form h3 { color: var(--aicb-accent); }
#aicb-chatbot-root.aicb-theme-tech .aicb-lead-form input,
#aicb-chatbot-root.aicb-theme-tech .aicb-input {
	background: #0b1526;
	color: var(--aicb-text);
	border-color: rgba(212,175,55,0.25);
}
#aicb-chatbot-root.aicb-theme-tech .aicb-lead-form input::placeholder,
#aicb-chatbot-root.aicb-theme-tech .aicb-input::placeholder { color: #7b88a8; }
#aicb-chatbot-root.aicb-theme-tech .aicb-lead-form label { color: #9fb0d6; }
#aicb-chatbot-root.aicb-theme-tech .aicb-launcher {
	background: linear-gradient(135deg, #0a1f44, #142a52);
	border-color: var(--aicb-accent);
}
#aicb-chatbot-root.aicb-theme-tech .aicb-chip {
	background: #0b1526;
	border-color: var(--aicb-accent);
	color: var(--aicb-accent);
}
#aicb-chatbot-root.aicb-theme-tech .aicb-chip:hover { background: var(--aicb-accent); color: #0a1f44; }
#aicb-chatbot-root.aicb-theme-tech .aicb-p-name,
#aicb-chatbot-root.aicb-theme-tech .aicb-status,
#aicb-chatbot-root.aicb-theme-tech .aicb-powered { color: var(--aicb-text); }
#aicb-chatbot-root.aicb-theme-tech .aicb-powered { color: #6d7ba0; }
#aicb-chatbot-root.aicb-theme-tech .aicb-p-price { color: var(--aicb-accent); }

/* ============ THEME: Dark (simple) ============ */
#aicb-chatbot-root.aicb-theme-dark {
	--aicb-bg: #1a1a1a;
	--aicb-panel: #242424;
	--aicb-text: #eee;
	--aicb-bot-bubble: #2c2c2c;
	--aicb-border: #3a3a3a;
}
#aicb-chatbot-root.aicb-theme-dark .aicb-window { background: var(--aicb-bg); }
#aicb-chatbot-root.aicb-theme-dark .aicb-lead-form,
#aicb-chatbot-root.aicb-theme-dark .aicb-product-card,
#aicb-chatbot-root.aicb-theme-dark .aicb-footer,
#aicb-chatbot-root.aicb-theme-dark .aicb-powered,
#aicb-chatbot-root.aicb-theme-dark .aicb-typing { background: var(--aicb-panel); border-color: var(--aicb-border); }
#aicb-chatbot-root.aicb-theme-dark .aicb-lead-form input,
#aicb-chatbot-root.aicb-theme-dark .aicb-input { background: #1a1a1a; color: var(--aicb-text); border-color: var(--aicb-border); }
#aicb-chatbot-root.aicb-theme-dark .aicb-lead-form label { color: #aaa; }
#aicb-chatbot-root.aicb-theme-dark .aicb-p-name, #aicb-chatbot-root.aicb-theme-dark .aicb-powered { color: var(--aicb-text); }

/* Sizes */
#aicb-chatbot-root.aicb-size-compact .aicb-window { width: 320px; height: 460px; }
#aicb-chatbot-root.aicb-size-standard .aicb-window { width: 370px; height: 560px; }
#aicb-chatbot-root.aicb-size-large .aicb-window { width: 420px; height: 640px; }

/* Launcher button */
.aicb-launcher {
	width: 62px;
	height: 62px;
	border-radius: 50%;
	background: linear-gradient(135deg, var(--aicb-primary), #16305e);
	box-shadow: 0 6px 20px rgba(10, 31, 68, 0.35);
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	border: 2px solid var(--aicb-accent);
	transition: transform .2s ease;
	position: relative;
}
.aicb-launcher:hover { transform: scale(1.06); }
.aicb-launcher-icon svg { width: 26px; height: 26px; fill: #fff; display: block; }
.aicb-launcher-active .aicb-launcher-icon { transform: rotate(10deg); }
.aicb-launcher-ring {
	position: absolute;
	inset: -6px;
	border-radius: 50%;
	border: 2px solid var(--aicb-accent);
	opacity: .55;
	animation: aicb-pulse-ring 2.2s ease-out infinite;
	pointer-events: none;
}
@keyframes aicb-pulse-ring {
	0% { transform: scale(.85); opacity: .55; }
	80% { transform: scale(1.35); opacity: 0; }
	100% { opacity: 0; }
}

/* Chat window */
.aicb-window {
	width: 370px;
	max-width: calc(100vw - 30px);
	height: 560px;
	max-height: calc(100vh - 100px);
	background: #fff;
	border-radius: 16px;
	box-shadow: 0 12px 40px rgba(0,0,0,0.25);
	display: none;
	flex-direction: column;
	overflow: hidden;
	position: absolute;
	bottom: 78px;
	right: 0;
	animation: aicb-pop .18s ease-out;
}
#aicb-chatbot-root.aicb-pos-left .aicb-window { right: auto; left: 0; }
.aicb-window.aicb-open { display: flex; }

@keyframes aicb-pop {
	from { opacity: 0; transform: translateY(10px) scale(.98); }
	to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Header */
.aicb-header {
	background: linear-gradient(135deg, var(--aicb-primary), #16305e);
	color: #fff;
	padding: 14px 16px;
	display: flex;
	align-items: center;
	gap: 10px;
	border-bottom: 2px solid var(--aicb-accent);
	flex-shrink: 0;
}
.aicb-header-avatar {
	width: 38px;
	height: 38px;
	border-radius: 50%;
	background: var(--aicb-accent);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 19px;
	flex-shrink: 0;
	overflow: hidden;
	position: relative;
	z-index: 1;
}
.aicb-header-avatar img { width: 100%; height: 100%; object-fit: cover; }
.aicb-header-text { flex: 1; min-width: 0; position: relative; z-index: 1; }
.aicb-header-text .aicb-title {
	font-weight: 700;
	font-size: 15px;
	line-height: 1.2;
	display: flex;
	align-items: center;
	gap: 6px;
	flex-wrap: wrap;
}
.aicb-ai-badge {
	display: inline-flex;
	align-items: center;
	gap: 3px;
	font-size: 10px;
	font-weight: 800;
	letter-spacing: .04em;
	background: rgba(212,175,55,0.22);
	border: 1px solid var(--aicb-accent);
	color: var(--aicb-accent);
	padding: 2px 7px 2px 5px;
	border-radius: 10px;
}
.aicb-ai-badge svg { width: 10px; height: 10px; fill: var(--aicb-accent); }
.aicb-header-text .aicb-status { font-size: 11px; opacity: .85; display: flex; align-items: center; gap: 4px; margin-top: 2px; }
.aicb-status-dot {
	width: 7px; height: 7px; border-radius: 50%; background: #4caf50; display: inline-block;
	box-shadow: 0 0 6px #4caf50;
	animation: aicb-dot-pulse 1.8s ease-in-out infinite;
}
@keyframes aicb-dot-pulse { 0%,100% { opacity: 1; } 50% { opacity: .4; } }

.aicb-close-btn {
	background: rgba(255,255,255,0.12);
	border: 1px solid rgba(255,255,255,0.25);
	color: #fff;
	cursor: pointer;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	position: relative;
	z-index: 2;
	transition: background .15s;
}
.aicb-close-btn svg { width: 14px; height: 14px; fill: #fff; display: block; }
.aicb-close-btn:hover { background: rgba(255,255,255,0.25); }

/* Body */
.aicb-body {
	flex: 1;
	overflow-y: auto;
	padding: 16px;
	background: var(--aicb-bg);
	display: flex;
	flex-direction: column;
	gap: 12px;
}

/* Lead form */
.aicb-lead-form {
	background: var(--aicb-panel);
	border-radius: 12px;
	padding: 18px;
	box-shadow: 0 2px 8px rgba(0,0,0,0.06);
	border: 1px solid var(--aicb-border);
}
.aicb-lead-form h3 {
	margin: 0 0 14px;
	font-size: 15px;
	color: var(--aicb-primary);
}
.aicb-lead-form label {
	display: block;
	font-size: 12px;
	color: #555;
	margin-bottom: 4px;
	margin-top: 12px;
	font-weight: 600;
}
.aicb-lead-form input[type="text"],
.aicb-lead-form input[type="tel"] {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #ddd;
	border-radius: 8px;
	font-size: 14px;
	box-sizing: border-box;
}
.aicb-lead-form input:focus {
	outline: none;
	border-color: var(--aicb-accent);
}
.aicb-consent-row {
	display: flex !important;
	align-items: flex-start;
	gap: 8px;
	margin-top: 14px;
	font-size: 12px;
	color: #666;
	font-weight: 400 !important;
}
.aicb-consent-row input[type="checkbox"] { margin-top: 2px; flex-shrink: 0; width: auto; }
.aicb-lead-error {
	color: #e53935;
	font-size: 12px;
	margin-top: 6px;
	display: none;
}
.aicb-lead-submit {
	width: 100%;
	margin-top: 16px;
	padding: 11px;
	background: var(--aicb-primary);
	color: #fff;
	border: none;
	border-radius: 8px;
	font-weight: 700;
	font-size: 14px;
	cursor: pointer;
	transition: background .15s;
}
.aicb-lead-submit:hover { background: #16305e; }
.aicb-lead-submit:disabled { opacity: .6; cursor: not-allowed; }

/* Chat bubbles */
.aicb-msg { display: flex; flex-direction: column; max-width: 82%; }
.aicb-msg-bot { align-self: flex-start; align-items: flex-start; }
.aicb-msg-user { align-self: flex-end; align-items: flex-end; }
.aicb-bubble {
	padding: 10px 13px;
	border-radius: 14px;
	font-size: 13.5px;
	line-height: 1.45;
	white-space: pre-wrap;
	word-break: break-word;
}
.aicb-msg-bot .aicb-bubble {
	background: var(--aicb-bot-bubble);
	color: var(--aicb-text);
	border-bottom-left-radius: 4px;
	box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.aicb-msg-user .aicb-bubble {
	background: var(--aicb-primary);
	color: #fff;
	border-bottom-right-radius: 4px;
}

/* Typing indicator */
.aicb-typing { display: flex; gap: 4px; padding: 12px 14px; background: var(--aicb-bot-bubble); border-radius: 14px; border-bottom-left-radius: 4px; width: fit-content; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.aicb-typing span {
	width: 6px; height: 6px; border-radius: 50%; background: var(--aicb-accent);
	animation: aicb-blink 1.2s infinite;
}
.aicb-typing span:nth-child(2) { animation-delay: .2s; }
.aicb-typing span:nth-child(3) { animation-delay: .4s; }
@keyframes aicb-blink { 0%, 80%, 100% { opacity: .3; } 40% { opacity: 1; } }

/* Product cards */
.aicb-products { display: flex; flex-direction: column; gap: 10px; max-width: 90%; align-self: flex-start; }
.aicb-product-card {
	display: flex;
	gap: 10px;
	background: var(--aicb-panel);
	border-radius: 12px;
	padding: 10px;
	box-shadow: 0 1px 4px rgba(0,0,0,0.1);
	border: 1px solid var(--aicb-border);
	text-decoration: none;
	color: inherit;
	transition: transform .12s, box-shadow .12s;
}
.aicb-product-card:hover { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(0,0,0,0.15); }
.aicb-product-card img {
	width: 60px;
	height: 60px;
	object-fit: cover;
	border-radius: 8px;
	flex-shrink: 0;
	background: #f0f0f0;
}
.aicb-product-info { flex: 1; min-width: 0; }
.aicb-product-info .aicb-p-name { font-weight: 700; font-size: 13px; margin-bottom: 2px; }
.aicb-product-info .aicb-p-price { font-size: 13px; color: var(--aicb-primary); font-weight: 700; }
.aicb-product-info .aicb-p-stock { font-size: 11px; margin-top: 2px; }
.aicb-p-stock.in { color: #2e7d32; }
.aicb-p-stock.out { color: #c62828; }
.aicb-product-view-btn {
	margin-top: 6px;
	display: inline-block;
	font-size: 11px;
	font-weight: 700;
	color: #0a1f44;
	background: var(--aicb-accent);
	padding: 4px 10px;
	border-radius: 20px;
}

/* Quick reply chips */
.aicb-quick-replies {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-self: flex-start;
	max-width: 92%;
}
.aicb-chip {
	background: #fff;
	border: 1.5px solid var(--aicb-primary);
	color: var(--aicb-primary);
	font-size: 12.5px;
	font-weight: 600;
	padding: 7px 13px;
	border-radius: 18px;
	cursor: pointer;
	transition: background .15s, color .15s;
}
.aicb-chip:hover {
	background: var(--aicb-primary);
	color: #fff;
}

/* WhatsApp handoff button */
.aicb-whatsapp-btn {
	align-self: flex-start;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: #25D366;
	color: #fff;
	text-decoration: none;
	font-size: 13px;
	font-weight: 700;
	padding: 9px 16px;
	border-radius: 20px;
	box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}
.aicb-whatsapp-btn:hover { opacity: .92; }

/* Footer / input */
.aicb-footer {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 10px 12px;
	background: var(--aicb-panel);
	border-top: 1px solid var(--aicb-border);
	flex-shrink: 0;
}
.aicb-input {
	flex: 1;
	border: 1px solid #ddd;
	border-radius: 22px;
	padding: 10px 16px;
	font-size: 13.5px;
	resize: none;
	max-height: 80px;
	font-family: inherit;
}
.aicb-input:focus { outline: none; border-color: var(--aicb-accent); }
.aicb-send-btn {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: var(--aicb-primary);
	border: none;
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	flex-shrink: 0;
	transition: background .15s;
}
.aicb-send-btn:hover { background: #16305e; }
.aicb-send-btn svg { width: 18px; height: 18px; fill: #fff; }
.aicb-powered { text-align: center; font-size: 10px; color: #aaa; padding: 5px 0 8px; background: var(--aicb-panel); flex-shrink: 0; }

@media (max-width: 480px) {
	.aicb-window { width: calc(100vw - 20px); right: -10px; height: calc(100vh - 120px); }
	#aicb-chatbot-root.aicb-pos-left .aicb-window { left: -10px; }
}
