/**
 * Footer social bar (China): WeChat icon + QR-code popover.
 *
 * Same look and popover behavior as the social bar on the other Hoenle
 * instances; rendered right-aligned in the below-footer row, column 3.
 */

.site-below-footer-wrap[data-section="section-below-footer-builder"] .site-footer-section-3 {
	display: flex !important;
	align-items: center;
	justify-content: flex-end;
	margin-bottom: 0;
}

.site-below-footer-wrap[data-section="section-below-footer-builder"] .site-footer-section-3 > .hoenle-social {
	margin: 0 !important;
}

.hoenle-social {
	position: relative;
}

.hoenle-social__list {
	display: flex;
	align-items: center;
	list-style: none;
	margin: 0;
	padding: 0;
}

.hoenle-social__item {
	margin: 0;
}

/* 40px touch target; 8px padding per side keeps the visible gap between
   icons equal, first/last icon flush with the grid edge. */
.hoenle-social__trigger {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 40px;
	padding: 0 8px;
	margin: 0;
	background: transparent;
	border: 0;
	border-radius: 6px;
	color: var(--aktd-color-ice, #F3F4F6);
	cursor: pointer;
	transition: color 0.2s ease;
}

.hoenle-social__item:first-child .hoenle-social__trigger {
	padding-left: 0;
}

.hoenle-social__item:last-child .hoenle-social__trigger {
	padding-right: 0;
}

.hoenle-social__trigger svg {
	height: 24px;
	width: auto;
	display: block;
}

.hoenle-social__trigger:hover,
.hoenle-social__item.is-open .hoenle-social__toggle {
	background-color: transparent !important;
}

.hoenle-social__trigger:hover,
.hoenle-social__trigger:focus:hover {
	color: #ffffff;
}

.hoenle-social__trigger:focus {
	outline: none;
	color: var(--aktd-color-ice, #F3F4F6);
}

.hoenle-social__trigger:focus-visible {
	outline: 2px solid var(--aktd-color-white, #fff);
	outline-offset: 2px;
	color: #ffffff;
}

/* The PNG has transparent padding around the badge, so 28px renders the
   visible badge at roughly the 24px height of the icons on other instances. */
.hoenle-social__wechat-icon {
	display: block;
	width: 28px;
	height: 28px;
	max-width: none;
}

/* .site-footer prefix beats the custom ".site-footer *" rules loaded later. */
.site-footer .hoenle-social__popover {
	display: none;
	position: absolute;
	bottom: calc(100% + 14px);
	right: 0;
	left: auto;
	transform: translateX(var(--hoenle-social-shift, 0px));
	z-index: 9999;
	width: max-content;
	max-width: calc(100vw - 24px);
	background: #ffffff !important;
	border-radius: 0;
	box-shadow: 0px 3px 6px #00000040;
	padding: 16px;
	text-align: left;
}

.site-footer .hoenle-social__popover--qr {
	padding: 28px 28px 20px;
}

.hoenle-social__item.is-open .hoenle-social__popover {
	display: block;
}

.hoenle-social__qr {
	display: block;
	width: 160px;
	height: 160px;
	max-width: none;
}

.site-footer .hoenle-social__arrow {
	position: absolute;
	top: 100%;
	left: auto;
	right: var(--hoenle-social-arrow-right, 20px);
	transform: translateX(50%);
	border: 10px solid transparent !important;
	border-top: 15px solid #ffffff !important;
	border-bottom-width: 0 !important;
}

.hoenle-social__close {
	position: absolute;
	top: -2px;
	right: -2px;
	width: 32px;
	height: 32px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	background: transparent;
	border: 0;
	border-radius: 4px;
	color: var(--aktd-color-font, #363d52);
	line-height: 1;
	cursor: pointer;
}

.hoenle-social__close svg {
	width: 16px;
	height: 16px;
	display: block;
}

.hoenle-social__close:hover {
	background: transparent !important;
	color: var(--aktd-color-hover-blue, #0070B9);
}

.hoenle-social__close:focus-visible {
	outline: 2px solid var(--aktd-color-dark-blue, #0071b4);
	outline-offset: 1px;
}

.hoenle-social__channels {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 0;
}

.hoenle-social__channels li {
	margin: 0;
}

.hoenle-social__channel {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: var(--aktd-color-font, #363d52) !important;
	font-size: 16px !important;
	font-weight: 400 !important;
	line-height: 1.3 !important;
	text-decoration: underline !important;
	text-underline-offset: 2px;
	word-break: break-word;
	min-height: 24px;
}

.hoenle-social__channel:hover {
	color: var(--aktd-color-hover-blue, #0070B9) !important;
}

.hoenle-social__channel:hover .hoenle-social__channel-icon {
	color: var(--aktd-color-hover-blue, #0070B9);
}

.hoenle-social__channel:focus-visible {
	outline: 2px solid var(--aktd-color-dark-blue, #0071b4);
	outline-offset: 2px;
	border-radius: 2px;
}

.hoenle-social__channel-icon {
	flex: 0 0 auto;
	display: inline-flex;
	color: var(--aktd-color-font, #363d52);
}

.hoenle-social__channel-icon svg {
	height: 17px;
	width: auto;
	display: block;
}

/* No-JS fallback: show popover contents inline instead of the popover. */
.site-footer .hoenle-social--nojs .hoenle-social__popover {
	display: block;
	position: static;
	transform: none;
	box-shadow: none;
	padding: 8px 0 0;
}

.hoenle-social--nojs .hoenle-social__popover .hoenle-social__channel {
	color: var(--aktd-color-ice, #f2f4f6) !important;
}

.hoenle-social--nojs .hoenle-social__close,
.hoenle-social--nojs .hoenle-social__arrow,
.hoenle-social--nojs .hoenle-social__toggle {
	display: none;
}

@media (max-width: 767px) {
	.site-below-footer-wrap[data-section="section-below-footer-builder"] .site-footer-section-3 {
		justify-content: center;
	}

	/* Centered icon on mobile: anchor the popover to the icon's center. */
	.site-footer .hoenle-social__popover {
		right: 50%;
		transform: translateX(calc(50% + var(--hoenle-social-shift, 0px)));
	}
}
