/* UGG Cookie-Zustimmung 1.1 – kompakte Karte (Desktop) / Bottom-Sheet (Handy).
   Animationen nur über transform/opacity; bei prefers-reduced-motion aus. */
.ugc, .ugc-toast {
	--ugc-green: #41b991;      /* CI-Grün (Bricks Main #3) – Flächen */
	--ugc-green-hover: #38a682;
	--ugc-green-ink: #23775b;  /* dunkles CI-Grün für Text/Fokus, 5,4:1 auf Weiß */
	--ugc-on-green: #fff;      /* wie die grünen Buttons der Seite (CI); fett gesetzt */
	--ugc-soft: #eef6f1;
	--ugc-text: #1b1b1b;
	--ugc-muted: #4f5652;
	--ugc-line: #e3e7e4;
	--ugc-ease: cubic-bezier(.16, 1, .3, 1);
	font-family: "Poppins", Arial, sans-serif;
	-webkit-font-smoothing: antialiased;
}
.ugc {
	position: fixed;
	inset: 0;
	z-index: 2147483000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	color: var(--ugc-text);
}
.ugc[hidden], .ugc-toast[hidden] { display: none; }
.ugc *, .ugc *::before, .ugc *::after { box-sizing: border-box; }
html.ugc-open { overflow: hidden; }

/* ---------- Hintergrund + Karte ---------- */
.ugc__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(17, 24, 20, .45);
	opacity: 0;
	transition: opacity .35s ease;
}
@media (min-width: 601px) {
	@supports (backdrop-filter: blur(2px)) {
		.ugc__backdrop { background: rgba(17, 24, 20, .32); backdrop-filter: blur(3px); }
	}
}
.ugc__dialog {
	position: relative;
	display: flex;
	flex-direction: column;
	width: min(560px, 100%);
	max-height: calc(100dvh - 32px);
	overflow: hidden;
	background: #fff;
	border-radius: 24px;
	box-shadow: 0 24px 70px rgba(16, 40, 24, .22), 0 2px 8px rgba(16, 40, 24, .06);
	outline: none;
	opacity: 0;
	transform: translateY(18px) scale(.97);
	transition: opacity .3s ease, transform .5s var(--ugc-ease), width .35s var(--ugc-ease);
}
.ugc--in .ugc__backdrop { opacity: 1; }
.ugc--in .ugc__dialog { opacity: 1; transform: none; }
.ugc--out .ugc__backdrop { opacity: 0; transition-duration: .25s; }
.ugc--out .ugc__dialog { opacity: 0; transform: translateY(12px) scale(.98); transition-duration: .22s, .3s; }
.ugc__dialog--prefs { width: min(640px, 100%); }

/* gestaffeltes Einblenden der Inhalte */
.ugc__in { opacity: 0; transform: translateY(8px); }
.ugc--in .ugc__in {
	opacity: 1;
	transform: none;
	transition: opacity .45s ease, transform .55s var(--ugc-ease);
	transition-delay: calc(var(--i, 0) * 55ms + 120ms);
}

.ugc__view { display: flex; flex-direction: column; min-height: 0; flex: 1 1 auto; }
.ugc__view[hidden] { display: none; }
.ugc__view--from-right { animation: ugcFromRight .4s var(--ugc-ease) both; }
.ugc__view--from-left { animation: ugcFromLeft .4s var(--ugc-ease) both; }
@keyframes ugcFromRight { from { opacity: 0; transform: translateX(28px); } }
@keyframes ugcFromLeft { from { opacity: 0; transform: translateX(-28px); } }

.ugc__scroll {
	flex: 1 1 auto;
	min-height: 0;
	overflow-y: auto;
	overscroll-behavior: contain;
	padding: 32px 32px 8px;
}

