.kfm-wa-contact {
	display: flex;
	align-items: center;
	gap: 14px;
	min-width: 0;
	color: #2c241f;
	text-decoration: none;
	-webkit-tap-highlight-color: transparent;
}

.kfm-wa-contact__avatar {
	position: relative;
	display: grid;
	flex: 0 0 48px;
	place-items: center;
	width: 48px;
	height: 48px;
	overflow: hidden;
	border-radius: 50%;
	background: #f2ede8;
	color: #615247;
	font-size: 20px;
	font-weight: 500;
}

.kfm-wa-contact__avatar img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.kfm-wa-contact__avatar img[hidden] {
	display: none;
}

.kfm-wa-contact__body {
	display: flex;
	flex: 1 1 0;
	min-width: 0;
	flex-direction: column;
	align-items: flex-start;
	gap: 3px;
}

.kfm-wa-contact__name,
.kfm-wa-contact__number {
	display: block;
	max-width: 100%;
	overflow-wrap: anywhere;
}

.kfm-wa-contact__name {
	font-size: 15px;
	font-weight: 600;
	line-height: 1.45;
}

.kfm-wa-contact__number {
	color: #625c57;
	font-size: 13px;
	font-weight: 400;
	line-height: 1.5;
	unicode-bidi: isolate;
}

.kfm-wa-contact:focus-visible {
	outline: 2px solid #dc6600;
	outline-offset: 3px;
}

.footer.footer--reference .footer-whatsapp {
	padding-block: 0 30px;
}

.footer.footer--reference .footer-whatsapp h2 {
	margin: 0 0 22px;
	color: var(--footer-heading);
	font-size: 20px;
	font-weight: 600;
}

.footer-whatsapp__heading {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 16px;
	margin-bottom: 22px;
}

.footer.footer--reference .footer-whatsapp__heading h2 {
	margin: 0;
}

.footer-whatsapp__availability {
	margin: 0;
	color: #d1c3b5;
	font-size: 14px;
	line-height: 1.5;
}

.footer.footer--reference .footer-whatsapp__list {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
	gap: 20px 0;
}

.footer-whatsapp__list > li {
	min-width: 0;
}

.footer-whatsapp__list > li + li {
	border-inline-start: 1px solid var(--footer-rule);
	padding-inline-start: 20px;
}

.footer.footer--reference .footer-whatsapp .kfm-wa-contact {
	min-height: 64px;
	padding-block: 6px;
	padding-inline: 0 16px;
	color: var(--footer-heading);
}

.footer-whatsapp .kfm-wa-contact__avatar {
	flex-basis: 52px;
	width: 52px;
	height: 52px;
	background: #493b2f;
	color: #fff7ef;
}

.footer-whatsapp .kfm-wa-contact__name {
	font-size: 17px;
}

.footer-whatsapp .kfm-wa-contact__number {
	color: #d1c3b5;
	font-size: 14px;
}

.footer.footer--reference .footer-whatsapp a:hover .kfm-wa-contact__name {
	color: #ffc17c;
}

/* 白色窄竖栏与两种联系弹层；页脚联系人样式共用上方规则。 */
.kfm-contact-rail {
	position: fixed;
	z-index: 98;
	inset-inline-end: var(--kfm-rail-inline-adjust, 0);
	top: 50%;
	width: 64px;
	margin: 0;
	padding: 5px;
	border: 1px solid #e4e7eb;
	border-radius: 14px;
	border-inline-end: 0;
	border-start-end-radius: 0;
	border-end-end-radius: 0;
	background: #fff;
	color: #242b35;
	font-family: inherit;
	text-align: start;
	box-shadow: 0 4px 16px #17202c12;
	transform: translateY(-10%);
}

.kfm-contact-rail,
.kfm-contact-rail * {
	box-sizing: border-box;
}

.kfm-contact-rail [hidden] {
	display: none;
}

.kfm-contact-rail-enabled aside-content {
	--cncartgo-dock-handle-display: none;
	--cncartgo-dock-toolbar-display: none;
}

.kfm-contact-rail__entry {
	position: static;
	margin: 0;
	padding: 0;
	border: 0;
}

.kfm-wa-widget__trigger {
	display: flex;
	width: 100%;
	min-height: 75px;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 5px;
	margin: 0;
	padding: 9px 0;
	border: 0;
	border-radius: 10px;
	background: transparent;
	color: #242b35;
	font-family: inherit;
	font-size: 11px;
	font-weight: 400;
	line-height: 1.4;
	text-align: center;
	cursor: pointer;
	list-style: none;
	-webkit-tap-highlight-color: transparent;
}

.kfm-wa-widget__trigger::-webkit-details-marker {
	display: none;
}

.kfm-wa-widget__trigger::marker {
	content: "";
}

