.preslav-chatbot-root {
	--preslav-brand-color: #41c575;
	--preslav-brand-color-dark: #2f9d5c;
	--preslav-text: #1c2b24;
	--preslav-bg: #ffffff;
	--preslav-bubble-bot: #f0f5f2;
	position: fixed;
	bottom: 24px;
	z-index: 999999;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
.preslav-chatbot-root.preslav-pos-right { right: 24px; }
.preslav-chatbot-root.preslav-pos-left { left: 24px; }

.preslav-chatbot-root * { box-sizing: border-box; }

@media (max-width: 600px) {
	.preslav-chatbot-root.preslav-hide-mobile { display: none; }
}

/* Launcher button */
.preslav-chatbot-launcher {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 60px;
	height: 60px;
	padding: 0;
	background: var(--preslav-brand-color);
	color: #fff;
	border: none;
	border-radius: 50%;
	box-shadow: 0 8px 24px rgba(0,0,0,0.18);
	cursor: pointer;
	transition: transform .15s ease, box-shadow .15s ease;
}
.preslav-chatbot-launcher:hover {
	transform: translateY(-2px);
	box-shadow: 0 10px 28px rgba(0,0,0,0.22);
}
.preslav-launcher-avatar {
	width: 100%;
	height: 100%;
	border-radius: 50%;
	object-fit: cover;
}
.preslav-launcher-icon { display: inline-flex; }
.preslav-chatbot-root.preslav-open .preslav-chatbot-launcher { display: none; }

/* Chat window */
.preslav-chatbot-window {
	position: absolute;
	bottom: 70px;
	width: 370px;
	max-width: calc(100vw - 32px);
	height: 540px;
	max-height: calc(100vh - 140px);
	background: var(--preslav-bg);
	border-radius: 16px;
	box-shadow: 0 16px 48px rgba(0,0,0,0.24);
	display: flex;
	flex-direction: column;
	overflow: hidden;
}
.preslav-pos-right .preslav-chatbot-window { right: 0; }
.preslav-pos-left .preslav-chatbot-window { left: 0; }

.preslav-chatbot-header {
	background: var(--preslav-brand-color);
	color: #fff;
	padding: 14px 16px;
	display: flex;
	align-items: center;
	justify-content: space-between;
}
.preslav-header-info { display: flex; align-items: center; gap: 10px; }
.preslav-header-avatar { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; background: #fff; }
.preslav-header-title { font-weight: 700; font-size: 15px; line-height: 1.2; }
.preslav-header-sub { font-size: 12px; opacity: 0.9; }
#preslav-chatbot-close {
	background: transparent;
	border: none;
	color: #fff;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	padding: 4px 8px;
}

.preslav-chatbot-messages {
	flex: 1;
	overflow-y: auto;
	padding: 14px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	background: #fafbfa;
}

.preslav-msg {
	max-width: 85%;
	padding: 10px 13px;
	border-radius: 14px;
	font-size: 13.5px;
	line-height: 1.45;
	white-space: pre-line;
}
.preslav-msg-bot {
	align-self: flex-start;
	background: var(--preslav-bubble-bot);
	color: var(--preslav-text);
	border-bottom-left-radius: 4px;
}
.preslav-msg-user {
	align-self: flex-end;
	background: var(--preslav-brand-color);
	color: #fff;
	border-bottom-right-radius: 4px;
}
.preslav-msg-typing { opacity: 0.65; font-style: italic; }

.preslav-msg-list {
	align-self: flex-start;
	background: var(--preslav-bubble-bot);
	border-radius: 14px;
	border-bottom-left-radius: 4px;
	padding: 10px 13px;
	max-width: 92%;
	font-size: 13.5px;
}
.preslav-msg-list .preslav-list-intro { margin: 0 0 8px; font-weight: 600; }
.preslav-msg-list ul { margin: 0; padding-left: 18px; }
.preslav-msg-list li { margin-bottom: 6px; }
.preslav-msg-list li strong { color: var(--preslav-brand-color-dark); }
.preslav-list-followup { margin: 8px 0 0; font-size: 12.5px; opacity: 0.8; }

.preslav-contact-card {
	align-self: flex-start;
	background: var(--preslav-bubble-bot);
	border-radius: 14px;
	border-bottom-left-radius: 4px;
	padding: 12px 14px;
	max-width: 92%;
	font-size: 13px;
}
.preslav-contact-card strong { color: var(--preslav-brand-color-dark); }
.preslav-contact-card div { margin-bottom: 5px; }
.preslav-contact-card a { color: var(--preslav-brand-color-dark); text-decoration: none; }
.preslav-contact-card a:hover { text-decoration: underline; }

.preslav-quick-replies {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	padding: 0 14px 10px;
	background: #fafbfa;
}
.preslav-quick-reply {
	background: #fff;
	border: 1px solid var(--preslav-brand-color);
	color: var(--preslav-brand-color-dark);
	border-radius: 999px;
	padding: 6px 12px;
	font-size: 12.5px;
	cursor: pointer;
	transition: background .15s ease, color .15s ease;
}
.preslav-quick-reply:hover { background: var(--preslav-brand-color); color: #fff; }

.preslav-whatsapp-cta {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-top: 8px;
	background: #25d366;
	color: #fff !important;
	padding: 7px 12px;
	border-radius: 999px;
	font-size: 12.5px;
	font-weight: 600;
	text-decoration: none !important;
}

.preslav-chatbot-form {
	display: flex;
	gap: 8px;
	padding: 10px 12px;
	border-top: 1px solid #eee;
	background: #fff;
}
#preslav-chatbot-input {
	flex: 1;
	border: 1px solid #ddd;
	border-radius: 999px;
	padding: 10px 14px;
	font-size: 13.5px;
	outline: none;
}
#preslav-chatbot-input:focus { border-color: var(--preslav-brand-color); }
.preslav-chatbot-form button {
	background: var(--preslav-brand-color);
	color: #fff;
	border: none;
	border-radius: 50%;
	width: 40px;
	height: 40px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	flex-shrink: 0;
}

.preslav-chatbot-footer {
	display: flex;
	justify-content: center;
	gap: 16px;
	padding: 8px;
	background: #fff;
	border-top: 1px solid #f0f0f0;
}
.preslav-chatbot-footer a {
	font-size: 11.5px;
	color: var(--preslav-brand-color-dark);
	text-decoration: none;
	font-weight: 600;
}
.preslav-chatbot-footer a:hover { text-decoration: underline; }

/* Lead form */
.preslav-chatbot-lead-form {
	padding: 14px;
	border-top: 1px solid #eee;
	background: #fff;
	display: flex;
	flex-direction: column;
	gap: 8px;
	max-height: 60%;
	overflow-y: auto;
}
.preslav-chatbot-lead-form input,
.preslav-chatbot-lead-form textarea {
	width: 100%;
	border: 1px solid #ddd;
	border-radius: 8px;
	padding: 9px 11px;
	font-size: 13px;
	font-family: inherit;
	outline: none;
}
.preslav-chatbot-lead-form input:focus,
.preslav-chatbot-lead-form textarea:focus { border-color: var(--preslav-brand-color); }
.preslav-lead-actions { display: flex; gap: 8px; }
.preslav-lead-submit {
	background: var(--preslav-brand-color);
	color: #fff;
	border: none;
	border-radius: 8px;
	padding: 9px 14px;
	font-weight: 600;
	cursor: pointer;
	flex: 1;
}
.preslav-lead-cancel {
	background: #f0f0f0;
	color: #444;
	border: none;
	border-radius: 8px;
	padding: 9px 14px;
	cursor: pointer;
}
.preslav-lead-error { color: #c0392b; font-size: 12px; margin: 0; }

/* Scrollbar */
.preslav-chatbot-messages::-webkit-scrollbar { width: 6px; }
.preslav-chatbot-messages::-webkit-scrollbar-thumb { background: #ddd; border-radius: 6px; }
