.aivexa-chat-root {
	--aivexa-primary: #2563eb;
	font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.aivexa-chat-mode-inline .aivexa-chat-panel {
	border: 1px solid #e5e7eb;
	border-radius: 16px;
	overflow: hidden;
	max-width: 420px;
	background: #fff;
	box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.aivexa-chat-mode-floating .aivexa-chat-launcher {
	position: fixed;
	bottom: 24px;
	z-index: 99998;
	background: var(--aivexa-primary);
	color: #fff;
	border: 0;
	border-radius: 999px;
	padding: 14px 18px;
	cursor: pointer;
	box-shadow: 0 10px 25px rgba(37, 99, 235, 0.35);
}

.aivexa-chat-position-bottom-right .aivexa-chat-launcher,
.aivexa-chat-position-bottom-right .aivexa-chat-panel {
	right: 24px;
}

.aivexa-chat-position-bottom-left .aivexa-chat-launcher,
.aivexa-chat-position-bottom-left .aivexa-chat-panel {
	left: 24px;
}

.aivexa-chat-mode-floating .aivexa-chat-panel {
	position: fixed;
	bottom: 88px;
	z-index: 99999;
	width: min(420px, calc(100vw - 32px));
	background: #fff;
	border-radius: 16px;
	overflow: hidden;
	box-shadow: 0 20px 50px rgba(15, 23, 42, 0.18);
}

.aivexa-chat-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 14px 16px;
	background: var(--aivexa-primary);
	color: #fff;
}

.aivexa-chat-title {
	margin: 0;
	font-size: 16px;
	font-weight: 600;
}

.aivexa-chat-header-actions {
	display: flex;
	gap: 8px;
}

.aivexa-chat-header-actions button {
	background: rgba(255, 255, 255, 0.15);
	border: 0;
	color: #fff;
	border-radius: 8px;
	padding: 6px 10px;
	cursor: pointer;
}

.aivexa-chat-messages {
	min-height: 280px;
	max-height: 420px;
	overflow-y: auto;
	padding: 16px;
	background: #f8fafc;
}

.aivexa-chat-message {
	margin-bottom: 12px;
	display: flex;
}

.aivexa-chat-message-user {
	justify-content: flex-end;
}

.aivexa-chat-bubble {
	max-width: 85%;
	padding: 10px 14px;
	border-radius: 14px;
	line-height: 1.5;
	white-space: pre-wrap;
	word-break: break-word;
}

.aivexa-chat-message-user .aivexa-chat-bubble {
	background: var(--aivexa-primary);
	color: #fff;
	border-bottom-right-radius: 4px;
}

.aivexa-chat-message-assistant .aivexa-chat-bubble {
	background: #fff;
	color: #111827;
	border: 1px solid #e5e7eb;
	border-bottom-left-radius: 4px;
}

.aivexa-chat-form {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 8px;
	padding: 12px;
	border-top: 1px solid #e5e7eb;
	background: #fff;
}

.aivexa-chat-input {
	width: 100%;
	resize: vertical;
	min-height: 44px;
	border: 1px solid #d1d5db;
	border-radius: 12px;
	padding: 10px 12px;
	font: inherit;
}

.aivexa-chat-send {
	background: var(--aivexa-primary);
	color: #fff;
	border: 0;
	border-radius: 12px;
	padding: 0 16px;
	cursor: pointer;
	font-weight: 600;
}

.aivexa-chat-loading {
	color: #64748b;
	font-size: 14px;
	padding: 8px 0;
}

@media (max-width: 640px) {
	.aivexa-chat-mode-floating .aivexa-chat-panel {
		left: 16px;
		right: 16px;
		width: auto;
		bottom: 84px;
	}
}
