/* ============================================
   Floating Contact Bar (right-edge sidebar)
   - 页面下滑一段距离后淡入出现
   - 悬停向左展开显示联系方式
   - 点击 电话 / 邮箱 / 询盘 弹出询盘表单
   ============================================ */

.fcb {
	--fcb-bg: #23408e;
	--fcb-bg-hover: #1b3272;
	--fcb-border: rgba(255, 255, 255, 0.16);
	position: fixed;
	top: 50%;
	right: 0;
	z-index: 9990;
	transform: translateY(-50%) translateX(24px);
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity .45s ease, transform .45s ease, visibility .45s ease;
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* 滚动一定距离后显示 */
.fcb.is-visible {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	transform: translateY(-50%) translateX(0);
}

.fcb *,
.fcb *::before,
.fcb *::after {
	box-sizing: border-box;
}

.fcb-list {
	list-style: none;
	margin: 0;
	padding: 0;
	box-shadow: -6px 0 24px rgba(0, 0, 0, 0.18);
}

.fcb-item {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	background: var(--fcb-bg);
	color: #ffffff;
	cursor: pointer;
	position: relative;
	border-bottom: 1px solid var(--fcb-border);
	transition: background-color .25s ease;
}

.fcb-item:last-child {
	border-bottom: none;
}

.fcb-item:hover {
	background: var(--fcb-bg-hover);
}

/* 图标（固定在最右侧的方块） */
.fcb-icon {
	width: 56px;
	height: 56px;
	min-width: 56px;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.fcb-icon svg {
	width: 25px;
	height: 25px;
	fill: #ffffff;
	color: #ffffff;
	display: block;
	transition: transform .28s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* 自定义上传的图标 */
.fcb-icon-img {
	width: 26px;
	height: 26px;
	object-fit: contain;
	display: block;
	transition: transform .28s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* 悬停图标轻微放大 */
.fcb-item:hover .fcb-icon svg,
.fcb-item:hover .fcb-icon-img {
	transform: scale(1.15);
}

/* 展开的文字/内容：默认收起 */
.fcb-label {
	max-width: 0;
	overflow: hidden;
	white-space: nowrap;
	opacity: 0;
	font-size: 15px;
	font-weight: 500;
	line-height: 1.35;
	padding: 0;
	transition: max-width .45s cubic-bezier(0.22, 1, 0.36, 1), opacity .3s ease, padding .45s ease;
}

/* 悬停整个侧栏 -> 全部展开（与设计图一致） */
.fcb:hover .fcb-label,
.fcb-item.is-open .fcb-label {
	max-width: 340px;
	opacity: 1;
	padding: 0 20px 0 4px;
}

/* WhatsApp 二维码行 */
.fcb-item--whatsapp {
	align-items: flex-start;
}

/* 收起时二维码不占高度（只有图标高度），悬停时才展开 */
.fcb-label--qr {
	white-space: normal;
	display: flex;
	flex-direction: column;
	gap: 10px;
	max-height: 0;
	padding-top: 0;
	padding-bottom: 0;
	transition: max-width .45s cubic-bezier(0.22, 1, 0.36, 1),
		max-height .45s cubic-bezier(0.22, 1, 0.36, 1),
		opacity .3s ease, padding .45s ease;
}

.fcb:hover .fcb-label--qr,
.fcb-item--whatsapp.is-open .fcb-label--qr {
	max-height: 220px;
	padding: 16px 20px 16px 4px;
}

.fcb-item--whatsapp .fcb-icon {
	align-self: flex-start;
}

.fcb-qr-title {
	font-size: 15px;
	font-weight: 500;
}

.fcb-qr-img {
	width: 116px;
	height: 116px;
	object-fit: contain;
	background: #ffffff;
	padding: 6px;
	border-radius: 4px;
	display: block;
}

.fcb-qr-placeholder {
	width: 116px;
	height: 116px;
	background: #ffffff;
	border-radius: 4px;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	font-size: 11px;
	color: #6b7280;
	padding: 8px;
}

/* 移动端：缩小尺寸 */
@media (max-width: 768px) {
	.fcb-icon {
		width: 48px;
		height: 48px;
		min-width: 48px;
	}
	.fcb-icon svg {
		width: 20px;
		height: 20px;
	}
	.fcb-label {
		font-size: 14px;
	}
	.fcb:hover .fcb-label,
	.fcb-item.is-open .fcb-label {
		max-width: 74vw;
	}
	.fcb-qr-img,
	.fcb-qr-placeholder {
		width: 100px;
		height: 100px;
	}
}
