/* 咨询按钮组 */
.btn-chat {
	position: fixed;
	bottom: 100px;
	right: 50px;
	width: 50px;
	height: 50px;
	z-index: 1;
}

.btn-chat-phone {
	bottom: 220px;

}

.btn-chat-wechat {
	bottom: 160px;
}

.popover-chat {
	border: 1px solid #0d6efd;
	font-size: 18px;
	color: #0d6efd;
}

.popover-chat>.popover-arrow::before {
	border-left-color: #0d6efd !important;
}

.popover-chat>.popover-header {
	background-color: #0d6efd;
	color: white;
}

.popover-chat>.popover-body {
	padding: 10px;
	color: #0d6efd;
}

/* 聊天窗口 */
/* ===== 基础样式（迷你模式） ===== */
.chat-widget {
	position: fixed;
	bottom: 40px;
	right: 20px;
	width: 320px;
	height: 300px;
	border-radius: 8px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
	background: white;
	z-index: 1040;
	display: none;
	transition: all 0.3s ease;
	/* 平滑动画 */
	background-color: #e9ecef;
}

/* ===== 放大模式（居中） ===== */
.chat-widget.expanded {
	top: 50%;
	left: 50%;
	bottom: auto;
	right: auto;
	width: 800px;
	height: 600px;
	transform: translate(-50%, -50%);
	z-index: 1060;
	/* 高于 modal，避免被遮挡 */
}

/* 放大模式下隐藏原“放大”按钮，显示“还原”按钮 */
.chat-widget.expanded #expandChat {
	display: none;
}

/* 新增：还原按钮（默认隐藏） */
#restoreChat {
	display: none;
}

.chat-widget.expanded #restoreChat {
	display: inline-block;
}

.chat-widget.show {
	display: block;
}

.chat-widget .chat-header {
	border-top-left-radius: 8px;
	border-top-right-radius: 8px;
}

.chat-widget .chat-body {
	height: 205px;
	overflow-y: auto;
	font-size: 14px;
}

.chat-widget.expanded .chat-body {
	height: 505px;
	overflow-y: auto;
}

.msg {
	margin-bottom: 30px;
	position: relative;
}

.msg.me {
	text-align: right;
}

.msg em{
	font-size: 10px;
	position: absolute;
	left: 0px;
	top: -20px;
}

.msg.me em{
	right: 0px;
}

.msg span {
	background-color: white;
	padding: 8px 10px;
	border-radius: 5px;
}

.msg.me span {
	background-color: #0d6efd;
	color: white;
}