/*
 * Consent-Leiste (template-parts/global/consent.php, inc/tracking.php).
 *
 * Lädt immer: Es gibt kein module-consent.php, deshalb zählt die Datei für
 * inc/enqueue.php zur Grundausstattung. Sie ist klein und greift nur, wenn
 * die Leiste im Markup steht.
 *
 * Designsprache: Fläche --dunkel, kleine Typo, keine Rundung, kein Overlay.
 * Die Knöpfe sind im Leistenumfang vollständig gestaltet, damit die Leiste
 * unabhängig von der Reihenfolge der Stylesheets gleich aussieht.
 */

.fk-consent {
	position: fixed;
	inset-inline: 0;
	bottom: 0;
	z-index: 90;
	background: var(--dunkel);
	color: var(--hell-85);
	border-top: 1px solid var(--linie-invers-20);
	border-radius: var(--radius);
	font-family: var(--sans);
	font-size: var(--fs-klein);
	font-weight: var(--fw-normal);
	line-height: var(--lh-zitat-klein);
}

.fk-consent[hidden] {
	display: none;
}

.fk-consent__innen {
	box-sizing: border-box;
	max-width: calc(var(--container) + 2 * var(--pad-x));
	margin-inline: auto;
	padding: 18px var(--pad-x) calc(18px + env(safe-area-inset-bottom, 0px));
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 14px var(--spalten-gap);
}

.fk-consent .screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

.fk-consent__text {
	flex: 1 1 32rem;
	max-width: 72ch;
	margin: 0;
}

.fk-consent__datenschutz {
	color: var(--hell);
	text-decoration: underline;
	text-decoration-color: var(--gold-hell);
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
	transition: color var(--dur-schnell) var(--ease-aus);
}

.fk-consent__datenschutz:hover {
	color: var(--gold-hell);
}

.fk-consent__aktionen {
	display: flex;
	flex: 0 0 auto;
	align-items: center;
	gap: 28px;
}

/* Beide Knöpfe: Button-Typo des Designs, ohne Rundung. */
.fk-consent__ablehnen,
.fk-consent__akzeptieren {
	margin: 0;
	border: 0;
	border-radius: var(--radius);
	font-family: var(--sans);
	font-size: var(--fs-button);
	font-weight: var(--fw-h3);
	letter-spacing: var(--ls-button);
	line-height: 1.2;
	text-transform: uppercase;
	cursor: pointer;
}

/* „Ablehnen" als Textlink mit goldener Unterlinie — gleich leicht erreichbar. */
.fk-consent__ablehnen {
	padding: 12px 0;
	background: none;
	color: var(--hell-85);
	text-decoration: underline;
	text-decoration-color: var(--gold-hell);
	text-decoration-thickness: 1px;
	text-underline-offset: 5px;
	transition: color var(--dur-schnell) var(--ease-aus);
}

.fk-consent__ablehnen:hover {
	color: var(--gold-hell);
}

/* „Akzeptieren" als heller Knopf (.fk-btn--hell): Hover goldhell. */
.fk-consent__akzeptieren {
	padding: 13px 26px;
	background: var(--bg);
	color: var(--ink);
	transition: background-color var(--dur-ui) var(--ease-aus);
}

.fk-consent__akzeptieren:hover {
	background: var(--gold-hell);
}

.fk-consent a:focus-visible,
.fk-consent button:focus-visible {
	outline: 2px solid var(--gold-hell);
	outline-offset: 3px;
}

@media (max-width: 559px) {
	.fk-consent {
		font-size: var(--fs-meta);
	}

	.fk-consent__innen {
		padding-top: 16px;
	}

	.fk-consent__aktionen {
		flex: 1 1 100%;
		justify-content: space-between;
	}

	.fk-consent__akzeptieren {
		flex: 1 1 auto;
		max-width: 60%;
	}
}

/*
 * Solange die Leiste steht, rückt der Sticky CTA um ihre Höhe nach oben —
 * die Leiste verdeckt ihn nie. `translate` statt `transform`: Es setzt sich
 * mit dem Hover-`transform: scale()` des Stickers zusammen, statt ihn zu
 * überschreiben. Die Höhe schreibt das Skript in --consent-hoehe.
 */
:root[data-consent-offen] [data-sticker] {
	translate: 0 calc(-1 * var(--consent-hoehe, 0px));
}

@media print {
	.fk-consent {
		display: none;
	}
}
