/* Cookie-Hinweis: kleine Karte unten, ohne die Seite zu sperren */

.pb-consent {
	position: fixed;
	right: 12px;
	bottom: 12px;
	left: 12px;
	z-index: 1000;
	max-height: calc(100vh - 24px);
	overflow-y: auto;
	padding: 18px 18px 16px;
	border-radius: 20px;
	background: var(--wp--preset--color--ink, #1f5a87);
	color: #fff;
	font-family: var(--wp--preset--font-family--body, Montserrat, "Helvetica Neue", Arial, sans-serif);
	box-shadow: 0 20px 50px rgba(31, 90, 135, 0.35);
	opacity: 0;
	transform: translateY(24px);
	transition: opacity 0.25s ease, transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

.pb-consent.is-visible {
	opacity: 1;
	transform: translateY(0);
}

.pb-consent__head {
	display: flex;
	align-items: center;
	gap: 12px;
}

.pb-consent__icon {
	display: grid;
	flex-shrink: 0;
	place-items: center;
	width: 44px;
	height: 44px;
	border-radius: 12px;
	background: var(--wp--preset--color--sky, #a9d6f4);
	color: var(--wp--preset--color--ink, #1f5a87);
}

.pb-consent__title {
	margin: 0;
	font-family: var(--wp--preset--font-family--shop, "ABC ROM Compressed", "Arial Narrow", sans-serif);
	font-size: 24px;
	line-height: 1;
	text-transform: uppercase;
	color: var(--wp--preset--color--sky, #a9d6f4);
}

.pb-consent__text {
	margin: 12px 0 0;
	font-size: 14px;
	line-height: 1.5;
	color: rgba(255, 255, 255, 0.88);
}

.pb-consent__text a,
.pb-consent__text a:visited {
	color: #fff;
	font-weight: 700;
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* Einstellungen: Schalter pro Kategorie */
.pb-consent__prefs {
	display: grid;
	gap: 8px;
	margin-top: 14px;
}

.pb-consent__prefs[hidden] {
	display: none;
}

.pb-consent__cat {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	padding: 12px 14px;
	border-radius: 14px;
	background: rgba(255, 255, 255, 0.08);
	cursor: pointer;
}

.pb-consent__cat.is-fixed {
	cursor: default;
}

.pb-consent__cat-text {
	display: flex;
	flex-direction: column;
	gap: 2px;
	font-size: 12px;
	line-height: 1.4;
	color: rgba(255, 255, 255, 0.78);
}

.pb-consent__cat-text strong {
	font-size: 14px;
	color: #fff;
}

.pb-consent__switch {
	position: relative;
	flex-shrink: 0;
	width: 46px;
	height: 26px;
}

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

.pb-consent__switch span {
	position: absolute;
	inset: 0;
	border-radius: 8px;
	background: rgba(255, 255, 255, 0.28);
	pointer-events: none;
	transition: background-color 0.2s ease;
}

.pb-consent__switch span::after {
	content: "";
	position: absolute;
	top: 3px;
	left: 3px;
	width: 20px;
	height: 20px;
	border-radius: 5px;
	background: #fff;
	transition: transform 0.2s ease;
}

.pb-consent__switch input:checked + span {
	background: var(--wp--preset--color--sky, #a9d6f4);
}

.pb-consent__switch input:checked + span::after {
	background: var(--wp--preset--color--ink, #1f5a87);
	transform: translateX(20px);
}

.pb-consent__switch input:disabled + span {
	opacity: 0.6;
}

.pb-consent__switch input:focus-visible + span {
	outline: 3px solid #fff;
	outline-offset: 2px;
}

/* Buttons */
.pb-consent__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin-top: 14px;
}

.pb-consent__btn {
	flex: 1 1 auto;
	min-height: 44px;
	padding: 0 16px;
	border: 1.5px solid rgba(255, 255, 255, 0.45);
	border-radius: 12px;
	background: transparent;
	color: #fff;
	font-family: inherit;
	font-size: 14px;
	font-weight: 700;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.pb-consent__btn:hover {
	border-color: #fff;
}

.pb-consent__btn.is-primary {
	border-color: var(--wp--preset--color--sky, #a9d6f4);
	background: var(--wp--preset--color--sky, #a9d6f4);
	color: var(--wp--preset--color--ink, #1f5a87);
}

.pb-consent__btn.is-primary:hover {
	border-color: #fff;
	background: #fff;
}

.pb-consent__btn.is-link {
	flex: 0 0 auto;
	min-height: 0;
	padding: 6px 4px;
	border: 0;
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 3px;
	color: rgba(255, 255, 255, 0.85);
}

.pb-consent__btn[hidden] {
	display: none;
}

.pb-consent__btn:focus-visible {
	outline: 3px solid #fff;
	outline-offset: 2px;
}

@media (min-width: 700px) {
	.pb-consent {
		right: auto;
		bottom: 24px;
		left: 24px;
		width: 400px;
		padding: 20px 20px 18px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.pb-consent {
		transition: none;
	}
}
