.zte-chat {
	position: fixed;
	bottom: 24px;
	z-index: 99990;
}

.zte-chat--right { right: 24px; }
.zte-chat--left  { left: 24px; }

/* 图标化悬浮按钮：圆形，文字仅在 hover / 键盘聚焦时作为提示显示 */
.zte-chat__fab {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	background: var(--zte-chat-accent, #2563eb);
	color: #fff;
	box-shadow: 0 6px 20px rgba(15, 23, 42, 0.25);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.zte-chat__fab:hover,
.zte-chat__fab:focus-visible {
	transform: translateY(-2px);
	box-shadow: 0 10px 28px rgba(15, 23, 42, 0.32);
	color: #fff;
}

.zte-chat__fab:active { transform: translateY(0); }

.zte-chat__fab svg {
	width: 22px;
	height: 22px;
	fill: currentColor;
}

.zte-chat__label { display: none; }

.zte-chat__fab:hover .zte-chat__label,
.zte-chat__fab:focus-visible .zte-chat__label {
	display: block;
	position: absolute;
	right: calc(100% + 12px);
	top: 50%;
	transform: translateY(-50%);
	background: #111827;
	color: #fff;
	font-size: 13px;
	line-height: 1;
	padding: 6px 10px;
	border-radius: 6px;
	white-space: nowrap;
	box-shadow: 0 4px 12px rgba(15, 23, 42, 0.2);
	pointer-events: none;
}

.zte-chat--left .zte-chat__fab:hover .zte-chat__label,
.zte-chat--left .zte-chat__fab:focus-visible .zte-chat__label {
	right: auto;
	left: calc(100% + 12px);
}

@media (max-width: 768px) {
	.zte-chat { bottom: 16px; }
	.zte-chat--right { right: 16px; }
	.zte-chat--left { left: 16px; }
	.zte-chat__fab { width: 44px; height: 44px; }
	.zte-chat__fab svg { width: 20px; height: 20px; }
}

/* 透明遮罩：不加背景色，仅用于点击空白处关闭 */
.zte-chat-overlay {
	position: fixed;
	inset: 0;
	z-index: 99990;
}

.zte-chat-overlay[hidden] { display: none; }

/* 聊天抽屉：约 60% 视口高，底部浮动，悬浮于按钮上方 */
.zte-chat-drawer {
	position: fixed;
	bottom: 96px;
	width: 400px;
	max-width: calc(100vw - 32px);
	height: var(--zte-chat-drawer-height, 60vh);
	display: flex;
	flex-direction: column;
	background: #fff;
	z-index: 100000;
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	box-shadow: 0 12px 40px rgba(15, 23, 42, 0.22);
	overflow: hidden;
	transition: transform 0.28s ease;
}

.zte-chat-drawer--right {
	right: 24px;
	transform: translateX(calc(100% + 32px));
}

.zte-chat-drawer--left {
	left: 24px;
	transform: translateX(calc(-100% - 32px));
}

.zte-chat-drawer.is-open { transform: translateX(0); }
.zte-chat-drawer[hidden] { display: none; }

.zte-chat-drawer__header {
	display: flex;
	align-items: center;
	gap: 4px;
	height: 52px;
	padding: 0 12px 0 16px;
	border-bottom: 1px solid #e5e7eb;
	flex: none;
}

.zte-chat-drawer__title {
	flex: 1;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	font-size: 15px;
	font-weight: 600;
	color: #111827;
}

.zte-chat-drawer__open,
.zte-chat-drawer__close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border: 0;
	border-radius: 8px;
	background: transparent;
	color: #4b5563;
	cursor: pointer;
	text-decoration: none;
	transition: background 0.15s ease, color 0.15s ease;
}

.zte-chat-drawer__open:hover,
.zte-chat-drawer__close:hover {
	background: #f3f4f6;
	color: #111827;
}

.zte-chat-drawer__open svg,
.zte-chat-drawer__close svg {
	width: 18px;
	height: 18px;
}

.zte-chat-drawer__frame {
	flex: 1;
	width: 100%;
	border: 0;
	background: #fff;
}

body.zte-chat-no-scroll { overflow: hidden; }

.zte-chat-link {
	color: var(--zte-chat-accent, #2563eb);
	text-decoration: underline;
	cursor: pointer;
}

.zte-chat-link:hover { opacity: 0.85; }
