/*
 * Einwilligungs-Banner (Port von Bast, Task 11).
 * Farben/Radien nach Ewerle-Palette (theme.json): Navy #16233E, Orange
 * #E8821A, Weiß. Schrift wie im Rest der Seite (Roboto Condensed).
 */

.ewerle-consent {
	position: fixed;
	inset: 0;
	z-index: 9999;
	display: flex;
	align-items: flex-end;
	justify-content: center;
	padding: 16px;
	background: rgba(11, 20, 36, .55);
	backdrop-filter: blur(2px);
	font-family: var(--wp--preset--font-family--roboto-condensed), -apple-system, BlinkMacSystemFont, sans-serif;
}

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

.ewerle-consent__box {
	width: 100%;
	max-width: 640px;
	max-height: calc(100vh - 32px);
	overflow-y: auto;
	background: #fff;
	border-radius: 16px;
	box-shadow: 0 20px 60px rgba(11, 20, 36, .35);
	padding: 32px;
	color: #16233E;
}

.ewerle-consent__box h2 {
	margin: 0 0 12px;
	font-size: 1.35rem;
	font-weight: 700;
	color: #16233E;
}

.ewerle-consent__box > p {
	margin: 0 0 18px;
	font-size: 14px;
	line-height: 1.6;
	color: #4B5468;
}

.ewerle-consent__box > p a {
	color: #E8821A;
	text-decoration: underline;
}

.ewerle-consent__kategorie {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 18px;
	padding: 16px 0;
	border-top: 1px solid rgba(22, 35, 62, .1);
}

.ewerle-consent__kategorie strong {
	display: block;
	font-size: 15px;
	font-weight: 700;
	margin-bottom: 4px;
	color: #16233E;
}

.ewerle-consent__kategorie p {
	margin: 0;
	font-size: 13px;
	line-height: 1.55;
	color: #4B5468;
}

/* Schalter: Das echte Kontrollkästchen bleibt bedienbar und fokussierbar,
   sichtbar ist die gestaltete Fläche daneben. */
.ewerle-consent__schalter {
	position: relative;
	flex-shrink: 0;
	width: 48px;
	height: 28px;
	cursor: pointer;
}

.ewerle-consent__schalter input {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	opacity: 0;
	cursor: pointer;
}

.ewerle-consent__schalter span[aria-hidden] {
	position: absolute;
	inset: 0;
	border-radius: 999px;
	background: #C8CCD6;
	transition: background-color .2s ease;
	pointer-events: none;
}

.ewerle-consent__schalter span[aria-hidden]::after {
	content: "";
	position: absolute;
	top: 3px;
	left: 3px;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: #fff;
	transition: transform .2s ease;
}

.ewerle-consent__schalter input:checked + span[aria-hidden] {
	background: #E8821A;
}

.ewerle-consent__schalter input:checked + span[aria-hidden]::after {
	transform: translateX(20px);
}

.ewerle-consent__schalter input:focus-visible + span[aria-hidden] {
	outline: 3px solid #FBB765;
	outline-offset: 2px;
}

.ewerle-consent__schalter.is-fest {
	cursor: default;
	opacity: .6;
}

.ewerle-consent__knoepfe {
	display: grid;
	grid-template-columns: 1fr;
	gap: 10px;
	margin-top: 20px;
}

.ewerle-consent__btn {
	padding: 13px 20px;
	border: 1px solid rgba(22, 35, 62, .15);
	border-radius: 10px;
	background: #fff;
	font-family: inherit;
	font-size: 15px;
	font-weight: 700;
	color: #16233E;
	cursor: pointer;
	transition: border-color .18s ease, background-color .18s ease, color .18s ease;
}

.ewerle-consent__btn:hover {
	border-color: #E8821A;
	color: #E8821A;
}

.ewerle-consent__btn.is-primaer {
	background:
		radial-gradient(120% 130% at 10% 0%, #E8921F 0%, rgba(232, 146, 31, 0) 55%),
		radial-gradient(130% 130% at 100% 100%, #8F4405 0%, rgba(143, 68, 5, 0) 55%),
		#B85F09;
	border-color: transparent;
	color: #fff;
}

.ewerle-consent__btn.is-primaer:hover {
	background: #16233E;
	color: #fff;
}

.ewerle-consent__btn.is-still {
	border-color: transparent;
	color: #7A8296;
}

.ewerle-consent__fuss {
	margin: 16px 0 0;
	text-align: center;
	font-size: 12px;
	color: #7A8296;
}

.ewerle-consent__fuss a {
	color: inherit;
}

.ewerle-consent__mehr {
	border: 0;
	background: none;
	padding: 0;
	font: inherit;
	color: inherit;
	text-decoration: underline;
	cursor: pointer;
}

/* Solange das Banner offen ist, soll die Seite dahinter nicht mitscrollen. */
body.hat-consent-banner {
	overflow: hidden;
}

@media (min-width: 620px) {
	.ewerle-consent {
		align-items: center;
	}

	.ewerle-consent__knoepfe {
		grid-template-columns: 1fr 1fr;
	}

	.ewerle-consent__btn.is-still {
		grid-column: 1 / -1;
	}
}
