:root {
	--zlv-chat-primary: #2f3d4f;
	--zlv-chat-primary-dark: #243140;
	--zlv-chat-accent: #25d366;
	--zlv-chat-bg: #ffffff;
	--zlv-chat-muted: #6b7280;
	--zlv-chat-bubble: #f3f4f6;
	--zlv-chat-border: #d1d5db;
	--zlv-chat-shadow: 0 12px 40px rgba(15, 23, 42, 0.18);
}

.zlv-chat {
	position: fixed;
	right: 24px;
	bottom: 24px;
	z-index: 99999;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
}

.zlv-chat__launcher {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	border: 0;
	border-radius: 999px;
	padding: 14px 18px;
	background: var(--zlv-chat-accent);
	color: #fff;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	box-shadow: var(--zlv-chat-shadow);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.zlv-chat__launcher:hover,
.zlv-chat__launcher:focus-visible {
	transform: translateY(-1px);
	box-shadow: 0 16px 44px rgba(15, 23, 42, 0.22);
	outline: none;
}

.zlv-chat__launcher-icon {
	display: inline-flex;
}

.zlv-chat.is-open .zlv-chat__launcher {
	display: none;
}

.zlv-chat__panel {
	width: min(360px, calc(100vw - 32px));
	background: var(--zlv-chat-bg);
	border-radius: 12px;
	overflow: hidden;
	box-shadow: var(--zlv-chat-shadow);
}

.zlv-chat__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 14px 16px;
	background: var(--zlv-chat-primary);
	color: #fff;
}

.zlv-chat__agent {
	display: flex;
	align-items: center;
	gap: 12px;
	min-width: 0;
	flex: 1;
}

.zlv-chat__agent-avatar-wrap {
	position: relative;
	flex: 0 0 40px;
	width: 40px;
	height: 40px;
}

.zlv-chat__agent-avatar {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	object-fit: cover;
	display: block;
	border: 2px solid rgba(255, 255, 255, 0.25);
}

.zlv-chat__online-dot {
	position: absolute;
	right: 0;
	bottom: 0;
	width: 12px;
	height: 12px;
	background: #22c55e;
	border: 2px solid var(--zlv-chat-primary);
	border-radius: 50%;
	box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.35);
}

.zlv-chat__agent-info {
	min-width: 0;
}

.zlv-chat__agent-name {
	margin: 0;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.3;
	color: #fff;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.zlv-chat__agent-status {
	margin: 2px 0 0;
	font-size: 12px;
	line-height: 1.2;
	color: #86efac;
	font-weight: 500;
	display: flex;
	align-items: center;
	gap: 6px;
}

.zlv-chat__agent-status::before {
	content: '';
	display: inline-block;
	width: 8px;
	height: 8px;
	background: #22c55e;
	border-radius: 50%;
	flex-shrink: 0;
}

.zlv-chat__title {
	margin: 0;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.3;
	color: #fff;
}

.zlv-chat__close {
	border: 0;
	background: transparent;
	color: #fff;
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
	padding: 0;
}

.zlv-chat__body {
	padding: 16px;
	max-height: 420px;
	overflow-y: auto;
}

.zlv-chat__date {
	text-align: center;
	color: var(--zlv-chat-muted);
	font-size: 12px;
	margin-bottom: 16px;
}

