/* ==========================================================================
   左下角联系入口（模块 10-inquiry/14-contact-buttons.php）
   - WhatsApp：直接跳转
   - 微信：点击弹出二维码卡片
   - 竖向堆叠：微信在上、WhatsApp 在下
   - 独立文件，不并入 design-v2.css（设计层改动风险高）
   ========================================================================== */
.gpwa,
.gpwc,
.gpwa *,
.gpwc * { box-sizing: border-box; }

.gpwa,
.gpwc {
	--gp-contact-bottom: max(18px, env(safe-area-inset-bottom, 0px));
	position: fixed;
	left: max(18px, env(safe-area-inset-left, 0px));
	bottom: var(--gp-contact-bottom);
	transform: translateY(calc(-1 * var(--gp-contact-lift, 0px)));
	z-index: 100000;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 52px;
	height: 52px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	color: #fff;
	box-shadow: 0 6px 18px rgba(11, 34, 57, .18);
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
	transition: transform .16s ease, box-shadow .16s ease, background-color .16s ease;
}

.gpwa { background: #25d366; }
.gpwc { bottom: calc(var(--gp-contact-bottom) + 62px); background: #07c160; }

.gpwa svg { width: 28px; height: 28px; fill: currentColor; }
.gpwc svg { width: 30px; height: 30px; fill: currentColor; }

.gpwa:hover,
.gpwc:hover {
	transform: translateY(calc(-1 * var(--gp-contact-lift, 0px) - 2px));
	box-shadow: 0 10px 22px rgba(11, 34, 57, .24);
}

.gpwa:focus-visible,
.gpwc:focus-visible,
.gpwc-modal__close:focus-visible {
	outline: 3px solid #0c1c2a;
	outline-offset: 2px;
}

/* ---------- 微信二维码弹层 ---------- */
.gpwc-modal {
	position: fixed;
	inset: 0;
	z-index: 100001;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.gpwc-modal[hidden] { display: none !important; }

.gpwc-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(6, 20, 32, .58);
	-webkit-backdrop-filter: blur(2px);
	backdrop-filter: blur(2px);
}

.gpwc-modal__card {
	position: relative;
	width: min(340px, calc(100vw - 32px));
	padding: 26px 24px 24px;
	border-radius: 18px;
	background: #fff;
	box-shadow: 0 24px 70px rgba(6, 20, 32, .28);
	text-align: center;
}

.gpwc-modal__close {
	position: absolute;
	top: 10px;
	right: 10px;
	display: inline-grid;
	place-items: center;
	width: 38px;
	height: 38px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: #5a7180;
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
}

.gpwc-modal__close:hover { background: rgba(12, 28, 42, .06); color: #0c1c2a; }

.gpwc-modal__title {
	margin: 2px 0 6px;
	color: #0c1c2a;
	font-size: 20px;
	line-height: 1.25;
	font-weight: 600;
}

.gpwc-modal__sub {
	margin: 0 0 18px;
	color: #5a7180;
	font-size: 13.5px;
	line-height: 1.5;
}

.gpwc-modal__qr img {
	display: block;
	width: min(260px, 68vw);
	height: auto;
	margin: 0 auto;
	border-radius: 10px;
}

body.gpwc-lock { overflow: hidden; }

@media (max-width: 900px) {
	.gpwa,
	.gpwc {
		--gp-contact-bottom: max(14px, env(safe-area-inset-bottom, 0px));
		left: max(14px, env(safe-area-inset-left, 0px));
		width: 48px;
		height: 48px;
	}
	.gpwc { bottom: calc(var(--gp-contact-bottom) + 58px); }
	.gpwa svg { width: 26px; height: 26px; }
	.gpwc svg { width: 27px; height: 27px; }
}

@media (max-width: 640px) {
	.gpwc-modal {
		align-items: flex-end;
		padding: 0;
	}
	.gpwc-modal__card {
		width: 100%;
		padding: 24px 20px calc(24px + env(safe-area-inset-bottom, 0px));
		border-radius: 20px 20px 0 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	.gpwa,
	.gpwc { transition: none; }
	.gpwa:hover,
	.gpwc:hover { transform: translateY(calc(-1 * var(--gp-contact-lift, 0px))); }
}