.kfm-contact-rail svg {
	flex-shrink: 0;
	width: 26px;
	height: 26px;
	fill: none;
	stroke: currentcolor;
	stroke-width: 1.6;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.kfm-wa-widget__trigger:hover,
.kfm-contact-rail__entry[open] > summary {
	background: #fff4e8;
	color: #c65b00;
}

.kfm-contact-rail__entry[open] > summary svg {
	color: #ff7900;
}

.kfm-contact-rail__top {
	position: relative;
	margin-top: 8px;
}

.kfm-contact-rail__top::before {
	position: absolute;
	inset-inline: 10px;
	top: -4px;
	height: 1px;
	background: #e4e7eb;
	content: "";
}

.kfm-contact-rail :is(button, summary, a):focus-visible {
	outline: 2px solid #b44f00;
	outline-offset: 2px;
}

.kfm-wa-widget__popover {
	position: absolute;
	inset-inline-start: auto;
	inset-inline-end: calc(100% + 14px);
	top: 0;
	bottom: auto;
	display: flex;
	flex-direction: column;
	width: min(320px, calc(100vw - 114px));
	max-width: none;
	min-height: 0;
	max-height: min(560px, calc(100dvh - 32px));
	margin: 0;
	padding: 14px 20px 12px;
	border: 1px solid #ebedf0;
	border-radius: 14px;
	background: #fff;
	color: #242b35;
	box-shadow: 0 6px 24px #17202c14;
}

.kfm-contact-rail__entry[open] .kfm-wa-widget__popover {
	animation: kfm-wa-open 140ms ease-out;
}

/* 透明桥接区属于弹层，慢速从入口移到联系人时也不会意外收起。 */
.kfm-wa-widget__popover::before {
	position: absolute;
	inset-inline-start: 100%;
	top: 0;
	width: 14px;
	height: 100%;
	content: "";
}

.kfm-contact-rail__entry:not([open]) .kfm-wa-widget__popover {
	display: none;
}

.kfm-wa-widget__header {
	display: flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: space-between;
	min-height: 42px;
	gap: 12px;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
}

.kfm-wa-widget__header h2 {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0;
	color: #242b35;
	font-size: 17px;
	font-weight: 600;
	line-height: 1.4;
}

.kfm-wa-widget__header h2 svg {
	color: #ff7900;
}

.kfm-wa-widget__header button,
.kfm-contact-rail__address button {
	display: grid;
	place-items: center;
	flex: 0 0 36px;
	width: 36px;
	height: 36px;
	padding: 8px;
	border: 0;
	border-radius: 6px;
	background: transparent;
	color: #554e48;
	cursor: pointer;
}

.kfm-wa-widget__header button {
	margin-inline-end: -8px;
}

.kfm-wa-widget__header button:hover,
.kfm-contact-rail__address button:hover {
	background: #f4f4f4;
}

.kfm-wa-widget__header button svg,
.kfm-contact-rail__address button svg {
	width: 20px;
	height: 20px;
}

.kfm-wa-widget__list,
.kfm-contact-rail__emails {
	min-height: 0;
	margin: 0;
	padding: 0;
	overflow-y: auto;
	overscroll-behavior: contain;
	list-style: none;
}

.kfm-wa-widget__list li + li,
.kfm-contact-rail__emails li + li {
	border-top: 1px solid #ededed;
}

.kfm-wa-widget .kfm-wa-contact {
	min-height: 76px;
	padding-block: 12px;
}

.kfm-wa-widget .kfm-wa-contact:hover .kfm-wa-contact__name {
	color: #b54f00;
}

.kfm-wa-widget .kfm-wa-contact:focus-visible {
	outline-offset: -2px;
	border-radius: 4px;
}

.kfm-contact-rail__email {
	top: 75px;
	padding-bottom: 18px;
}

.kfm-contact-rail__emails li {
	padding-block: 14px 0;
}

.kfm-contact-rail__emails li + li {
	margin-top: 16px;
}

.kfm-contact-rail__caption {
	margin: 0 0 5px;
	color: #625c57;
	font-size: 12px;
	line-height: 1.5;
}

.kfm-contact-rail__address {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 4px;
}

.kfm-contact-rail__address a {
	min-width: 0;
	color: #242b35;
	font-size: 15px;
	font-weight: 500;
	line-height: 1.5;
	text-decoration: none;
	overflow-wrap: anywhere;
	unicode-bidi: isolate;
}

.kfm-contact-rail__send {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-height: 44px;
	margin-top: 16px;
	padding: 10px 12px;
	border-radius: 7px;
	background: #ff7900;
	color: #242b35;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.5;
	text-decoration: none;
}

.kfm-contact-rail__send svg {
	width: 16px;
	height: 16px;
}

.kfm-contact-rail__send:hover {
	background: #ed6e00;
	color: #242b35;
}

.kfm-contact-rail__status {
	margin: 10px 0 0;
	color: #625c57;
	font-size: 12px;
	line-height: 1.5;
}

.kfm-contact-rail__status:empty {
	display: none;
}

@keyframes kfm-wa-open {

	from {
		opacity: 0;
		transform: translateY(4px);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@media (max-width: 1100px) {

	.footer.footer--reference .footer-whatsapp__list {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.footer-whatsapp__list > li:nth-child(odd) {
		border-inline-start: 0;
		padding-inline-start: 0;
	}
}

@media (max-width: 600px) {

	.footer.footer--reference .footer-whatsapp__list {
		grid-template-columns: minmax(0, 1fr);
	}

	.footer-whatsapp__list > li + li {
		border-inline-start: 0;
		padding-inline-start: 0;
	}

	.kfm-contact-rail {
		inset-inline-end: var(--kfm-rail-inline-adjust, 0);
		top: auto;
		bottom: calc(84px + env(safe-area-inset-bottom, 0px) + var(--kfm-rail-bottom-adjust, 0px));
		width: 56px;
		padding: 3px;
		transform: none;
	}

	.kfm-wa-widget__trigger {
		min-height: 64px;
		font-size: 10px;
	}

	.kfm-wa-widget__popover {
		inset-inline-end: calc(100% + 10px);
		width: min(320px, calc(100vw - 82px));
		max-height: calc(100dvh - 112px);
		padding-inline: 14px;
	}

	.kfm-wa-widget__popover::before {
		width: 10px;
	}

	.kfm-wa-widget .kfm-wa-contact {
		gap: 10px;
	}

	.kfm-wa-widget .kfm-wa-contact__avatar {
		flex-basis: 36px;
		width: 36px;
		height: 36px;
	}

	.kfm-contact-rail__email {
		top: 64px;
	}
}

@media (prefers-reduced-motion: reduce) {

	.kfm-contact-rail__entry[open] .kfm-wa-widget__popover {
		animation: none;
	}
}