/* ---------- Kopf mit Keks ---------- */
.ugc__top { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; }
.ugc__cookie { flex: 0 0 auto; width: 76px; height: 76px; overflow: visible; }
.ugc__cookie-shadow { fill: rgba(0, 0, 0, .08); transform-origin: 60px 104px; }
.ugc__cookie-body, .ugc__chips { transform-origin: 60px 64px; }
.ugc__chips > *, .ugc__crumbs > * { transform-box: fill-box; transform-origin: center; }
.ugc--in .ugc__cookie-body,
.ugc--in .ugc__chips { animation: ugcCookieIn .8s var(--ugc-ease) .1s both, ugcFloat 5s ease-in-out 1.2s infinite; }
.ugc--in .ugc__cookie-shadow { animation: ugcShadow 5s ease-in-out 1.2s infinite; }
.ugc--in .ugc__chips > * { animation: ugcPop .45s var(--ugc-ease) both; }
.ugc--in .ugc__chips > :nth-child(1) { animation-delay: .35s; }
.ugc--in .ugc__chips > :nth-child(2) { animation-delay: .42s; }
.ugc--in .ugc__chips > :nth-child(3) { animation-delay: .49s; }
.ugc--in .ugc__chips > :nth-child(4) { animation-delay: .56s; }
.ugc--in .ugc__chips > :nth-child(5) { animation-delay: .63s; }
.ugc--in .ugc__chips > :nth-child(6) { animation-delay: .7s; }
.ugc--in .ugc__crumbs > * { animation: ugcCrumb .9s cubic-bezier(.3, 0, .5, 1) .75s both; }
.ugc--in .ugc__crumbs > :nth-child(2) { animation-delay: .85s; }
@keyframes ugcCookieIn { from { opacity: 0; transform: rotate(-16deg) scale(.7); } }
@keyframes ugcFloat { 50% { transform: translateY(-3px) rotate(-1.5deg); } }
@keyframes ugcShadow { 50% { transform: scaleX(.9); opacity: .7; } }
@keyframes ugcPop { from { opacity: 0; transform: scale(0); } 70% { transform: scale(1.18); } }
@keyframes ugcCrumb { from { opacity: 0; transform: translate(-8px, -10px) scale(.4); } }

.ugc .ugc__title {
	margin: 0;
	padding: 0;
	font-family: inherit;
	font-size: 26px;
	line-height: 1.2;
	font-weight: 700;
	letter-spacing: -.01em;
	color: #000;
	text-transform: none;
}
.ugc .ugc__title:focus { outline: none; }
.ugc .ugc__intro { margin: 0 0 18px; font-size: 15px; line-height: 1.6; color: var(--ugc-text); }

/* ---------- Vorteile ---------- */
.ugc .ugc__points { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 10px; }
.ugc .ugc__points li {
	display: flex;
	align-items: center;
	gap: 14px;
	margin: 0;
	padding: 10px 14px 10px 10px;
	border-radius: 14px;
	background: var(--ugc-soft);
	font-size: 14px;
	line-height: 1.45;
	color: var(--ugc-muted);
}
.ugc .ugc__points strong { color: var(--ugc-text); font-weight: 600; }
.ugc__icon {
	flex: 0 0 auto;
	display: grid;
	place-items: center;
	width: 38px;
	height: 38px;
	border-radius: 50%;
	background: #fff;
	color: var(--ugc-green-ink);
}
.ugc__icon svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Leiste unten ---------- */
.ugc__bar { flex: 0 0 auto; padding: 18px 32px 22px; background: #fff; }
.ugc__btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ugc .ugc__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 50px;
	margin: 0;
	padding: 12px 18px;
	border: 1.5px solid #cfd5d1;
	border-radius: 999px;
	background: #fff;
	color: var(--ugc-text);
	font: inherit;
	font-size: 15px;
	line-height: 1.2;
	font-weight: 600;
	text-align: center;
	cursor: pointer;
	transition: transform .2s var(--ugc-ease), background-color .2s ease, border-color .2s ease;
}
.ugc .ugc__btn:hover { border-color: var(--ugc-text); transform: translateY(-1px); }
.ugc .ugc__btn:active { transform: scale(.98); }
.ugc .ugc__btn--primary {
	border-color: var(--ugc-green);
	background: var(--ugc-green);
	color: var(--ugc-on-green);
	font-weight: 700;
}
.ugc .ugc__btn--primary:hover { border-color: var(--ugc-green-hover); background: var(--ugc-green-hover); }
.ugc__links {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 4px 20px;
	margin-top: 12px;
}
.ugc .ugc__links a,
.ugc .ugc__link {
	display: inline-flex;
	align-items: center;
	min-height: 32px;
	padding: 0;
	margin: 0;
	border: 0;
	background: none;
	font: inherit;
	font-size: 13px;
	font-weight: 500;
	color: var(--ugc-muted);
	text-decoration: underline;
	text-underline-offset: 3px;
	text-decoration-color: rgba(79, 86, 82, .4);
	cursor: pointer;
}
.ugc .ugc__links a:hover, .ugc .ugc__link:hover { color: var(--ugc-text); text-decoration-color: currentColor; }
.ugc .ugc__link--strong { color: var(--ugc-green-ink); font-weight: 600; text-decoration-color: rgba(35, 119, 91, .5); }

