.icmn-wechat-service-card,
.icmn-wechat-onboarding-card {
	--icmn-wechat-gold: #c78932;
	--icmn-wechat-gold-dark: #a96d20;
	--icmn-wechat-ink: #29251f;
	--icmn-wechat-muted: #706a61;
	--icmn-wechat-border: #e8e2d9;
	--icmn-wechat-warm: #fbf8f2;
	box-sizing: border-box;
	margin: 20px 0;
	border: 1px solid var(--icmn-wechat-border);
	border-radius: 14px;
	background: #fff;
	color: var(--icmn-wechat-ink);
	box-shadow: 0 6px 24px rgba(70, 54, 30, 0.055);
	overflow: hidden;
}

.icmn-wechat-service-card [hidden],
.icmn-wechat-onboarding-card [hidden] {
	display: none !important;
}

.icmn-wechat-service-summary {
	display: flex;
	align-items: center;
	gap: 13px;
	min-height: 76px;
	padding: 15px 18px;
}

.icmn-wechat-state-icon {
	position: relative;
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	flex: 0 0 40px;
	border-radius: 50%;
	background: #f2eee7;
	color: #84796b;
}

.icmn-wechat-state-icon span {
	display: block;
	width: 16px;
	height: 16px;
}

.icmn-wechat-service-card.is-loading .icmn-wechat-state-icon span {
	width: 17px;
	height: 17px;
	border: 2px solid rgba(132, 121, 107, 0.28);
	border-top-color: #84796b;
	border-radius: 50%;
	animation: icmn-wechat-spin 0.85s linear infinite;
}

.icmn-wechat-service-card.is-connected {
	border-color: #d9e9dd;
	background: #f8fcf9;
	box-shadow: none;
}

.icmn-wechat-service-card.is-connected .icmn-wechat-state-icon {
	background: #e4f3e8;
	color: #37764d;
}

.icmn-wechat-service-card.is-connected .icmn-wechat-state-icon span::before {
	content: "";
	display: block;
	width: 8px;
	height: 4px;
	margin: 4px 0 0 3px;
	border: solid currentColor;
	border-width: 0 0 2px 2px;
	transform: rotate(-45deg);
}

.icmn-wechat-service-card.needs-follow .icmn-wechat-state-icon,
.icmn-wechat-service-card.needs-bind .icmn-wechat-state-icon {
	background: #f7ead7;
	color: #a96d20;
}

.icmn-wechat-service-card.needs-follow .icmn-wechat-state-icon span::before,
.icmn-wechat-service-card.needs-bind .icmn-wechat-state-icon span::before {
	content: "";
	display: block;
	width: 3px;
	height: 11px;
	margin: 1px auto 0;
	border-radius: 3px;
	background: currentColor;
	box-shadow: 0 14px 0 -0.5px currentColor;
}

.icmn-wechat-service-card.is-unknown .icmn-wechat-state-icon span::before {
	content: "?";
	display: block;
	font-weight: 700;
	line-height: 16px;
	text-align: center;
}

.icmn-wechat-service-copy {
	min-width: 0;
	flex: 1 1 auto;
}

.icmn-wechat-service-copy strong,
.icmn-wechat-action-copy > strong,
.icmn-wechat-onboarding-copy > strong {
	display: block;
	color: var(--icmn-wechat-ink);
	font-size: 16px;
	font-weight: 600;
	line-height: 1.4;
}

.icmn-wechat-service-copy p,
.icmn-wechat-action-copy p,
.icmn-wechat-onboarding-copy p {
	margin: 3px 0 0;
	color: var(--icmn-wechat-muted);
	font-size: 13px;
	line-height: 1.55;
}

.icmn-wechat-service-card.is-connected .icmn-wechat-service-copy p {
	color: #4d7159;
}

.icmn-wechat-text-button {
	flex: 0 0 auto;
	padding: 5px 0;
	border: 0;
	background: transparent;
	color: var(--icmn-wechat-gold-dark);
	font-size: 13px;
	cursor: pointer;
}

.icmn-wechat-service-action {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 142px;
	align-items: center;
	gap: 24px;
	padding: 18px;
	border-top: 1px solid var(--icmn-wechat-border);
	background: var(--icmn-wechat-warm);
}

.icmn-wechat-eyebrow {
	display: block;
	margin-bottom: 5px;
	color: var(--icmn-wechat-gold-dark);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.08em;
	line-height: 1.3;
}

.icmn-wechat-follow-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 9px;
	margin-top: 13px;
}

.icmn-wechat-service-card .button.icmn-wechat-primary {
	border-color: var(--icmn-wechat-gold);
	background: var(--icmn-wechat-gold);
	color: #fff;
}

