/**
 * Footer social media bar + channel popover.
 *
 * Scoped to .hoenle-social* classes only; rendered inside the Astra
 * below-footer row (column 1, after copyright + footer menu).
 */

/* Layout inside the below-footer section: legal items left, socials right.
   !important is required to win over Astra's dynamic builder CSS. */
.site-below-footer-wrap[data-section="section-below-footer-builder"] .site-footer-section-1 {
	display: flex !important;
	flex-wrap: wrap;
	align-items: center;
	justify-content: flex-start;
	gap: 20px 40px;
	margin-bottom: 0;
	/* The grid row is itself flex (custom CSS); the section must span the
	   full row width so margin-left:auto can push the socials to the edge. */
	flex: 1 1 100%;
	width: 100%;
}

/* One shared vertical center line for copyright, menu and icons:
   strip stray margins and unify line-heights so the text sits exactly
   at the vertical middle of the 40px icon triggers. */
.site-below-footer-wrap[data-section="section-below-footer-builder"] .site-footer-section-1 > .ast-footer-copyright,
.site-below-footer-wrap[data-section="section-below-footer-builder"] .site-footer-section-1 > .footer-widget-area {
	margin: 0 !important;
	align-self: center;
}

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

.site-below-footer-wrap[data-section="section-below-footer-builder"] .site-footer-section-1 .ast-footer-copyright p {
	margin: 0 !important;
	line-height: 1.2 !important;
}

.site-below-footer-wrap[data-section="section-below-footer-builder"] .site-footer-section-1 .footer-bar-navigation,
.site-below-footer-wrap[data-section="section-below-footer-builder"] .site-footer-section-1 #astra-footer-menu {
	margin: 0 !important;
	padding: 0 !important;
}

.site-below-footer-wrap[data-section="section-below-footer-builder"] .site-footer-section-1 #astra-footer-menu .menu-link {
	line-height: 1.2 !important;
	padding-top: 0 !important;
	padding-bottom: 0 !important;
}

.hoenle-social {
	margin-left: auto !important;
	position: relative;
}

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

/* bewusst NICHT position:relative — die Popups verankern sich an
   .hoenle-social (der Icon-Leiste), damit alle rechtsbündig am
   rechten Grid-Rand liegen */
.hoenle-social__item {
	margin: 0;
}

/* Icon trigger (link or button) — 40px hohes Touch-Target; Breite folgt dem
   Glyph + 8px Padding je Seite, damit der SICHTBARE Abstand zwischen allen
   Icons identisch ist (auch beim breiteren YouTube-Icon) */
.hoenle-social__trigger {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: auto;
	padding: 0 8px;
	height: 40px;
	margin: 0;
	background: transparent;
	border: 0;
	border-radius: 6px;
	color: var(--aktd-color-ice, #F3F4F6);
	cursor: pointer;
	transition: color 0.2s ease, background-color 0.2s ease;
}

/* Erstes/letztes Icon bündig mit dem Grid-Rand (Padding nur innen) */
.hoenle-social__item:first-child .hoenle-social__trigger {
	padding-left: 0;
}

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

/* Color comes from the sanitized inline fill/stroke="currentColor" attributes;
   no CSS fill here so outline icons (fill="none") keep working.
   Fixed HEIGHT, auto width: all icons share the same height, wider
   glyphs (e.g. YouTube) may take more horizontal space. */
.hoenle-social__trigger svg {
	height: 24px;
	width: auto;
	display: block;
}

.hoenle-social__trigger:hover {
	color: #ffffff;
	background-color: transparent !important;
}

/* Maus-/Touch-Klick: keine gepunktete Outline, keine Farbänderung
   (Browser-/Theme-Defaults für :focus unterdrücken) */
.hoenle-social__trigger:focus {
	outline: none;
	color: var(--aktd-color-ice, #F3F4F6);
}

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

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

/* Offen-Zustand: keine Hintergrund-Hervorhebung; der Zustand ist durch das
   sichtbare Popup + aria-expanded eindeutig erkennbar. */
.hoenle-social__item.is-open .hoenle-social__toggle {
	background-color: transparent !important;
}

/* Popover above the icon.
   .site-footer-Prefix: hebt die Spezifität über ".site-footer *" aus dem
   Custom-CSS, das später lädt und sonst bei gleicher Spezifität gewinnt. */
.site-footer .hoenle-social__popover {
	display: none;
	position: absolute;
	bottom: calc(100% + 14px);
	/* Rechtsbündig an der Icon-Leiste verankert: alle Popups liegen mit
	   der rechten Kante am rechten Grid-Rand, nur der Pfeil wandert */
	right: 0;
	left: auto;
	transform: translateX(var(--hoenle-social-shift, 0px));
	z-index: 9999;
	/* Breite passt sich dem längsten Link an (eine Zeile pro Link auf Desktop),
	   auf kleinen Screens auf Viewport-Breite begrenzt — dann bricht Text um */
	width: max-content;
	max-width: calc(100vw - 24px);
	/* !important: das Custom-CSS ".site-footer *" erzwingt sonst transparent/none */
	background: #ffffff !important;
	border-radius: 0;
	box-shadow: 0px 3px 6px #00000040;
	padding: 16px;
	text-align: left;
}

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

/* Caret pointing down to the icon; follows the horizontal clamp shift */
.site-footer .hoenle-social__arrow {
	position: absolute;
	top: 100%;
	/* JS setzt die Pfeilposition auf die Mitte des jeweiligen Icons */
	left: auto;
	right: var(--hoenle-social-arrow-right, 20px);
	transform: translateX(50%);
	/* 20px breit (2 × 10px), 15px hoch */
	border: 10px solid transparent !important;
	border-top: 15px solid #ffffff !important;
	border-bottom-width: 0 !important;
}

.hoenle-social__close {
	position: absolute;
	/* 32px-Button mit zentriertem 16px-X: -2px ergibt exakt 6px
	   Abstand des sichtbaren X zum oberen/rechten Popup-Rand */
	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;
}

/* exakt 16px sichtbares X, Klickfläche bleibt 32px */
.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: 0px;
}

.hoenle-social__channels li {
	margin: 0;
}

/* Channel rows: small icon + underlined label (see screenshots).
   footer a rules are overridden here on purpose. */
.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;
}

/* Hover: Text, Icon und Unterstrich einheitlich in Hover-Blau */
.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: keep all channel links reachable in the document flow */
.site-footer .hoenle-social--nojs .hoenle-social__popover {
	display: block;
	position: static;
	transform: none;
	box-shadow: none;
	padding: 8px 0 0;
	min-width: 0;
	background: transparent !important;
}

.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;
}

/* Tablet/Mobile: below-footer stacks (see existing rules in style.css) */
@media (max-width: 767px) {
	.site-below-footer-wrap[data-section="section-below-footer-builder"] .site-footer-section-1 {
		flex-direction: column;
		align-items: center;
		justify-content: center;
		gap: 10px;
	}

	/* gleiche Spezifität wie die Desktop-Regel (margin-left:auto), sonst gewinnt diese */
	.site-below-footer-wrap[data-section="section-below-footer-builder"] .site-footer-section-1 > .hoenle-social {
		margin: 0 auto !important;
		order: 3;
	}

	.hoenle-social__list {
		justify-content: center;
		gap: 0px;
	}
}
