#neplots-chatbot-root {
	--neplots-primary: #1f2a44;
	--neplots-secondary: #264d91;
	--neplots-accent: #ffffff;
	--neplots-radius: 16px;
	position: fixed;
	z-index: 999999;
	right: 20px;
	bottom: 20px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

#neplots-chatbot-root * {
	box-sizing: border-box;
}

/* ---------- Bubble launcher ---------- */
.neplots-bubble {
	position: relative;
	width: 60px;
	height: 60px;
	border-radius: 50%;
	background: linear-gradient(145deg, var(--neplots-secondary), var(--neplots-primary));
	border: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 8px 24px rgba(31, 42, 68, 0.35);
	color: var(--neplots-accent);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.neplots-bubble:hover {
	transform: translateY(-2px) scale(1.04);
	box-shadow: 0 12px 28px rgba(31, 42, 68, 0.45);
}
.neplots-bubble svg {
	width: 26px;
	height: 26px;
	position: absolute;
	transition: opacity 0.2s ease, transform 0.2s ease;
}
.neplots-icon-close { opacity: 0; transform: scale(0.6) rotate(-45deg); }
.neplots-icon-chat { opacity: 1; transform: scale(1) rotate(0); }
#neplots-chatbot-root.is-open .neplots-icon-chat { opacity: 0; transform: scale(0.6) rotate(45deg); }
#neplots-chatbot-root.is-open .neplots-icon-close { opacity: 1; transform: scale(1) rotate(0); }

.neplots-bubble.neplots-attention {
	animation: neplots-pulse 1.8s ease-in-out 2;
}
@keyframes neplots-pulse {
	0% { box-shadow: 0 8px 24px rgba(31, 42, 68, 0.35), 0 0 0 0 rgba(38, 77, 145, 0.5); }
	70% { box-shadow: 0 8px 24px rgba(31, 42, 68, 0.35), 0 0 0 14px rgba(38, 77, 145, 0); }
	100% { box-shadow: 0 8px 24px rgba(31, 42, 68, 0.35), 0 0 0 0 rgba(38, 77, 145, 0); }
}

.neplots-bubble-ping {
	position: absolute;
	top: -2px;
	right: -2px;
	width: 14px;
	height: 14px;
	background: #25d366;
	border: 2px solid #fff;
	border-radius: 50%;
}

/* ---------- Teaser message ---------- */
.neplots-teaser {
	position: absolute;
	bottom: 74px;
	right: 0;
	width: 280px;
	background: var(--neplots-accent);
	border-radius: var(--neplots-radius);
	box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
	padding: 14px 34px 14px 14px;
	display: flex;
	gap: 10px;
	align-items: flex-start;
	animation: neplots-pop-in 0.35s ease;
	cursor: pointer;
}
@keyframes neplots-pop-in {
	from { opacity: 0; transform: translateY(12px) scale(0.96); }
	to { opacity: 1; transform: translateY(0) scale(1); }
}
.neplots-teaser-avatar {
	flex-shrink: 0;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: var(--neplots-primary);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 600;
	font-size: 13px;
	overflow: hidden;
}
.neplots-teaser-avatar img { width: 100%; height: 100%; object-fit: cover; }
.neplots-teaser-text strong {
	display: block;
	color: var(--neplots-primary);
	font-size: 13px;
	margin-bottom: 3px;
}
.neplots-teaser-text p {
	margin: 0;
	font-size: 13px;
	line-height: 1.4;
	color: #333;
}
.neplots-teaser-close {
	position: absolute;
	top: 8px;
	right: 10px;
	background: none;
	border: none;
	font-size: 18px;
	line-height: 1;
	color: #999;
	cursor: pointer;
	padding: 2px;
}
.neplots-teaser-close:hover { color: #333; }

/* ---------- Chat window ---------- */
.neplots-window {
	position: absolute;
	bottom: 74px;
	right: 0;
	width: 370px;
	max-width: calc(100vw - 40px);
	height: 560px;
	max-height: 75vh;
	background: #f4f6fb;
	border-radius: var(--neplots-radius);
	box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
	display: flex;
	flex-direction: column;
	overflow: hidden;
	opacity: 0;
	pointer-events: none;
	transform: translateY(16px) scale(0.98);
	transition: opacity 0.22s ease, transform 0.22s ease;
}
#neplots-chatbot-root.is-open .neplots-window {
	opacity: 1;
	pointer-events: auto;
	transform: translateY(0) scale(1);
}

.neplots-header {
	background: linear-gradient(120deg, var(--neplots-primary), var(--neplots-secondary));
	color: var(--neplots-accent);
	padding: 14px 16px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-shrink: 0;
}
.neplots-header-info {
	display: flex;
	align-items: center;
	gap: 10px;
}
.neplots-avatar {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.15);
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	font-size: 14px;
	overflow: hidden;
	flex-shrink: 0;
}
.neplots-avatar img { width: 100%; height: 100%; object-fit: cover; }
.neplots-header-text strong { display: block; font-size: 14.5px; }
.neplots-status {
	font-size: 12px;
	opacity: 0.9;
	display: flex;
	align-items: center;
	gap: 5px;
}
.neplots-dot {
	width: 7px;
	height: 7px;
	background: #4ade80;
	border-radius: 50%;
	display: inline-block;
}
.neplots-window-close {
	background: none;
	border: none;
	color: var(--neplots-accent);
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	opacity: 0.9;
	padding: 2px 4px;
}
.neplots-window-close:hover { opacity: 1; }