.icmn-wechat-service-card .button.icmn-wechat-primary:hover {
	border-color: var(--icmn-wechat-gold-dark);
	background: var(--icmn-wechat-gold-dark);
	color: #fff;
}

.icmn-wechat-service-card .button.icmn-wechat-secondary {
	border-color: #d8cdbd;
	background: #fff;
	color: #5b4b36;
}

.icmn-wechat-qr {
	margin: 0;
	text-align: center;
}

.icmn-wechat-qr img {
	display: block;
	width: 136px;
	height: 136px;
	max-width: none;
	margin: 0 auto;
	border: 7px solid #fff;
	border-radius: 10px;
	box-shadow: 0 2px 10px rgba(77, 58, 30, 0.09);
}

.icmn-wechat-qr figcaption {
	margin-top: 5px;
	color: #81786b;
	font-size: 11px;
	line-height: 1.3;
}

.icmn-wechat-onboarding-card {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 132px;
	align-items: center;
	gap: 22px;
	padding: 18px;
	background: var(--icmn-wechat-warm);
}

.icmn-wechat-onboarding-card .icmn-wechat-qr img {
	width: 126px;
	height: 126px;
}

.icmn-wechat-follow-modal[hidden] {
	display: none;
}

.icmn-wechat-follow-modal {
	position: fixed;
	z-index: 100000;
	inset: 0;
	display: grid;
	place-items: center;
	padding: 20px;
	background: rgba(25, 21, 15, 0.58);
	backdrop-filter: blur(2px);
}

.icmn-wechat-follow-dialog {
	position: relative;
	width: min(580px, 100%);
	max-height: calc(100vh - 40px);
	overflow: auto;
	padding: 26px;
	border-radius: 16px;
	background: #fff;
	box-shadow: 0 24px 70px rgba(0, 0, 0, 0.24);
}

.icmn-wechat-follow-dialog h2 {
	margin: 0 38px 8px 0;
	color: #29251f;
	font-size: 22px;
}

.icmn-wechat-follow-dialog .icmn-wechat-service-card {
	margin: 16px 0;
	box-shadow: none;
}

.icmn-wechat-follow-close {
	position: absolute;
	top: 12px;
	right: 14px;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 0;
	background: transparent;
	color: #665f56;
	font-size: 30px;
	line-height: 1;
	cursor: pointer;
}

.icmn-wechat-modal-open {
	overflow: hidden;
}

@keyframes icmn-wechat-spin {
	to {
		transform: rotate(360deg);
	}
}

@media (max-width: 560px) {
	.icmn-wechat-service-card,
	.icmn-wechat-onboarding-card {
		margin: 14px 0;
		border-radius: 12px;
	}

	.icmn-wechat-service-summary {
		min-height: 62px;
		gap: 10px;
		padding: 11px 12px;
	}

	.icmn-wechat-state-icon {
		width: 34px;
		height: 34px;
		flex-basis: 34px;
	}

	.icmn-wechat-service-copy strong,
	.icmn-wechat-action-copy > strong,
	.icmn-wechat-onboarding-copy > strong {
		font-size: 14px;
	}

	.icmn-wechat-service-copy p,
	.icmn-wechat-action-copy p,
	.icmn-wechat-onboarding-copy p {
		font-size: 12px;
		line-height: 1.45;
	}

	.icmn-wechat-service-action,
	.icmn-wechat-onboarding-card {
		grid-template-columns: minmax(0, 1fr) 120px;
		gap: 12px;
		padding: 12px;
	}

	.icmn-wechat-service-action .icmn-wechat-qr img,
	.icmn-wechat-onboarding-card .icmn-wechat-qr img {
		width: 112px;
		height: 112px;
		border-width: 5px;
	}

	.icmn-wechat-follow-actions {
		gap: 7px;
		margin-top: 10px;
	}

	.icmn-wechat-follow-actions .button {
		min-height: 34px;
		padding: 7px 10px;
		font-size: 11px;
		line-height: 18px;
	}

	.icmn-wechat-text-button {
		font-size: 12px;
	}

	.icmn-wechat-follow-dialog {
		padding: 20px 14px;
	}

	.icmn-wechat-follow-dialog h2 {
		font-size: 19px;
	}
}

@media (max-width: 350px) {
	.icmn-wechat-service-action,
	.icmn-wechat-onboarding-card {
		grid-template-columns: 1fr;
		text-align: center;
	}

	.icmn-wechat-follow-actions {
		justify-content: center;
	}
}

@media (prefers-reduced-motion: reduce) {
	.icmn-wechat-service-card.is-loading .icmn-wechat-state-icon span {
		animation-duration: 1.8s;
	}
}
