/* 右侧客服栏：图标固定右侧，悬停向左展开；配色与站点主色一致 */
.side_contact {
	position: fixed;
	right: 0;
	top: 50%;
	transform: translateY(-50%);
	z-index: 99999;
}

.side_contact_list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.side_contact_item {
	position: relative;
	width: 46px;
	height: 46px;
	margin-bottom: 4px;
}

.side_contact_icon {
	position: relative;
	z-index: 2;
	width: 46px;
	height: 46px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: linear-gradient(135deg, #2D4331 0%, #243528 100%);
	color: #fff;
	font-size: 18px;
	cursor: default;
	box-shadow: -2px 2px 8px rgba(45, 67, 49, 0.25);
	transition: background 0.3s;
}

.side_contact_item:hover .side_contact_icon {
	background: linear-gradient(135deg, #9A6338 0%, #7F502D 100%);
}

.side_contact_icon_svg {
	display: block;
	width: 18px;
	height: 18px;
}

/* ONLINE 客服标志（始终置顶） */
.side_contact_online {
	height: auto;
	margin-bottom: 6px;
}

.side_contact_online .side_contact_icon {
	flex-direction: column;
	height: 56px;
	padding: 7px 4px 5px;
	font-size: 16px;
	line-height: 1;
	background: linear-gradient(135deg, #9A6338 0%, #7F502D 100%);
	cursor: default;
}

.side_contact_online:hover .side_contact_icon {
	background: linear-gradient(135deg, #b07442 0%, #9A6338 100%);
}

.side_contact_online_label {
	display: block;
	margin-top: 3px;
	font-size: 9px;
	font-weight: 700;
	letter-spacing: 0.6px;
	line-height: 1.1;
}

.side_contact_online .side_contact_panel span {
	color: #333;
	font-size: 13px;
	font-weight: 600;
}

.side_contact_top {
	display: none;
}

.side_contact_top.is-visible {
	display: block;
}

.side_contact_top .side_contact_icon {
	cursor: pointer;
	background: linear-gradient(135deg, #9A6338 0%, #7F502D 100%);
}

.side_contact_top:hover .side_contact_icon {
	background: linear-gradient(135deg, #b07442 0%, #9A6338 100%);
}

.side_contact_top .side_contact_panel span {
	color: #333;
	font-size: 13px;
}

.side_contact_panel {
	position: absolute;
	right: 46px;
	top: 0;
	height: 46px;
	display: flex;
	align-items: center;
	background: #fff;
	max-width: 0;
	overflow: hidden;
	opacity: 0;
	padding: 0;
	border-radius: 6px 0 0 6px;
	box-shadow: -4px 0 16px rgba(45, 67, 49, 0.12);
	transition: max-width 0.35s ease, opacity 0.3s ease, padding 0.35s ease;
	white-space: nowrap;
	pointer-events: none;
}

.side_contact_item:hover .side_contact_panel {
	max-width: 320px;
	opacity: 1;
	padding: 0 16px;
	pointer-events: auto;
}

.side_contact_online:hover .side_contact_panel {
	height: 56px;
}

.side_contact_panel a {
	color: #333;
	font-size: 13px;
	text-decoration: none;
	transition: color 0.3s;
}

.side_contact_panel a:hover {
	color: #9A6338;
}

.side_contact_panel_qr {
	height: auto;
	min-height: 46px;
	align-items: center;
}

.side_contact_item:hover .side_contact_panel_qr {
	max-width: 200px;
	padding: 10px 12px;
}

.side_contact_panel_qr img {
	display: block;
	width: 160px;
	height: 160px;
	object-fit: contain;
}

.side_contact_toggle {
	display: none;
}

@media only screen and (max-width: 768px) {
	.side_contact {
		top: auto;
		bottom: 85px;
		transform: none;
	}

	.side_contact_toggle {
		display: flex;
		align-items: center;
		justify-content: center;
		width: 50px;
		height: 50px;
		padding: 0;
		border: none;
		border-radius: 50% 0 0 50%;
		background: linear-gradient(135deg, #2D4331 0%, #243528 100%);
		color: #fff;
		font-size: 22px;
		cursor: pointer;
		box-shadow: -2px 2px 12px rgba(45, 67, 49, 0.35);
		position: relative;
		z-index: 100001;
		touch-action: manipulation;
		-webkit-tap-highlight-color: transparent;
		pointer-events: auto;
	}

	.side_contact_toggle .side_contact_close {
		display: none;
		font-size: 20px;
		pointer-events: none;
	}

	.side_contact_toggle .fa-comments {
		pointer-events: none;
	}

	.side_contact.is-open .side_contact_toggle {
		background: linear-gradient(135deg, #9A6338 0%, #7F502D 100%);
	}

	.side_contact.is-open .side_contact_toggle .fa-comments {
		display: none;
	}

	.side_contact.is-open .side_contact_toggle .side_contact_close {
		display: block;
	}

	.side_contact_list {
		display: none;
		margin-bottom: 6px;
	}

	.side_contact.is-open .side_contact_list {
		display: block;
	}

	.side_contact_top,
	.side_contact_top.is-visible {
		display: none !important;
	}

	.side_contact_panel_qr img {
		width: 140px;
		height: 140px;
	}
}
