/* 右侧客服栏：图标固定右侧，悬停向左展开 */
.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, #0c4d89 0%, #0a3d6e 100%);
	color: #fff;
	font-size: 18px;
	cursor: default;
	box-shadow: -2px 2px 8px rgba(12, 77, 137, 0.25);
	transition: background 0.3s;
}

.side_contact_item:hover .side_contact_icon {
	background: linear-gradient(135deg, #FF9E16 0%, #e88a0a 100%);
}

.side_contact_whatsapp .side_contact_icon {
	background: linear-gradient(135deg, #25D366 0%, #1da851 100%);
}

.side_contact_whatsapp:hover .side_contact_icon {
	background: linear-gradient(135deg, #2ee06a 0%, #25D366 100%);
}

.side_contact_wechat .side_contact_icon {
	background: linear-gradient(135deg, #07C160 0%, #06ad56 100%);
}

.side_contact_wechat:hover .side_contact_icon {
	background: linear-gradient(135deg, #1fd16f 0%, #07C160 100%);
}

/* 置顶：默认隐藏，滚动后显示 */
.side_contact_top {
	display: none;
}

.side_contact_top.is-visible {
	display: block;
}

.side_contact_top .side_contact_icon {
	cursor: pointer;
	background: linear-gradient(135deg, #FF9E16 0%, #e88a0a 100%);
}

.side_contact_top:hover .side_contact_icon {
	background: linear-gradient(135deg, #ffb03d 0%, #FF9E16 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(12, 77, 137, 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_panel a {
	color: #333;
	font-size: 13px;
	text-decoration: none;
	transition: color 0.3s;
}

.side_contact_panel a:hover {
	color: #0c4d89;
}

/* 微信二维码面板：向左完整展开 120×120 */
.side_contact_panel_qr{
  height:auto;
  min-height:0;
  align-items:center;
  justify-content:center;
  white-space:normal;
  top:50%;
  transform:translateY(-50%);
  box-sizing:border-box;
}
.side_contact_item:hover .side_contact_panel_qr{
  max-width:144px;
  width:144px;
  min-width:144px;
  padding:12px;
  overflow:visible;
}
.side_contact_panel_qr img{
  display:block;
  width:120px;
  height:120px;
  max-width:120px;
  max-height:120px;
  object-fit:contain;
  flex-shrink:0;
}

/* 桌面端隐藏泡泡按钮 */
.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, #0c4d89 0%, #0a3d6e 100%);
		color: #fff;
		font-size: 22px;
		cursor: pointer;
		box-shadow: -2px 2px 12px rgba(12, 77, 137, 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, #FF9E16 0%, #e88a0a 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:120px;
		height:120px;
		max-width:120px;
		max-height:120px;
	}
}
