/* Super WooCommerce — 悬浮聊天按钮 */
.bob-chat {
	position: fixed;
	bottom: var(--bob-chat-y, 22px);
	right: var(--bob-chat-x, 22px);
	z-index: 99990;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: var(--bob-chat-gap, 12px);
}
.bob-chat.is-left {
	right: auto;
	left: var(--bob-chat-x, 22px);
	align-items: flex-start;
}

/* 启动按钮(圆形) */
.bob-chat-launcher,
a.bob-chat-launcher,
button.bob-chat-launcher {
	width: var(--bob-chat-size, 58px) !important;
	height: var(--bob-chat-size, 58px) !important;
	min-width: 0 !important;
	min-height: 0 !important;
	padding: 0 !important;
	margin: 0 !important;
	border: none !important;
	border-radius: 50% !important;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	color: #fff !important;
	background: #7c5cbf;
	box-shadow: 0 6px 22px rgba(20, 20, 40, 0.3);
	transition: transform 0.15s ease, box-shadow 0.15s ease;
	line-height: 1 !important;
	box-sizing: border-box !important;
	text-decoration: none !important;
}
.bob-chat-launcher:hover {
	transform: scale(1.07);
	box-shadow: 0 10px 28px rgba(20, 20, 40, 0.35);
	color: #fff !important;
}
.bob-chat-launcher.is-wa { background: #25d366; }
.bob-chat-launcher.is-fb { background: linear-gradient(45deg, #0099ff, #a033ff); }
.bob-chat-launcher.is-toggle { background: #7c5cbf; }

/* 呼吸光圈 */
.bob-chat-launcher::before {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: 50%;
	box-shadow: 0 0 0 0 rgba(124, 92, 191, 0.45);
	animation: bob-chat-pulse 2.4s ease-out infinite;
	pointer-events: none;
}
.bob-chat-launcher.is-wa::before { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.45); animation-name: bob-chat-pulse-wa; }
@keyframes bob-chat-pulse {
	0% { box-shadow: 0 0 0 0 rgba(124, 92, 191, 0.45); }
	70% { box-shadow: 0 0 0 16px rgba(124, 92, 191, 0); }
	100% { box-shadow: 0 0 0 0 rgba(124, 92, 191, 0); }
}
@keyframes bob-chat-pulse-wa {
	0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.45); }
	70% { box-shadow: 0 0 0 16px rgba(37, 211, 102, 0); }
	100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}
.bob-chat-launcher { position: relative; }

/* 开/关图标切换 */
.bob-chat-ico-open,
.bob-chat-ico-close {
	display: flex;
	align-items: center;
	justify-content: center;
}
.bob-chat-ico-close {
	display: none;
	font-size: 30px;
	font-weight: 300;
	margin-top: -3px;
}
.bob-chat.is-open .bob-chat-ico-open { display: none; }
.bob-chat.is-open .bob-chat-ico-close { display: flex; }

/* 弹出菜单 */
.bob-chat-menu {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: var(--bob-chat-gap, 10px);
	transform: translateY(8px);
	opacity: 0;
	transition: transform 0.18s ease, opacity 0.18s ease;
	pointer-events: none;
}
.bob-chat.is-left .bob-chat-menu { align-items: flex-start; }
.bob-chat.is-open .bob-chat-menu {
	transform: translateY(0);
	opacity: 1;
	pointer-events: auto;
}
.bob-chat-menu[hidden] { display: flex; } /* 用 opacity 控制,hidden 属性由 JS 管理焦点用 */
/* 渠道图标(圆形,支持 SVG 或自定义头像图片) */
.bob-chat-ic {
	width: var(--bob-chat-ic, 34px);
	height: var(--bob-chat-ic, 34px);
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	flex-shrink: 0;
	overflow: hidden;
	box-sizing: border-box;
}
.bob-chat-ic.is-wa { background: #25d366; }
.bob-chat-ic.is-fb { background: linear-gradient(45deg, #0099ff, #a033ff); }
.bob-chat-ic img {
	width: 100% !important;
	height: 100% !important;
	object-fit: cover;
	border-radius: 50%;
	display: block;
	margin: 0 !important;
}
/* 图标在圆形启动按钮里时:铺满/放大 */
.bob-chat-launcher .bob-chat-ic {
	width: 100%;
	height: 100%;
	background: transparent !important;
	border-radius: 50%;
}
.bob-chat-launcher .bob-chat-ic svg {
	width: calc(var(--bob-chat-size, 58px) * 0.45);
	height: calc(var(--bob-chat-size, 58px) * 0.45);
}
.bob-chat-item,
a.bob-chat-item {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	background: #fff;
	border-radius: 999px;
	padding: 10px 20px 10px 12px;
	font-size: 14px;
	font-weight: 700;
	text-decoration: none !important;
	box-shadow: 0 6px 20px rgba(20, 20, 40, 0.18);
	color: #1f1f2e !important;
	transition: transform 0.12s ease;
	line-height: 1;
	border: none;
}
.bob-chat-item:hover { transform: translateX(-3px); }
.bob-chat.is-left .bob-chat-item:hover { transform: translateX(3px); }

@media (max-width: 600px) {
	.bob-chat { bottom: max(12px, calc(var(--bob-chat-y, 22px) * 0.75)); right: max(12px, calc(var(--bob-chat-x, 22px) * 0.75)); }
	.bob-chat.is-left { left: max(12px, calc(var(--bob-chat-x, 22px) * 0.75)); }
}

/* 自定义启动按钮 Logo:铺满圆形按钮 */
.bob-chat-launcher .bob-chat-logo {
	width: 100% !important;
	height: 100% !important;
	object-fit: cover;
	border-radius: 50%;
	display: block;
	margin: 0 !important;
}
.bob-chat-ico-open {
	width: 100%;
	height: 100%;
}

/* 自定义启动按钮颜色(后台设置,覆盖默认品牌色) */
.bob-chat.has-bg .bob-chat-launcher,
.bob-chat.has-bg a.bob-chat-launcher,
.bob-chat.has-bg button.bob-chat-launcher {
	background: var(--bob-chat-bg, #7c5cbf) !important;
}
