.lx-w {
	--lx-a: #22c55e;
	--lx-a-dark: #16a34a;
	--lx-head: #22c55e;
	--lx-bg: #ffffff;
	--lx-fg: #111827;
	--lx-muted: #6b7280;
	--lx-soft: #f3f4f6;
	--lx-border: #eef0f3;
	--lx-bubble-in: #f2f3f5;
	--lx-bubble-out: #ecfdf5;
	--lx-input-bg: #f3f4f6;
	--lx-day-bg: #f1f2f4;
	--lx-shadow: rgba(15, 23, 42, .22);
	position: fixed;
	right: 20px;
	bottom: 20px;
	z-index: 99999;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	color: var(--lx-fg);
	line-height: 1.4;
	box-sizing: border-box;
}
.lx-w[data-theme="dark"] {
	--lx-bg: #0b0d10;
	--lx-fg: #f3f4f6;
	--lx-muted: #8b919a;
	--lx-soft: #0b0d10;
	--lx-border: #1c2026;
	--lx-bubble-in: #0b0d10;
	--lx-bubble-out: #0b0d10;
	--lx-input-bg: #0b0d10;
	--lx-day-bg: #0b0d10;
	--lx-shadow: rgba(0, 0, 0, .75);
}
.lx-w[data-theme="dark"] .lx-w-bubble {
	box-shadow: inset 0 0 0 1px #1c2026;
}
.lx-w[data-theme="dark"] .lx-w-foot input {
	box-shadow: inset 0 0 0 1px #1c2026;
}
.lx-w[data-theme="dark"] .lx-w-reacts button {
	background: #15181d;
	box-shadow: 0 1px 4px rgba(0,0,0,.35);
}
.lx-w[data-theme="dark"] .lx-w-reacts button.is-mine {
	background: #1a2228;
	box-shadow: 0 0 0 1px rgba(47,198,246,.35);
}
.lx-w[data-theme="dark"] .lx-w-actions,
.lx-w[data-theme="dark"] .lx-w-react-pop {
	background: #0b0d10;
	border-color: #1c2026;
}
.lx-w *,
.lx-w *::before,
.lx-w *::after { box-sizing: border-box; }
.lx-w.is-left { right: auto; left: 20px; }

