#aicb-root {
	--aicb-primary: #2563eb;
}

.aicb-floating {
	position: fixed;
	bottom: 24px;
	z-index: 999999;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
.aicb-floating.aicb-pos-right { right: 24px; }
.aicb-floating.aicb-pos-left { left: 24px; }

.aicb-toggle {
	width: 60px;
	height: 60px;
	border-radius: 50%;
	border: none;
	background: var( --aicb-primary );
	color: #fff;
	cursor: pointer;
	box-shadow: 0 6px 20px rgba( 0, 0, 0, .2 );
	display: flex;
	align-items: center;
	justify-content: center;
}
.aicb-toggle.aicb-hidden { display: none; }

.aicb-window {
	width: 360px;
	max-width: calc( 100vw - 32px );
	height: 520px;
	max-height: 70vh;
	background: #fff;
	border-radius: 16px;
	box-shadow: 0 10px 40px rgba( 0, 0, 0, .2 );
	display: flex;
	flex-direction: column;
	overflow: hidden;
	position: absolute;
	bottom: 74px;
}
.aicb-pos-right .aicb-window { right: 0; }
.aicb-pos-left .aicb-window { left: 0; }
.aicb-window.aicb-hidden { display: none; }

.aicb-inline .aicb-window {
	position: static;
	width: 100%;
	max-width: 480px;
	height: 560px;
	max-height: none;
	margin: 0 auto;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.aicb-header {
	background: var( --aicb-primary );
	color: #fff;
	padding: 14px 16px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	font-weight: 600;
}
.aicb-close {
	background: none;
	border: none;
	color: #fff;
	font-size: 22px;
	cursor: pointer;
	line-height: 1;
}

.aicb-messages {
	flex: 1;
	overflow-y: auto;
	padding: 16px;
	background: #f7f8fa;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.aicb-msg {
	max-width: 80%;
	padding: 10px 14px;
	border-radius: 14px;
	font-size: 14px;
	line-height: 1.4;
	word-wrap: break-word;
}
.aicb-msg-user {
	align-self: flex-end;
	background: var( --aicb-primary );
	color: #fff;
	border-bottom-right-radius: 4px;
}
.aicb-msg-assistant {
	align-self: flex-start;
	background: #fff;
	color: #222;
	border: 1px solid #e5e7eb;
	border-bottom-left-radius: 4px;
}

.aicb-typing { display: flex; gap: 4px; padding: 14px; }
.aicb-typing span {
	width: 6px;
	height: 6px;
	background: #999;
	border-radius: 50%;
	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; }
}

.aicb-lead-form {
	display: flex;
	flex-direction: column;
	gap: 8px;
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	padding: 12px;
}
.aicb-lead-input {
	padding: 8px 10px;
	border: 1px solid #d1d5db;
	border-radius: 8px;
	font-size: 14px;
}
.aicb-lead-submit {
	background: var( --aicb-primary );
	color: #fff;
	border: none;
	padding: 9px;
	border-radius: 8px;
	cursor: pointer;
	font-weight: 600;
}
.aicb-lead-error { color: #dc2626; font-size: 13px; }

.aicb-input-row {
	display: flex;
	border-top: 1px solid #e5e7eb;
	padding: 10px;
	gap: 8px;
	background: #fff;
}
.aicb-input {
	flex: 1;
	border: 1px solid #d1d5db;
	border-radius: 20px;
	padding: 10px 14px;
	font-size: 14px;
}
.aicb-send-btn {
	background: var( --aicb-primary );
	color: #fff;
	border: none;
	border-radius: 20px;
	padding: 0 18px;
	cursor: pointer;
	font-weight: 600;
}

@media ( max-width: 480px ) {
	.aicb-window { width: calc( 100vw - 24px ); }
}
