.eslc-root {
	--eslc-green: #128c7e;
	--eslc-green-dark: #075e54;
	--eslc-lime: #25d366;
	--eslc-bubble-out: #dcf8c6;
	--eslc-bubble-in: #ffffff;
	--eslc-bg: #ece5dd;
	--eslc-text: #111b21;
	--eslc-muted: #667781;
	--eslc-shadow: 0 12px 40px rgba(0, 0, 0, 0.22);
	font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
	z-index: 999999;
	position: relative;
}

.eslc-launcher {
	position: fixed;
	right: 22px;
	bottom: 22px;
	width: 60px;
	height: 60px;
	border: 0;
	border-radius: 50%;
	background: linear-gradient(145deg, var(--eslc-lime), var(--eslc-green));
	color: #fff;
	cursor: pointer;
	box-shadow: 0 8px 24px rgba(18, 140, 126, 0.45);
	display: grid;
	place-items: center;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
	z-index: 1000000;
}

.eslc-launcher:hover {
	transform: scale(1.06);
	box-shadow: 0 10px 28px rgba(18, 140, 126, 0.55);
}

.eslc-launcher.is-open .eslc-icon-chat { display: none; }
.eslc-launcher:not(.is-open) .eslc-icon-close { display: none; }

.eslc-launcher-badge {
	position: absolute;
	top: -2px;
	right: -2px;
	min-width: 20px;
	height: 20px;
	padding: 0 6px;
	border-radius: 999px;
	background: #ef4444;
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	display: grid;
	place-items: center;
	border: 2px solid #fff;
}

.eslc-panel {
	position: fixed;
	right: 22px;
	bottom: 96px;
	width: min(380px, calc(100vw - 24px));
	height: min(560px, calc(100vh - 120px));
	background: #fff;
	border-radius: 18px;
	overflow: hidden;
	box-shadow: var(--eslc-shadow);
	display: flex;
	flex-direction: column;
	z-index: 1000000;
	animation: eslc-rise 0.22s ease;
}

@keyframes eslc-rise {
	from { opacity: 0; transform: translateY(12px) scale(0.98); }
	to { opacity: 1; transform: translateY(0) scale(1); }
}

.eslc-header {
	background: linear-gradient(135deg, var(--eslc-green-dark), var(--eslc-green));
	color: #fff;
	padding: 14px 14px 14px 16px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
}

.eslc-header-main {
	display: flex;
	align-items: center;
	gap: 12px;
}

.eslc-avatar {
	width: 42px;
	height: 42px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.2);
	display: grid;
	place-items: center;
	font-weight: 700;
	border: 2px solid rgba(255, 255, 255, 0.35);
}

.eslc-title {
	display: block;
	font-size: 16px;
	line-height: 1.2;
}

.eslc-status {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 12px;
	opacity: 0.95;
	margin-top: 2px;
}

.eslc-status-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #9ca3af;
	box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.2);
}

.eslc-status-dot.is-online {
	background: #4ade80;
	box-shadow: 0 0 0 2px rgba(74, 222, 128, 0.25);
}

.eslc-minimize {
	background: transparent;
	border: 0;
	color: #fff;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	opacity: 0.85;
	width: 32px;
	height: 32px;
}

.eslc-body {
	flex: 1;
	min-height: 0;
	display: flex;
	flex-direction: column;
	background: var(--eslc-bg);
	background-image:
		radial-gradient(rgba(0, 0, 0, 0.04) 1px, transparent 1px);
	background-size: 18px 18px;
}

.eslc-start {
	padding: 18px;
	display: flex;
	flex-direction: column;
	gap: 12px;
	overflow: auto;
}

.eslc-welcome {
	margin: 0;
	background: #fff;
	border-radius: 12px;
	padding: 12px 14px;
	color: var(--eslc-text);
	font-size: 14px;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.eslc-form {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.eslc-form input,
.eslc-form textarea,
.eslc-composer textarea {
	width: 100%;
	border: 1px solid #d1d5db;
	border-radius: 12px;
	padding: 11px 12px;
	font: inherit;
	color: var(--eslc-text);
	background: #fff;
	resize: none;
	box-sizing: border-box;
}

.eslc-form input:focus,
.eslc-form textarea:focus,
.eslc-composer textarea:focus {
	outline: none;
	border-color: var(--eslc-green);
	box-shadow: 0 0 0 3px rgba(18, 140, 126, 0.15);
}

.eslc-btn,
.eslc-send {
	border: 0;
	cursor: pointer;
	background: var(--eslc-green);
	color: #fff;
}

.eslc-btn {
	border-radius: 12px;
	padding: 12px 14px;
	font-weight: 600;
	font-size: 14px;
}

.eslc-btn:hover { background: var(--eslc-green-dark); }

.eslc-thread {
	flex: 1;
	min-height: 0;
	display: flex;
	flex-direction: column;
}

.eslc-messages {
	flex: 1;
	overflow-y: auto;
	padding: 14px 12px;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.eslc-bubble {
	max-width: 82%;
	padding: 8px 10px 6px;
	border-radius: 10px;
	font-size: 14px;
	line-height: 1.4;
	color: var(--eslc-text);
	box-shadow: 0 1px 1px rgba(0, 0, 0, 0.06);
	word-wrap: break-word;
	white-space: pre-wrap;
}

.eslc-bubble.is-visitor {
	align-self: flex-end;
	background: var(--eslc-bubble-out);
	border-top-right-radius: 3px;
}

.eslc-bubble.is-admin {
	align-self: flex-start;
	background: var(--eslc-bubble-in);
	border-top-left-radius: 3px;
}

.eslc-bubble time {
	display: block;
	text-align: right;
	font-size: 11px;
	color: var(--eslc-muted);
	margin-top: 4px;
}

.eslc-composer {
	display: flex;
	align-items: flex-end;
	gap: 8px;
	padding: 10px;
	background: #f0f2f5;
	border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.eslc-composer textarea {
	flex: 1;
	min-height: 42px;
	max-height: 110px;
	border-radius: 22px;
	padding: 11px 14px;
}

.eslc-send {
	width: 42px;
	height: 42px;
	border-radius: 50%;
	display: grid;
	place-items: center;
	flex-shrink: 0;
	background: var(--eslc-green);
}

.eslc-send:hover { background: var(--eslc-green-dark); }

@media (max-width: 480px) {
	.eslc-launcher {
		right: 14px;
		bottom: 14px;
	}
	.eslc-panel {
		right: 0;
		bottom: 0;
		width: 100vw;
		height: 100vh;
		height: 100dvh;
		border-radius: 0;
	}
}