.ugc button:focus-visible,
.ugc a:focus-visible,
.ugc summary:focus-visible,
.ugc input:focus-visible,
.ugc-ph button:focus-visible {
	outline: 3px solid var(--ugc-green-ink);
	outline-offset: 3px;
}
/* Der Dialog selbst bekommt den Fokus nur als Startpunkt – kein Rahmen um die ganze Karte. */
.ugc__dialog:focus, .ugc__dialog:focus-visible, .ugc .ugc__title:focus { outline: none; }

/* ---------- Einstellungen ---------- */
.ugc__head { display: flex; align-items: center; gap: 6px; padding: 22px 32px 6px 20px; flex: 0 0 auto; }
.ugc .ugc__title--small { font-size: 21px; }
.ugc .ugc__back {
	display: inline-grid;
	place-items: center;
	width: 44px;
	height: 44px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: none;
	color: var(--ugc-text);
	cursor: pointer;
	transition: background-color .2s ease, transform .2s var(--ugc-ease);
}
.ugc .ugc__back:hover { background: var(--ugc-soft); transform: translateX(-2px); }
.ugc__view--prefs .ugc__scroll { padding-top: 6px; }
.ugc__view--prefs .ugc__intro { font-size: 14px; color: var(--ugc-muted); }
.ugc .ugc__cats { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ugc .ugc__cat {
	margin: 0;
	padding: 14px 16px;
	border: 1px solid var(--ugc-line);
	border-radius: 16px;
	transition: border-color .2s ease, background-color .2s ease;
}
.ugc .ugc__cat:has(.ugc__switch:checked) { border-color: rgba(65, 185, 145, .6); background: #f5fbf8; }
.ugc__cat-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.ugc .ugc__cat-title { margin: 0; font-size: 15px; font-weight: 600; color: var(--ugc-text); cursor: pointer; }
.ugc .ugc__always { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 600; color: var(--ugc-green-ink); }
.ugc .ugc__cat-desc { margin: 4px 0 0; font-size: 13.5px; line-height: 1.5; color: var(--ugc-muted); }

.ugc .ugc__switch {
	-webkit-appearance: none;
	appearance: none;
	position: relative;
	flex: 0 0 auto;
	width: 50px;
	height: 30px;
	margin: 0;
	border: 0;
	border-radius: 30px;
	background: #b8c0bb;
	cursor: pointer;
	transition: background-color .25s ease;
}
.ugc .ugc__switch::before {
	content: "";
	position: absolute;
	top: 3px;
	left: 3px;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 1px 4px rgba(0, 0, 0, .25);
	transition: transform .35s var(--ugc-ease);
}
.ugc .ugc__switch:checked { background: var(--ugc-green); }
.ugc .ugc__switch:checked::before { transform: translateX(20px); }

.ugc .ugc__details { margin-top: 8px; }
.ugc .ugc__details summary {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 32px;
	font-size: 13px;
	font-weight: 600;
	color: var(--ugc-green-ink);
	cursor: pointer;
	list-style: none;
}
.ugc .ugc__details summary::-webkit-details-marker { display: none; }
.ugc .ugc__details summary::after {
	content: "";
	width: 7px;
	height: 7px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: translateY(-2px) rotate(45deg);
	transition: transform .25s var(--ugc-ease);
}
.ugc .ugc__details[open] summary::after { transform: translateY(1px) rotate(-135deg); }
.ugc .ugc__details[open] .ugc__table { animation: ugcFade .3s ease both; }
@keyframes ugcFade { from { opacity: 0; transform: translateY(-4px); } }
.ugc .ugc__table {
	width: 100%;
	margin: 6px 0 0;
	border-collapse: collapse;
	font-size: 12.5px;
	line-height: 1.45;
	background: #f6f8f7;
	border-radius: 10px;
	overflow: hidden;
}
.ugc .ugc__table th,
.ugc .ugc__table td { padding: 8px 10px; text-align: left; vertical-align: top; border: 0; border-bottom: 1px solid #e6e9e7; color: var(--ugc-text); }
.ugc .ugc__table th { font-weight: 600; background: #edf1ee; }
.ugc .ugc__table code { font-size: 12px; background: none; padding: 0; word-break: break-all; }

/* ---------- Bestätigung ---------- */
.ugc-toast {
	position: fixed;
	left: 50%;
	bottom: calc(20px + env(safe-area-inset-bottom));
	z-index: 2147483001;
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 12px 18px;
	border-radius: 999px;
	background: #1b1b1b;
	color: #fff;
	font-size: 14px;
	font-weight: 500;
	white-space: nowrap;
	box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
	transform: translate(-50%, 16px);
	opacity: 0;
	transition: opacity .3s ease, transform .45s var(--ugc-ease);
	pointer-events: none;
}
.ugc-toast svg { color: #7fd9a3; }
.ugc-toast--in { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Platzhalter für gesperrte Einbettungen ---------- */
.ugc-ph {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 12px;
	width: 100%;
	min-height: 220px;
	aspect-ratio: 16 / 9;
	padding: 24px;
	border-radius: inherit;
	background: radial-gradient(120% 120% at 50% 0%, #2a3a30 0%, #151a17 70%);
	color: #fff;
	text-align: center;
	font-family: "Poppins", Arial, sans-serif;
}
.ugc-ph p { max-width: 460px; margin: 0; font-size: 14px; line-height: 1.5; color: #fff; }
.ugc-ph__btn {
	min-height: 48px;
	padding: 12px 24px;
	border: 0;
	border-radius: 999px;
	background: #41b991;
	color: #fff;
	font: inherit;
	font-size: 15px;
	font-weight: 700;
	cursor: pointer;
	transition: transform .2s ease, background-color .2s ease;
}
.ugc-ph__btn:hover { background: #38a682; transform: translateY(-1px); }
.ugc-ph__link {
	min-height: 32px;
	padding: 4px;
	border: 0;
	background: none;
	color: #fff;
	font: inherit;
	font-size: 13px;
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
}

/* ---------- Handy: Bottom-Sheet ---------- */
@media (max-width: 600px) {
	.ugc { padding: 0; align-items: flex-end; }
	.ugc__dialog,
	.ugc__dialog--prefs {
		width: 100%;
		max-height: 92dvh;
		border-radius: 24px 24px 0 0;
		transform: translateY(100%);
		opacity: 1;
		transition: transform .5s var(--ugc-ease);
	}
	.ugc--out .ugc__dialog { transform: translateY(100%); opacity: 1; transition-duration: .3s; }
	.ugc__scroll { padding: 24px 20px 6px; }
	.ugc__top { gap: 12px; margin-bottom: 10px; }
	.ugc__cookie { width: 56px; height: 56px; }
	.ugc .ugc__title { font-size: 21px; }
	.ugc .ugc__intro { font-size: 14.5px; line-height: 1.55; margin-bottom: 14px; }
	.ugc .ugc__points { gap: 8px; }
	.ugc .ugc__points li { padding: 8px 12px 8px 8px; font-size: 13.5px; gap: 12px; }
	.ugc__icon { width: 34px; height: 34px; }
	.ugc__icon svg { width: 19px; height: 19px; }
	.ugc__bar { padding: 14px 20px calc(14px + env(safe-area-inset-bottom)); box-shadow: 0 -10px 24px -14px rgba(0, 0, 0, .18); }
	.ugc .ugc__btn { font-size: 15px; padding: 12px 10px; }
	.ugc__links { margin-top: 8px; gap: 2px 18px; }
	.ugc__head { padding: 22px 20px 4px 10px; }
	.ugc .ugc__cat { padding: 12px 14px; }
	.ugc .ugc__table thead { display: none; }
	.ugc .ugc__table tr { display: block; padding: 8px 10px; border-bottom: 1px solid #e6e9e7; }
	.ugc .ugc__table td { display: block; padding: 1px 0; border: 0; }
	.ugc .ugc__table td:first-child { font-weight: 600; }
}
@media (max-width: 600px) and (max-height: 640px) {
	.ugc .ugc__points li > span:last-child { font-size: 13px; }
	.ugc__cookie { width: 44px; height: 44px; }
}
@media (max-width: 360px) {
	.ugc__btns { grid-template-columns: 1fr; }
	.ugc .ugc__btn--primary { order: -1; }
}

/* ---------- weniger Bewegung ---------- */
@media (prefers-reduced-motion: reduce) {
	.ugc *, .ugc *::before, .ugc *::after, .ugc__dialog, .ugc__backdrop, .ugc-toast {
		animation: none !important;
		transition-duration: .01ms !important;
		transition-delay: 0s !important;
	}
}