.lx-w-btn {
	position: relative;
	width: 60px;
	height: 60px;
	padding: 0 !important;
	margin: 0;
	border: 0 !important;
	border-radius: 50%;
	background-color: var(--lx-a) !important;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath stroke='%23fff' stroke-width='1.9' stroke-linejoin='round' d='M6 7h12a2.5 2.5 0 0 1 2.5 2.5v5A2.5 2.5 0 0 1 18 17h-5.4L8.2 20.2V17H6a2.5 2.5 0 0 1-2.5-2.5v-5A2.5 2.5 0 0 1 6 7z'/%3E%3C/svg%3E");
	background-repeat: no-repeat !important;
	background-position: center center !important;
	background-size: 30px 30px !important;
	color: #fff !important;
	cursor: pointer;
	box-shadow: 0 8px 24px rgba(34, 197, 94, .35);
	appearance: none;
	-webkit-appearance: none;
	transition: transform .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.lx-w-btn svg,
.lx-w-ico { display: none !important; }
.lx-w.is-open .lx-w-btn { display: none !important; }
.lx-w-btn:hover {
	background-color: var(--lx-a-dark) !important;
	transform: scale(1.05);
	box-shadow: 0 10px 28px rgba(34, 197, 94, .45);
}

.lx-w-panel {
	position: absolute;
	right: 0;
	bottom: 0;
	width: 360px;
	max-width: calc(100vw - 24px);
	height: 560px;
	max-height: calc(100vh - 40px);
	background: var(--lx-bg);
	border-radius: 16px;
	box-shadow: 0 16px 48px var(--lx-shadow);
	display: none;
	flex-direction: column;
	overflow: hidden;
	color: var(--lx-fg);
}
.lx-w.is-left .lx-w-panel { right: auto; left: 0; }
.lx-w-panel.is-open { display: flex; }

.lx-w-chat {
	flex: 1;
	min-height: 0;
	display: flex;
	flex-direction: column;
}
.lx-w-chat.is-hidden,
.lx-w-lead.is-hidden { display: none !important; }

.lx-w-lead {
	flex: 1;
	min-height: 0;
	overflow-y: auto;
	padding: 20px 18px 16px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	background: var(--lx-bg);
}
.lx-w-lead-title {
	font-size: 17px;
	font-weight: 700;
	color: var(--lx-fg);
}
.lx-w-lead-hint {
	font-size: 13px;
	color: var(--lx-muted);
	margin: -4px 0 6px;
}
.lx-w-lead-field {
	display: flex;
	flex-direction: column;
	gap: 5px;
	font-size: 12px;
	color: var(--lx-muted);
	font-weight: 600;
}
.lx-w-lead-field input {
	border: 1px solid var(--lx-border);
	border-radius: 10px;
	padding: 10px 12px;
	font-size: 14px;
	color: var(--lx-fg);
	background: var(--lx-bg);
	outline: none;
	font-weight: 400;
}
.lx-w-lead-field input:focus {
	border-color: var(--lx-a);
	box-shadow: 0 0 0 3px rgba(34, 197, 94, .15);
}
.lx-w-lead-error {
	font-size: 13px;
	color: #dc2626;
	background: #fef2f2;
	border: 1px solid #fecaca;
	border-radius: 8px;
	padding: 8px 10px;
}
.lx-w-lead-error.is-hidden { display: none !important; }
.lx-w-lead-btn {
	margin-top: 6px;
	border: 0;
	border-radius: 10px;
	padding: 12px 14px;
	background: var(--lx-a);
	color: #fff;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
}
.lx-w-lead-btn:hover { background: var(--lx-a-dark); }
.lx-w-lead-btn:disabled { opacity: .6; cursor: wait; }

.lx-w-head {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 14px 12px 14px 16px;
	background: var(--lx-head);
	color: #fff;
	border-bottom: 0;
	flex-shrink: 0;
}
.lx-w-head .lx-w-name { color: #fff; }
.lx-w-head .lx-w-status { color: rgba(255,255,255,.85); margin-top: 0; }
.lx-w-head .lx-w-close { color: rgba(255,255,255,.85); }
.lx-w-head .lx-w-close:hover { color: #fff; }
.lx-w-ava {
	position: relative;
	width: 44px;
	height: 44px;
	flex-shrink: 0;
}
.lx-w-ava img,
.lx-w-ava-ph {
	width: 44px;
	height: 44px;
	border-radius: 50%;
	object-fit: cover;
	display: block;
}
.lx-w-ava-ph {
	background: rgba(255,255,255,.25);
	color: #fff;
	font-weight: 700;
	font-size: 17px;
	display: flex;
	align-items: center;
	justify-content: center;
	line-height: 1;
	padding: 0;
}
.lx-w-online {
	position: absolute;
	right: 1px;
	bottom: 1px;
	width: 11px;
	height: 11px;
	border-radius: 50%;
	background: #86efac;
	border: 2px solid var(--lx-head);
}
.lx-w-head-info {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 1px;
}
.lx-w-name {
	font-size: 16px;
	font-weight: 700;
	line-height: 1.2;
	color: var(--lx-fg);
}
.lx-w-bubble .lx-w-name {
	font-size: 12px;
	font-weight: 600;
	color: var(--lx-muted);
	margin: 0 0 4px;
}
.lx-w-status {
	font-size: 13px;
	color: var(--lx-muted);
	margin-top: 2px;
}
.lx-w-close {
	border: 0;
	background: transparent;
	color: var(--lx-muted);
	font-size: 24px;
	cursor: pointer;
	line-height: 1;
	padding: 4px 8px;
	flex-shrink: 0;
}
.lx-w-close:hover { color: var(--lx-fg); }

.lx-w-body {
	flex: 1;
	overflow-x: hidden;
	overflow-y: auto;
	padding: 16px 14px 12px;
	background: var(--lx-bg);
	display: flex;
	flex-direction: column;
	gap: 12px;
}
.lx-w-day {
	text-align: center;
	margin: 2px 0 4px;
}
.lx-w-day span {
	display: inline-block;
	background: var(--lx-day-bg);
	color: var(--lx-muted);
	font-size: 12px;
	padding: 4px 12px;
	border-radius: 999px;
}

.lx-w-row {
	display: flex;
	align-items: flex-end;
	gap: 8px;
	max-width: 85%;
	position: relative;
}
.lx-w-row.in { align-self: flex-start; }
.lx-w-row.out {
	align-self: flex-end;
	flex-direction: row-reverse;
	max-width: 80%;
}
.lx-w-row.in.no-ava { padding-left: 36px; }
.lx-w-row.is-deleted .lx-w-bubble {
	opacity: .9;
	font-style: normal;
	color: inherit;
}
.lx-w-struck {
	text-decoration: line-through;
	color: #828b95;
}
.lx-w-msg-ava {
	width: 28px;
	height: 28px;
	border-radius: 50%;
	object-fit: cover;
	flex-shrink: 0;
	background: linear-gradient(145deg, #6ee7b7, #10b981);
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	display: flex;
	align-items: center;
	justify-content: center;
	line-height: 1;
	padding: 0;
}
.lx-w-bubble {
	background: var(--lx-bubble-in);
	border-radius: 16px;
	padding: 10px 12px 7px;
	font-size: 14px;
	line-height: 1.45;
	color: var(--lx-fg);
	white-space: pre-wrap;
	word-break: break-word;
	text-align: left;
	position: relative;
	overflow: visible;
}
.lx-w-row.in .lx-w-bubble { border-bottom-left-radius: 5px; }
.lx-w-row.out .lx-w-bubble {
	background: var(--lx-bubble-out);
	border-bottom-right-radius: 5px;
}
.lx-w-text { display: block; }
.lx-w-quote {
	border-left: 3px solid var(--lx-a);
	background: var(--lx-soft);
	padding: 4px 8px;
	margin-bottom: 6px;
	border-radius: 0 8px 8px 0;
	font-size: 12px;
	color: var(--lx-muted);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.lx-w-actions {
	display: none;
	gap: 2px;
	position: absolute;
	top: -12px;
	right: 6px;
	background: var(--lx-bg);
	border: 1px solid var(--lx-border);
	border-radius: 8px;
	padding: 2px;
	box-shadow: 0 4px 12px var(--lx-shadow);
	z-index: 3;
}
.lx-w-row:hover .lx-w-actions,
.lx-w-actions.is-open { display: flex; }
.lx-w-row.is-deleted .lx-w-actions { display: none !important; }
.lx-w-row.is-reacting { z-index: 4; }
.lx-w-actions button {
	border: 0;
	background: transparent;
	cursor: pointer;
	padding: 3px 5px;
	font-size: 12px;
	border-radius: 5px;
	line-height: 1;
	color: var(--lx-fg);
}
.lx-w-actions button:hover { background: var(--lx-soft); }
.lx-w-react-btn {
	display: none;
	position: absolute;
	right: 4px;
	bottom: 2px;
	border: 0;
	background: transparent;
	cursor: pointer;
	font-size: 13px;
	padding: 2px 3px;
	border-radius: 6px;
	line-height: 1;
	opacity: .55;
	z-index: 2;
}
.lx-w-row:hover .lx-w-react-btn,
.lx-w-row.is-reacting .lx-w-react-btn { display: inline-flex; }
.lx-w-row.has-reacts .lx-w-react-btn { bottom: 14px; }
.lx-w-react-btn:hover { opacity: 1; background: var(--lx-soft); }
.lx-w-row.is-deleted .lx-w-react-btn { display: none !important; }
.lx-w-react-pop {
	display: none;
	position: absolute;
	right: 0;
	bottom: calc(100% + 6px);
	top: auto;
	background: var(--lx-bg);
	border: 1px solid var(--lx-border);
	border-radius: 20px;
	padding: 3px 5px;
	box-shadow: 0 8px 18px var(--lx-shadow);
	gap: 1px;
	z-index: 6;
	align-items: center;
}
.lx-w-react-pop.is-open { display: inline-flex; }
.lx-w-react-pop button {
	border: 0;
	background: transparent;
	font-size: 18px;
	cursor: pointer;
	padding: 3px;
	border-radius: 50%;
	width: 30px;
	height: 30px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}
.lx-w-react-pop button:hover { background: var(--lx-soft); }
.lx-w-react-pop button:first-child { background: #2fc6f6; }
.lx-w-foot {
	display: none;
}
.lx-w-reacts {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	position: absolute;
	right: 8px;
	left: auto;
	bottom: -10px;
	z-index: 2;
	margin: 0;
	justify-content: flex-end;
	max-width: calc(100% - 16px);
	pointer-events: auto;
}
.lx-w-row.has-reacts {
	margin-bottom: 18px;
}
.lx-w-reacts button {
	border: 0;
	background: #e8f6fc;
	border-radius: 12px;
	padding: 2px 7px 2px 5px;
	font-size: 13px;
	cursor: pointer;
	color: var(--lx-fg);
	display: inline-flex;
	align-items: center;
	gap: 3px;
	box-shadow: 0 1px 4px rgba(0,0,0,.12);
	min-height: 22px;
}
.lx-w-reacts button span { font-size: 11px; color: var(--lx-muted); font-weight: 600; }
.lx-w-reacts button.is-mine {
	background: #d9f0fa;
	box-shadow: 0 0 0 1px rgba(47,198,246,.45), 0 1px 4px rgba(0,0,0,.1);
}
.lx-w-meta {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 3px;
	margin-top: 5px;
	font-size: 11px;
	color: var(--lx-muted);
	line-height: 1;
}
.lx-w-checks {
	display: inline-flex;
	align-items: center;
	line-height: 0;
}
.lx-w-checks.is-sent { color: #525c69; }
.lx-w-checks.is-read { color: #2fc6f6; }
.lx-w-checks svg { display: block; }
.lx-w-reply {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0 12px 8px;
	padding: 8px 10px;
	background: var(--lx-soft);
	border-left: 3px solid var(--lx-a);
	border-radius: 8px;
}
.lx-w-reply.is-hidden { display: none; }
.lx-w-reply-text { flex: 1; min-width: 0; }
.lx-w-reply-label { font-size: 11px; color: var(--lx-a); font-weight: 600; }
.lx-w-reply-preview {
	font-size: 13px;
	color: var(--lx-muted);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.lx-w-reply button {
	border: 0;
	background: transparent;
	font-size: 18px;
	cursor: pointer;
	color: var(--lx-muted);
}

.lx-w-foot {
	display: flex;
	gap: 10px;
	padding: 12px 14px;
	border-top: 1px solid var(--lx-border);
	background: var(--lx-bg);
	align-items: center;
	flex-shrink: 0;
}
.lx-w-foot input {
	flex: 1;
	min-width: 0;
	height: 42px;
	border: 0;
	border-radius: 21px;
	padding: 0 16px;
	font-size: 14px;
	outline: none;
	background: var(--lx-input-bg);
	color: var(--lx-fg);
}
.lx-w-foot input::placeholder { color: var(--lx-muted); }
.lx-w-foot input:focus { box-shadow: inset 0 0 0 1px var(--lx-a); }
.lx-w-foot button#lx-w-send {
	position: relative;
	width: 42px;
	height: 42px;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 50%;
	background: var(--lx-a) !important;
	color: #fff !important;
	cursor: pointer;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	flex-shrink: 0;
	line-height: 0 !important;
	font-size: 0 !important;
	appearance: none;
	-webkit-appearance: none;
}
.lx-w-foot button#lx-w-send svg {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 18px;
	height: 18px;
	transform: translate(-46%, -50%);
	display: block;
	pointer-events: none;
}
.lx-w-foot button#lx-w-send:hover { background: var(--lx-a-dark) !important; }

.lx-w-product {
	display: flex;
	gap: 8px;
	align-items: center;
}
.lx-w-product img {
	width: 44px;
	height: 44px;
	object-fit: cover;
	border-radius: 6px;
}
.lx-w-bubble audio {
	width: 180px;
	max-width: 100%;
}
.lx-w-powered {
	text-align: center;
	font-size: 11px;
	color: var(--lx-muted);
	padding: 0 12px 10px;
	background: var(--lx-bg);
	flex-shrink: 0;
}
.lx-w-powered a {
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 2px;
}
.lx-w-powered a:hover {
	color: var(--lx-a);
}

@media (max-width: 480px) {
	.lx-w { right: 12px; bottom: 12px; }
	.lx-w.is-left { left: 12px; }
	.lx-w-panel {
		width: calc(100vw - 24px);
		height: 72vh;
		max-height: calc(100vh - 24px);
		bottom: 0;
	}
}