.zlv-chat__messages {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.zlv-chat__row {
	display: flex;
	gap: 10px;
	align-items: flex-start;
}

.zlv-chat__avatar {
	flex: 0 0 34px;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: linear-gradient(135deg, #ef4444, #ec4899);
	color: #fff;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 14px;
	font-weight: 700;
	overflow: hidden;
}

.zlv-chat__avatar-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	border-radius: 50%;
}

.zlv-chat__bubble {
	background: var(--zlv-chat-bubble);
	border-radius: 10px;
	padding: 12px 14px;
	color: #111827;
	font-size: 14px;
	line-height: 1.5;
	max-width: 100%;
}

.zlv-chat__bubble--user {
	margin-left: auto;
	background: #e8f5e9;
}

.zlv-chat__categories {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 4px;
}

.zlv-chat__category {
	border: 1px solid var(--zlv-chat-primary);
	background: #fff;
	color: var(--zlv-chat-primary);
	border-radius: 999px;
	padding: 8px 14px;
	font-size: 13px;
	line-height: 1.2;
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease;
}

.zlv-chat__category:hover,
.zlv-chat__category:focus-visible {
	background: var(--zlv-chat-primary);
	color: #fff;
	outline: none;
}

.zlv-chat__composer {
	border-top: 1px solid #e8edf2;
	padding: 12px 14px 10px;
	background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.zlv-chat__field--name {
	margin: 0;
}

.zlv-chat__name-wrap {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 0 12px;
	height: 38px;
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 999px;
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.zlv-chat__name-wrap:focus-within {
	border-color: #94a3b8;
	box-shadow: 0 0 0 3px rgba(47, 61, 79, 0.08);
}

.zlv-chat__name-icon {
	flex-shrink: 0;
	color: #94a3b8;
}

.zlv-chat__input--name {
	border: 0;
	padding: 0;
	background: transparent;
	font-size: 13px;
	color: #1e293b;
	min-height: auto;
}

.zlv-chat__input--name::placeholder {
	color: #94a3b8;
}

.zlv-chat__input--name:focus {
	outline: none;
}

.zlv-chat__composer-box {
	display: flex;
	align-items: flex-end;
	gap: 8px;
	padding: 6px 6px 6px 14px;
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 16px;
	box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.zlv-chat__composer-box:focus-within {
	border-color: var(--zlv-chat-primary);
	box-shadow: 0 0 0 3px rgba(47, 61, 79, 0.1);
}

.zlv-chat__textarea--composer {
	min-height: 24px;
	max-height: 120px;
	resize: none;
	flex: 1;
	border: 0;
	padding: 8px 0;
	background: transparent;
	font-size: 14px;
	line-height: 1.45;
	color: #1e293b;
}

.zlv-chat__textarea--composer::placeholder {
	color: #94a3b8;
}

.zlv-chat__textarea--composer:focus {
	outline: none;
}
.zlv-chat__input:focus, .zlv-chat__textarea:focus, .zlv-chat__input:active, .zlv-chat__textarea:active {
    border: none;
    box-shadow: none;
	outline: none;
}
.zlv-chat__send {
	flex: 0 0 40px;
	width: 40px;
	height: 40px;
	border: 0;
	border-radius: 50%;
	background: var(--zlv-chat-accent);
	color: #fff;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	padding: 0;
	transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
	box-shadow: 0 2px 8px rgba(37, 211, 102, 0.35);
}

.zlv-chat__send:hover,
.zlv-chat__send:focus-visible {
	background: #1ebe57;
	transform: scale(1.04);
	outline: none;
	box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
}

.zlv-chat__send:disabled {
	opacity: 0.55;
	cursor: not-allowed;
	transform: none;
	box-shadow: none;
}

.zlv-chat__composer-footer {
	display: flex;
	justify-content: center;
	padding-top: 2px;
}

.zlv-chat__back {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	border: 0;
	background: transparent;
	color: #64748b;
	font-size: 12px;
	font-weight: 500;
	cursor: pointer;
	padding: 4px 8px;
	border-radius: 6px;
	transition: color 0.15s ease, background 0.15s ease;
}

.zlv-chat__back:hover,
.zlv-chat__back:focus-visible {
	color: var(--zlv-chat-primary);
	background: rgba(47, 61, 79, 0.06);
	outline: none;
}

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}


.zlv-chat__bubble--agent {
	background: #e8f0fe;
}

.zlv-chat__avatar--agent {
	background: linear-gradient(135deg, #2563eb, #1d4ed8);
}

.zlv-chat__avatar-wrap {
	position: relative;
	flex: 0 0 34px;
	width: 34px;
	height: 34px;
}

.zlv-chat__avatar-wrap .zlv-chat__online-dot {
	width: 10px;
	height: 10px;
	right: -1px;
	bottom: -1px;
	border-color: #fff;
}


.zlv-chat__input,
.zlv-chat__textarea {
	width: 100%;
	box-sizing: border-box;
	font: inherit;
}

.zlv-chat__actions {
	display: flex;
	justify-content: space-between;
	gap: 10px;
}

.zlv-chat__button {
	border-radius: 8px;
	padding: 10px 14px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	border: 0;
}

.zlv-chat__button--ghost {
	background: #fff;
	border: 1px solid var(--zlv-chat-border);
	color: #111827;
}

.zlv-chat__button--primary {
	background: var(--zlv-chat-accent);
	color: #fff;
	margin-left: auto;
}

.zlv-chat__button:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.zlv-chat__status {
	font-size: 13px;
	color: var(--zlv-chat-muted);
}

@media (max-width: 480px) {
	.zlv-chat {
		right: 16px;
		bottom: 16px;
	}

	.zlv-chat__panel {
		width: calc(100vw - 32px);
	}
}
