/**
 * Support bubble: floating button bottom-right + the panel it opens.
 *
 * Hidden by CSS while the age gate is pending (it blocks the whole site) or the
 * cart drawer is open (it owns the right edge and would cover the button).
 *
 * @package PeptideLab
 */

.pl-support {
	position: fixed;
	right: max(20px, env(safe-area-inset-right));
	bottom: max(20px, env(safe-area-inset-bottom));
	z-index: 880; /* 低于抽屉（890+）与年龄门（900+），高于页脚 */
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 12px;
	font-family: var(--pl-font-sans);
}

/* 年龄门弹出时它挡着整站；抽屉打开时右下角归抽屉管 */
.pl-age-gate-pending .pl-support,
.pl-drawer-open .pl-support {
	display: none;
}

/* --- 按钮 --- */

.pl-support__toggle {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 52px;
	padding: 0 20px 0 16px;
	border: 0;
	border-radius: var(--pl-r-pill);
	background: var(--pl-accent-strong);
	color: #fff;
	box-shadow: 0 10px 26px rgba(15, 23, 42, 0.22);
	font-size: 0.95rem;
	font-weight: 700;
	cursor: pointer;
	transition: transform 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
}

.pl-support__toggle:hover,
.pl-support__toggle:focus-visible {
	transform: translateY(-1px);
	box-shadow: 0 14px 32px rgba(15, 23, 42, 0.26);
}

.pl-support__toggle:focus-visible {
	outline: 3px solid var(--pl-accent-soft);
	outline-offset: 2px;
}

.pl-support__toggle-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

/* 打开时按钮收起成圆形图标，避免和面板挤在一起 */
.pl-support--open .pl-support__toggle-label {
	display: none;
}

.pl-support--open .pl-support__toggle {
	padding: 0;
	width: 52px;
	justify-content: center;
	background: var(--pl-navy-900);
}

/* --- 面板 --- */

.pl-support__panel {
	width: min(340px, calc(100vw - 40px));
	padding: 20px;
	border: 1px solid var(--pl-line);
	border-radius: var(--pl-r-lg);
	background: #fff;
	box-shadow: 0 22px 54px rgba(15, 23, 42, 0.2);
	animation: pl-support-in 0.2s ease both;
}

@keyframes pl-support-in {
	from {
		opacity: 0;
		transform: translateY(8px);
	}

	to {
		opacity: 1;
		transform: none;
	}
}

.pl-support__title {
	margin: 0 0 8px;
	color: var(--pl-navy-900);
	font-size: 1.05rem;
	font-weight: 700;
}

.pl-support__note {
	margin: 0 0 16px;
	color: var(--pl-slate-500);
	font-size: 0.88rem;
	line-height: 1.6;
}

.pl-support__channels {
	margin: 0;
	padding: 0;
	list-style: none;
}

.pl-support__channel {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 12px;
	border-radius: var(--pl-r-sm);
	color: inherit;
	text-decoration: none;
	transition: background-color 0.16s ease;
}

.pl-support__channel:hover,
.pl-support__channel:focus-visible {
	background: var(--pl-accent-soft);
}

.pl-support__channel-icon {
	display: inline-flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border-radius: var(--pl-r-sm);
	background: var(--pl-accent-soft);
	color: var(--pl-accent-strong);
}

.pl-support__channel-copy {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.pl-support__channel-copy b {
	color: var(--pl-navy-900);
	font-size: 0.9rem;
	font-weight: 700;
}

.pl-support__channel-copy i {
	overflow: hidden;
	color: var(--pl-slate-500);
	font-size: 0.84rem;
	font-style: normal;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.pl-support__hours {
	display: flex;
	align-items: center;
	gap: 6px;
	margin: 14px 0 0;
	padding-top: 14px;
	border-top: 1px solid var(--pl-line);
	color: var(--pl-slate-500);
	font-size: 0.82rem;
}

/* --- 窄屏：只留圆按钮 --- */

@media (max-width: 480px) {
	.pl-support__toggle-label {
		display: none;
	}

	.pl-support__toggle {
		padding: 0;
		width: 52px;
		justify-content: center;
	}
}