/* ---------- Body / messages ---------- */
.neplots-body {
	flex: 1;
	overflow-y: auto;
	padding: 16px 12px;
	display: flex;
	flex-direction: column;
	gap: 10px;
}
.neplots-body::-webkit-scrollbar { width: 5px; }
.neplots-body::-webkit-scrollbar-thumb { background: #c7cee0; border-radius: 10px; }

.neplots-msg {
	max-width: 82%;
	padding: 10px 13px;
	border-radius: 14px;
	font-size: 13.5px;
	line-height: 1.45;
	animation: neplots-msg-in 0.25s ease;
}
@keyframes neplots-msg-in {
	from { opacity: 0; transform: translateY(6px); }
	to { opacity: 1; transform: translateY(0); }
}
.neplots-msg.bot {
	align-self: flex-start;
	background: #fff;
	color: #222;
	border-bottom-left-radius: 4px;
	box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}
.neplots-msg.user {
	align-self: flex-end;
	background: var(--neplots-secondary);
	color: #fff;
	border-bottom-right-radius: 4px;
}

.neplots-typing {
	align-self: flex-start;
	background: #fff;
	border-radius: 14px;
	border-bottom-left-radius: 4px;
	padding: 12px 14px;
	display: flex;
	gap: 4px;
	box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}
.neplots-typing span {
	width: 6px;
	height: 6px;
	background: #a9b3c9;
	border-radius: 50%;
	animation: neplots-bounce 1.2s infinite ease-in-out;
}
.neplots-typing span:nth-child(2) { animation-delay: 0.15s; }
.neplots-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes neplots-bounce {
	0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
	30% { transform: translateY(-4px); opacity: 1; }
}

/* Quick replies */
.neplots-quick-replies {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-self: flex-start;
	max-width: 100%;
}
.neplots-quick-btn {
	background: #fff;
	border: 1.5px solid var(--neplots-secondary);
	color: var(--neplots-secondary);
	padding: 8px 13px;
	border-radius: 20px;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease;
}
.neplots-quick-btn:hover {
	background: var(--neplots-secondary);
	color: #fff;
}
.neplots-quick-btn:disabled {
	opacity: 0.5;
	cursor: default;
}

/* Lead form */
.neplots-lead-form {
	align-self: stretch;
	background: #fff;
	border-radius: 14px;
	padding: 14px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}
.neplots-lead-form label {
	font-size: 12px;
	font-weight: 600;
	color: var(--neplots-primary);
	margin-bottom: 4px;
	display: block;
}
.neplots-lead-form input,
.neplots-lead-form select {
	width: 100%;
	padding: 9px 11px;
	border-radius: 8px;
	border: 1.5px solid #dde2ee;
	font-size: 13.5px;
	font-family: inherit;
	background: #fbfcfe;
}
.neplots-lead-form input:focus,
.neplots-lead-form select:focus {
	outline: none;
	border-color: var(--neplots-secondary);
}
.neplots-lead-submit {
	margin-top: 4px;
	background: linear-gradient(120deg, var(--neplots-primary), var(--neplots-secondary));
	color: #fff;
	border: none;
	padding: 11px;
	border-radius: 9px;
	font-size: 14px;
	font-weight: 700;
	cursor: pointer;
	transition: opacity 0.15s ease;
}
.neplots-lead-submit:hover { opacity: 0.92; }
.neplots-lead-submit:disabled { opacity: 0.6; cursor: default; }
.neplots-form-error {
	color: #c62828;
	font-size: 12px;
	margin-top: -4px;
}

/* ---------- Footer ---------- */
.neplots-footer {
	flex-shrink: 0;
	padding: 10px 14px 12px;
	background: #fff;
	border-top: 1px solid #eceff5;
}
.neplots-wa-direct {
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	background: #25d366;
	color: #fff;
	border: none;
	padding: 10px;
	border-radius: 9px;
	font-size: 13px;
	font-weight: 700;
	cursor: pointer;
	transition: opacity 0.15s ease;
}
.neplots-wa-direct:hover { opacity: 0.92; }
.neplots-hours {
	text-align: center;
	font-size: 11px;
	color: #96a0b8;
	margin-top: 7px;
}

/* ---------- Mobile responsive ---------- */
@media (max-width: 480px) {
	#neplots-chatbot-root {
		right: 14px;
		bottom: 14px;
	}
	.neplots-window {
		width: calc(100vw - 24px);
		height: 80vh;
		max-height: 80vh;
		right: -6px;
		bottom: 72px;
	}
	.neplots-teaser {
		width: min(260px, calc(100vw - 90px));
		right: -6px;
	}
	.neplots-bubble {
		width: 56px;
		height: 56px;
	}
}

.neplots-hidden-mobile {
	display: none !important;
}
