/* Wattner Highlights – Frontend
 * Farben wie der Button „Kontakt aufnehmen“: Gelb #FAB900 (wattner-secondary), Text #3C0137 (wattner-textfarbe).
 * Kontrast #3C0137 auf #FAB900 = 9,6:1 (WCAG AAA).
 */
.wh {
	--wh-bg: var(--wp--preset--color--wattner-secondary, #FAB900);
	--wh-fg: var(--wp--preset--color--wattner-textfarbe, #3C0137);
	--wh-shadow: 0 12px 28px rgba(60, 1, 55, .28), 0 3px 8px rgba(60, 1, 55, .16);
	font-family: var(--wp--preset--font-family--overpass, "Overpass"), system-ui, sans-serif;
	z-index: 990; /* unter Menü (998/999) und Cookie-Dialog */
	box-sizing: border-box;
}
.wh *, .wh *::before, .wh *::after { box-sizing: inherit; }

.wh-sr {
	position: absolute !important;
	width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ---------- Ein-/Ausblenden ---------- */
.wh.is-off { opacity: 0; visibility: hidden; pointer-events: none; }
.wh--badge { transition: opacity .35s ease, transform .45s cubic-bezier(.2, .9, .3, 1.25), visibility 0s; }
.wh--badge.is-off { transform: scale(.55); transition: opacity .25s ease, transform .3s ease, visibility 0s .3s; }

/* ---------- Kreis ---------- */
.wh--badge { position: absolute; width: var(--wh-size); height: var(--wh-size); }
.wh--hero  { --wh-size: clamp(170px, 14vw, 220px); }
.wh--dock  { --wh-size: 132px; position: fixed; right: 24px; bottom: 24px; transform-origin: 100% 100%; }

.wh__circle {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: .12em;
	width: 100%;
	height: 100%;
	padding: 12%;
	border-radius: 50%;
	background: var(--wh-bg);
	color: var(--wh-fg) !important;
	text-align: center;
	text-decoration: none !important;
	line-height: 1.08;
	transition: transform .2s ease, box-shadow .2s ease;
}
.wh__circle:hover { transform: scale(1.04); }

/* Variante 1 (und Rückfall, falls ein Motivbild nicht lädt): Schatten */
.wh--s-schatten .wh__circle,
.wh--s-schaf .wh__circle,
.wh--s-biene .wh__circle { box-shadow: var(--wh-shadow); }
.wh--s-schatten .wh__circle:hover,
.wh--s-schaf .wh__circle:hover,
.wh--s-biene .wh__circle:hover { box-shadow: 0 16px 34px rgba(60, 1, 55, .32), 0 4px 10px rgba(60, 1, 55, .18); }

/* Variante 2: weiße Kontur (+ sehr leichter Schatten, damit sie auch auf hellem Grund trägt) */
.wh--s-kontur .wh__circle { box-shadow: 0 0 0 5px #FFFFFF, 0 6px 18px rgba(60, 1, 55, .16); }
.wh--dock.wh--s-kontur .wh__circle { box-shadow: 0 0 0 4px #FFFFFF, 0 4px 14px rgba(60, 1, 55, .2); }

/* Varianten 3 + 4: Das Motivbild enthält den gelben Kreis selbst.
 * Das Bild liegt hinter dem (dann durchsichtigen) Link-Kreis, und zwar so,
 * dass der gemalte Kreis genau auf .wh__circle sitzt. Maße in % des Kreisdurchmessers,
 * gemessen an assets/motive/*.webp (Kreis dort 480 px). Bei neuen Bildern neu messen.
 * Die Klasse .wh--motif setzt das Skript erst, wenn das Bild geladen ist. */
.wh__motif {
	position: absolute;
	z-index: 0;
	max-width: none;
	height: auto;
	pointer-events: none;
	user-select: none;
	filter: drop-shadow(0 8px 12px rgba(60, 1, 55, .28));
	transition: transform .2s ease;
}
.wh--s-schaf .wh__motif { width: 121.6%; left: -11.2%; top: -52.1%; transform-origin: 50.3% 65.8%; } /* Schaf hält den Kreis im Maul */
.wh--s-biene .wh__motif { width: 123.6%; left: -0.8%;  top: -21.1%; transform-origin: 41.1% 57.9%; } /* Biene sitzt oben rechts auf dem Rand */
.wh--motif .wh__circle,
.wh--motif .wh__circle:hover { background: transparent; box-shadow: none; }
.wh--motif:hover .wh__motif { transform: scale(1.04); }
.wh--motif.wh--s-schaf .wh__circle { padding: 22% 13% 11%; } /* Platz unter dem Maul */
.wh--motif.wh--s-biene .wh__circle { padding: 18% 15% 11% 12%; } /* Platz neben Beinen und Körper */
.wh--dock.wh--s-biene { right: 44px; } /* Flügel ragen rechts heraus */
.wh--motif.wh--s-biene .wh__close { right: auto; left: calc(14.6% - 16px); } /* X auf „10:30 Uhr“, rechts sitzt die Biene */

/* Schrift (wird per Skript bei Bedarf verkleinert, damit Wörter nicht getrennt werden) */
.wh__eyebrow, .wh__title, .wh__cta { max-width: 100%; min-width: 0; hyphens: manual; overflow-wrap: normal; word-break: normal; }
.wh__eyebrow { font-weight: 700; font-size: calc(var(--wh-size) * .08); }
.wh__title   { font-weight: 900; font-size: calc(var(--wh-size) * .112); text-wrap: balance; }
.wh__cta     { font-weight: 600; font-size: calc(var(--wh-size) * .068); margin-top: .3em; text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: .2em; }
.wh__ext     { font-weight: 900; font-size: calc(var(--wh-size) * .085); line-height: 1; }

/* Fokus gut sichtbar – auch auf Fotos */
.wh__circle:focus-visible,
.wh__close:focus-visible,
.wh__tab:focus-visible,
.wh__panellink:focus-visible,
.wh__dismiss:focus-visible {
	outline: 3px solid var(--wh-fg);
	outline-offset: 3px;
	box-shadow: 0 0 0 3px #FFFFFF;
}

/* ---------- Schließen: dezent, auf dem Kreisrand ---------- */
.wh__close {
	position: absolute;
	z-index: 3;
	/* Mittelpunkt auf dem Kreisrand bei „1:30 Uhr“ */
	top: calc(14.6% - 16px);
	right: calc(14.6% - 16px);
	display: grid;
	place-items: center;
	width: 32px;   /* Klickfläche */
	height: 32px;
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--wh-fg);
	cursor: pointer;
	opacity: .75;
	transition: opacity .2s ease, transform .2s ease;
}
.wh__close::before { /* sichtbarer Punkt: 22 px, weiß, leicht schwebend */
	content: "";
	position: absolute;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: rgba(255, 255, 255, .92);
	box-shadow: 0 1px 4px rgba(60, 1, 55, .25);
}
.wh__close svg { position: relative; width: 9px; height: 9px; }
.wh__close svg path { stroke-width: 3.5; }
.wh__close:hover, .wh__close:focus-visible { opacity: 1; transform: scale(1.08); }
.wh--badge:hover .wh__close { opacity: 1; }

/* ---------- Mobil: Lasche am rechten Rand ---------- */
.wh--tab {
	position: fixed;
	right: 0;
	top: 58%;
	transform: translateY(-50%);
	display: flex;
	align-items: center;
	transition: opacity .3s ease, transform .35s ease, visibility 0s;
}
.wh--tab.is-off { transform: translate(100%, -50%); transition: opacity .25s ease, transform .3s ease, visibility 0s .3s; }
.wh__tab {
	display: flex;
	flex-direction: column;
	gap: 8px;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	min-height: 112px;
	padding: 14px 10px;
	border: 0;
	border-radius: 14px 0 0 14px;
	background: var(--wh-bg);
	color: var(--wh-fg);
	font: inherit;
	font-weight: 800;
	font-size: 15px;
	letter-spacing: .02em;
	cursor: pointer;
	box-shadow: -4px 6px 18px rgba(60, 1, 55, .25);
}
.wh__tablabel { writing-mode: vertical-rl; transform: rotate(180deg); white-space: nowrap; }
.wh__tabemoji { font-size: 20px; line-height: 1; } /* nur bei Stil Biene, steht oben */
.wh__tabarrow { /* Pfeil nach links, steht oben (alle Stile außer Biene) */
	width: 0; height: 0;
	border-top: 6px solid transparent;
	border-bottom: 6px solid transparent;
	border-right: 8px solid currentColor;
}
.wh--tab.is-open .wh__tab { display: none; }

.wh__panel {
	position: relative;
	width: min(320px, 86vw);
	padding: 22px 48px 14px 22px;
	border-radius: 18px 0 0 18px;
	background: var(--wh-bg);
	color: var(--wh-fg);
	box-shadow: -6px 10px 30px rgba(60, 1, 55, .3);
	animation: wh-slide .3s ease;
}
.wh__panel[hidden] { display: none; }
.wh__panellink { display: flex; flex-direction: column; gap: .2em; color: var(--wh-fg) !important; text-decoration: none !important; line-height: 1.15; }
.wh__panellink .wh__eyebrow { font-size: 14px; }
.wh__panellink .wh__title   { font-size: 21px; }
.wh__panellink .wh__cta     { font-size: 15px; margin-top: .35em; }
.wh__panellink .wh__ext     { font-size: 18px; }
.wh__panel .wh__close { top: 8px; right: 8px; opacity: .85; }
.wh__dismiss {
	margin-top: 10px;
	padding: 6px 0;
	min-height: 24px;
	border: 0;
	background: none;
	color: var(--wh-fg);
	font: inherit;
	font-size: 13px;
	text-decoration: underline;
	text-underline-offset: .18em;
	cursor: pointer;
}
@keyframes wh-slide { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- Mobil: Kreis im Kopfbild kleiner ---------- */
@media (max-width: 767px) {
	.wh--hero { --wh-size: 128px; }
	.wh--dock { display: none; }
}
@media (min-width: 768px) {
	.wh--tab { display: none; }
}

/* ---------- Weniger Bewegung ---------- */
@media (prefers-reduced-motion: reduce) {
	.wh, .wh *, .wh.is-off { transition: none !important; animation: none !important; }
	.wh--badge.is-off { transform: none; }
	.wh__circle:hover, .wh__close:hover { transform: none; }
}

@media print { .wh { display: none !important; } }
