/*!
 * RS Consent – Banner, Einstellungsdialog, Platzhalter, Cookie-Richtlinie
 * Nutzt ausschließlich die Tokens aus rs-ui.css (--rs-c-*), damit Kontrast-
 * Modi des Barrierefreiheits-Moduls automatisch greifen.
 */

/* ===================================================================== Grundgerüst */
.rs-cc {
	--_bg: var(--rs-c-paper); --_fg: var(--rs-c-ink); --_soft: var(--rs-c-ink-soft); --_muted: var(--rs-c-muted);
	--_line: var(--rs-c-line); --_surface: var(--rs-c-surface); --_switch: var(--rs-c-stone);
	position: relative; z-index: 99990; font-family: var(--rs-f-ui); color: var(--_fg);
}
.rs-cc--dark {
	--_bg: var(--rs-c-dark); --_fg: var(--rs-c-on-dark); --_soft: var(--rs-c-on-dark); --_muted: var(--rs-c-on-dark-muted);
	--_line: rgb(255 255 255 / .16); --_surface: rgb(255 255 255 / .05); --_switch: rgb(255 255 255 / .22);
}
.rs-cc *, .rs-cc *::before, .rs-cc *::after { box-sizing: border-box; }
.rs-cc__banner[hidden], .rs-cc__dialog[hidden], .rs-cc__backdrop[hidden], .rs-cc__services[hidden], .rs-cc__meta[hidden] { display: none; }
.rs-cc :focus-visible, .rs-cc-reopen:focus-visible { outline: 2px solid var(--rs-c-focus); outline-offset: 3px; }

.rs-cc__backdrop { position: fixed; inset: 0; background: rgb(14 23 38 / .55); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }

.rs-cc__banner, .rs-cc__dialog {
	position: fixed; background: var(--_bg); color: var(--_fg); border: 1px solid var(--_line);
	box-shadow: var(--rs-shadow-2); opacity: 0; transform: translateY(14px);
	transition: opacity .45s var(--rs-ease-out), transform .55s var(--rs-ease-out);
}
.rs-cc__banner.is-in, .rs-cc__dialog.is-in { opacity: 1; transform: none; }
.rs-cc__banner:focus, .rs-cc__dialog:focus { outline: none; }

/* Feine Linie – das Markenmotiv, sparsam */
.rs-cc__banner::before { content: ""; position: absolute; top: -1px; left: clamp(20px, 2.4vw, 32px); width: 56px; height: var(--rs-line-w); background: var(--rs-area); }

/* ===================================================================== Banner */
.rs-cc__banner {
	display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px 32px; align-items: end;
	padding: clamp(20px, 2.4vw, 30px) clamp(20px, 2.6vw, 34px);
	max-height: calc(100dvh - var(--rs-tabbar-space, 0px) - 32px); overflow: auto; overscroll-behavior: contain;
}
.rs-cc--float .rs-cc__banner { left: 12px; right: 12px; bottom: calc(var(--rs-tabbar-space, 0px) + 16px); margin-inline: auto; max-width: 1040px; border-radius: var(--rs-r-leaf); }
.rs-cc--bar .rs-cc__banner { left: 0; right: 0; bottom: var(--rs-tabbar-space, 0px); border-width: 1px 0 0; border-radius: 0; padding-inline: max(var(--rs-gutter), calc((100% - var(--rs-container)) / 2)); }
.rs-cc--modal .rs-cc__banner { inset: 0; margin: auto; height: fit-content; width: min(640px, calc(100% - 24px)); border-radius: var(--rs-r-leaf); }
@media (min-width: 960px) {
	.rs-cc--float .rs-cc__banner, .rs-cc--bar .rs-cc__banner { grid-template-columns: minmax(0, 1fr) auto; }
	.rs-cc--float .rs-cc__banner .rs-cc__actions, .rs-cc--bar .rs-cc__banner .rs-cc__actions { width: 580px; }
}

.rs-cc__title { display: flex; align-items: center; gap: .55em; margin: 0 0 .5em; font: var(--rs-fw-heading) clamp(1.2rem, 1.05rem + .6vw, 1.55rem)/1.2 var(--rs-f-display); letter-spacing: var(--rs-ls-heading); color: inherit; }
.rs-cc__title .rs-icon { width: 1.15em; height: 1.15em; color: var(--rs-area); flex: none; }
.rs-cc--dark .rs-cc__title .rs-icon { color: var(--rs-c-brass); }
.rs-cc__text { font-size: .95rem; line-height: 1.6; color: var(--_soft); max-width: 70ch; }
.rs-cc__text p { margin: 0 0 .6em; } .rs-cc__text > :last-child { margin-bottom: 0; }
.rs-cc__text a, .rs-cc__links a, .rs-cc__facts a { color: inherit; text-decoration: underline; text-underline-offset: .2em; text-decoration-thickness: 1px; }
.rs-cc__links { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: .8em 0 0; font-size: .85rem; color: var(--_muted); }
.rs-cc__links--dialog { margin: 0; padding: 0 clamp(20px, 3vw, 32px) 18px; }

/* Drei gleichwertige Schaltflächen: gleiche Größe, gleiche Gewichtung */
.rs-cc__actions { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 560px) { .rs-cc__actions { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.rs-cc__btn {
	display: inline-flex; align-items: center; justify-content: center; min-height: 48px; width: 100%; padding: .7em 1.1em;
	font: 550 .95rem/1.2 var(--rs-f-ui); color: var(--_fg); background: transparent;
	border: 1px solid currentColor; border-radius: var(--rs-r-pill); cursor: pointer; text-align: center;
	transition: background-color var(--rs-dur-fast), color var(--rs-dur-fast), border-color var(--rs-dur-fast);
}
.rs-cc__btn:hover, .rs-cc__btn:focus-visible { background: var(--_fg); color: var(--_bg); border-color: var(--_fg); }

/* Rechtsseiten: dezente Leiste */
.rs-cc--legal .rs-cc__banner { padding-block: 14px; gap: 10px 24px; box-shadow: 0 -10px 30px -24px rgb(16 27 45 / .5); }
.rs-cc--legal .rs-cc__banner::before { display: none; }
.rs-cc--legal .rs-cc__title { font-size: 1.05rem; margin-bottom: .25em; }
.rs-cc--legal .rs-cc__text { font-size: .875rem; }
.rs-cc--legal .rs-cc__text p:not(:first-child) { display: none; }
.rs-cc--legal .rs-cc__btn { min-height: 42px; font-size: .9rem; }

/* ===================================================================== Dialoge */
.rs-cc__dialog {
	inset: 0; margin: auto; width: min(780px, calc(100% - 24px)); height: fit-content; max-height: min(90dvh, 960px);
	display: flex; flex-direction: column; border-radius: var(--rs-r-leaf); overflow: hidden;
}
.rs-cc__dialog--ask { width: min(540px, calc(100% - 24px)); }
.rs-cc__dhead { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px clamp(20px, 3vw, 32px) 12px; }
.rs-cc__dhead .rs-cc__title { margin: 0; }
.rs-cc__close { display: inline-grid; place-items: center; width: 44px; height: 44px; flex: none; border: 1px solid var(--_line); border-radius: 50%; background: transparent; color: inherit; cursor: pointer; transition: background-color var(--rs-dur-fast), color var(--rs-dur-fast); }
.rs-cc__close:hover { background: var(--_fg); color: var(--_bg); }
.rs-cc__close .rs-icon { width: 20px; height: 20px; }
.rs-cc__dbody { padding: 0 clamp(20px, 3vw, 32px) 8px; overflow: auto; overscroll-behavior: contain; flex: 1 1 auto; }
.rs-cc__actions--dialog, .rs-cc__dialog > .rs-cc__actions { padding: 16px clamp(20px, 3vw, 32px) 20px; border-top: 1px solid var(--_line); }
.rs-cc__askmeta { font-size: .85rem; color: var(--_muted); margin: .6em 0 0; }
.rs-cc__askmeta a { color: inherit; }
.rs-cc__meta { font-size: .8rem; color: var(--_muted); margin: 18px 0 8px; overflow-wrap: anywhere; }

/* Kategorien */
.rs-cc__cats { list-style: none; margin: 18px 0 0; padding: 0; }
.rs-cc__cat { border-top: 1px solid var(--_line); padding: 16px 0; }
.rs-cc__catrow, .rs-cc__svcrow { display: flex; align-items: center; gap: 12px; }
.rs-cc__catname { font: 500 1.05rem/1.3 var(--rs-f-ui); cursor: pointer; }
.rs-cc__svcname { font: 550 .95rem/1.3 var(--rs-f-ui); cursor: pointer; }
.rs-cc__always { margin-left: auto; font-size: .8rem; color: var(--_muted); }
.rs-cc__catdesc { margin: 6px 0 0 56px; font-size: .9rem; line-height: 1.55; color: var(--_soft); }
.rs-cc__more { display: inline-flex; align-items: center; gap: .35em; margin: 8px 0 0 56px; padding: 4px 0; border: 0; background: none; color: inherit; font: 500 .875rem/1.3 var(--rs-f-ui); cursor: pointer; text-decoration: underline; text-underline-offset: .2em; }
.rs-cc__more .rs-icon { width: 18px; height: 18px; transition: transform .35s var(--rs-ease-out); }
.rs-cc__more[aria-expanded="true"] .rs-icon { transform: rotate(180deg); }
.rs-cc__services { list-style: none; margin: 12px 0 0 56px; padding: 0; display: grid; gap: 10px; }
.rs-cc__svc { padding: 14px 16px; background: var(--_surface); border: 1px solid var(--_line); border-radius: var(--rs-r-m); }
.rs-cc__facts { margin: 10px 0 0; display: grid; gap: 6px; font-size: .85rem; line-height: 1.5; }
.rs-cc__facts > div { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 10px; }
.rs-cc__facts dt { color: var(--_muted); }
.rs-cc__facts dd { margin: 0; color: var(--_soft); overflow-wrap: anywhere; }
.rs-cc__cookies { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; }
.rs-cc__cookies code { font-size: .92em; padding: 0 .35em; border-radius: 4px; background: color-mix(in srgb, var(--_fg) 8%, transparent); }
@media (max-width: 559px) {
	.rs-cc__catdesc, .rs-cc__more, .rs-cc__services { margin-left: 0; }
	.rs-cc__facts > div { grid-template-columns: 1fr; gap: 0; }
}

/* Schalter (input[role=switch]) */
.rs-cc__switch {
	appearance: none; -webkit-appearance: none; position: relative; flex: none; margin: 0; cursor: pointer;
	width: 44px; height: 26px; border-radius: var(--rs-r-pill); background: var(--_switch); border: 1px solid var(--_line);
	transition: background-color var(--rs-dur-fast), border-color var(--rs-dur-fast);
}
.rs-cc__switch::before { content: ""; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgb(0 0 0 / .25); transition: transform .3s var(--rs-ease-out); }
.rs-cc__switch:checked { background: var(--_fg); border-color: var(--_fg); }
.rs-cc__switch:checked::before { transform: translateX(18px); background: var(--_bg); }
.rs-cc__switch:disabled { cursor: not-allowed; opacity: .55; }
.rs-cc__switch.is-partial { background: color-mix(in srgb, var(--_fg) 45%, var(--_switch)); }
.rs-cc__switch--sm { width: 38px; height: 22px; }
.rs-cc__switch--sm::before { width: 16px; height: 16px; }
.rs-cc__switch--sm:checked::before { transform: translateX(16px); }
@media (forced-colors: active) { .rs-cc__switch { border: 1px solid CanvasText; } .rs-cc__switch:checked { background: Highlight; } }

/* ===================================================================== Wieder öffnen */
.rs-cc-reopen {
	position: fixed; bottom: calc(var(--rs-tabbar-space, 0px) + 16px); z-index: 99980; display: inline-grid; place-items: center; width: 46px; height: 46px;
	border-radius: 50%; border: 1px solid var(--rs-c-line); background: var(--rs-c-paper); color: var(--rs-c-ink);
	box-shadow: var(--rs-shadow-1); cursor: pointer; transition: background-color var(--rs-dur-fast), color var(--rs-dur-fast);
}
.rs-cc-reopen[hidden] { display: none; }
/* Smartphone: kleiner und zurückhaltender, damit es keinen Text verdeckt (bleibt per Tastatur/Touch voll erreichbar). */
@media (max-width: 767px) {
	.rs-cc-reopen { width: 36px; height: 36px; opacity: .78; box-shadow: none; bottom: calc(var(--rs-tabbar-space, 0px) + 10px); }
	.rs-cc-reopen--left { left: 10px; } .rs-cc-reopen--right { right: 10px; }
	.rs-cc-reopen .rs-icon { width: 18px; height: 18px; }
	.rs-cc-reopen:hover, .rs-cc-reopen:focus-visible { opacity: 1; }
}
.rs-cc-reopen--left { left: 16px; } .rs-cc-reopen--right { right: 16px; }
.rs-cc-reopen:hover { background: var(--rs-c-ink); color: var(--rs-c-paper); }
.rs-cc-reopen .rs-icon { width: 22px; height: 22px; }
body:has(.rs-a11y-trigger--float-left) .rs-cc-reopen--left, body:has(.rs-a11y-trigger--float-right) .rs-cc-reopen--right { bottom: calc(var(--rs-tabbar-space, 0px) + 78px); }
button.rs-cc-link:not(.rs-link) { padding: 0; border: 0; background: none; font: inherit; color: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: .2em; }

html.rs-cc-lock { overflow: hidden; scrollbar-gutter: stable; }

/* ===================================================================== Platzhalter */
.rs-consent-placeholder {
	display: grid; place-items: center; width: 100%; aspect-ratio: var(--rs-cp-ratio, 16 / 9);
	padding: clamp(18px, 3vw, 40px); border-radius: var(--rs-r-leaf);
	background: color-mix(in srgb, var(--rs-c-stone) 62%, var(--rs-c-paper)); color: var(--rs-c-ink);
	font-family: var(--rs-f-ui); text-align: left; box-sizing: border-box; max-width: 100%;
}
.rs-consent-placeholder *, .rs-consent-placeholder *::before, .rs-consent-placeholder *::after { box-sizing: border-box; }
.rs-consent-placeholder--compact { aspect-ratio: auto; padding: 18px 20px; place-items: start; }
.rs-consent-placeholder__inner { display: grid; gap: 12px; max-width: 60ch; }
.rs-consent-placeholder__title { display: flex; align-items: center; gap: .5em; font: 400 clamp(1.05rem, 1rem + .3vw, 1.25rem)/1.3 var(--rs-f-display); }
.rs-consent-placeholder__title .rs-icon { width: 1.2em; height: 1.2em; color: var(--rs-area); flex: none; }
.rs-consent-placeholder__text { display: block; font-size: .875rem; line-height: 1.55; color: var(--rs-c-ink-soft); }
.rs-consent-placeholder__provider { display: block; margin-top: .35em; color: var(--rs-c-muted); }
.rs-consent-placeholder__link { color: inherit; text-decoration: underline; text-underline-offset: .2em; }
.rs-consent-placeholder__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.rs-consent-placeholder__btn {
	min-height: 44px; padding: .6em 1.3em; border: 1px solid var(--rs-c-ink); border-radius: var(--rs-r-pill);
	background: var(--rs-c-ink); color: var(--rs-c-paper); font: 550 .925rem/1.2 var(--rs-f-ui); cursor: pointer;
	transition: background-color var(--rs-dur-fast), border-color var(--rs-dur-fast);
}
.rs-consent-placeholder__btn:hover, .rs-consent-placeholder__btn:focus-visible { background: var(--rs-area); border-color: var(--rs-area); color: #fff; }
.rs-consent-placeholder__btn:focus-visible, .rs-consent-placeholder__always input:focus-visible { outline: 2px solid var(--rs-c-focus); outline-offset: 3px; }
.rs-consent-placeholder__always { display: inline-flex; align-items: center; gap: 8px; font-size: .875rem; cursor: pointer; }
.rs-consent-placeholder__always input { width: 18px; height: 18px; margin: 0; accent-color: var(--rs-c-ink); }
@media (max-width: 479px) { .rs-consent-placeholder { aspect-ratio: auto; } }
.rs-consent-frame { position: relative; width: 100%; aspect-ratio: var(--rs-cp-ratio, 16 / 9); }
.rs-consent-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ===================================================================== Cookie-Richtlinie */
.rs-cookie-policy { --rs-cp-gap: clamp(32px, 4vw, 56px); --rs-cp-line: var(--rs-c-line); display: grid; gap: var(--rs-cp-gap); }
.rs-cookie-policy__cat { display: grid; gap: 12px; min-width: 0; }
.rs-cookie-policy__title { margin: 0; font: var(--rs-fw-heading) var(--rs-fs-h4)/1.2 var(--rs-f-display); letter-spacing: var(--rs-ls-heading); }
.rs-cookie-policy__desc, .rs-cookie-policy__empty { margin: 0; max-width: var(--rs-measure); color: var(--rs-c-ink-soft); line-height: var(--rs-lh-body); }
.rs-cookie-policy__table { width: 100%; border-collapse: collapse; font-size: .925rem; line-height: 1.5; }
.rs-cookie-policy__table th, .rs-cookie-policy__table td { padding: 12px 14px 12px 0; text-align: left; vertical-align: top; border-bottom: 1px solid var(--rs-cp-line); overflow-wrap: anywhere; }
.rs-cookie-policy__table thead th { font: 600 .8rem/1.3 var(--rs-f-ui); color: var(--rs-c-muted); border-bottom-color: var(--rs-c-ink); }
.rs-cookie-policy__table tbody th { font-weight: 600; min-width: 9em; }
.rs-cookie-policy__table small { color: var(--rs-c-muted); }
.rs-cookie-policy__cookies { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.rs-cookie-policy__cookies code { font-size: .9em; padding: 0 .35em; border-radius: 4px; background: color-mix(in srgb, var(--rs-c-ink) 7%, transparent); }
.rs-cookie-policy__cookies span { color: var(--rs-c-muted); }
.rs-cookie-policy__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px; }
.rs-cookie-policy__meta { margin: 0; font-size: .875rem; color: var(--rs-c-muted); }
@media (max-width: 767px) {
	.rs-cookie-policy__table, .rs-cookie-policy__table tbody, .rs-cookie-policy__table tr, .rs-cookie-policy__table th, .rs-cookie-policy__table td { display: block; width: 100%; }
	.rs-cookie-policy__table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
	.rs-cookie-policy__table tr { padding: 14px 16px; margin-bottom: 12px; border: 1px solid var(--rs-cp-line); border-radius: var(--rs-r-m); }
	.rs-cookie-policy__table th, .rs-cookie-policy__table td { border: 0; padding: 4px 0; }
	.rs-cookie-policy__table tbody th { font-size: 1.05rem; padding-bottom: 8px; }
	.rs-cookie-policy__table td { display: grid; grid-template-columns: 7.5em minmax(0, 1fr); gap: 10px; }
	.rs-cookie-policy__table td::before { content: attr(data-label); font-size: .8rem; color: var(--rs-c-muted); }
}

/* ===================================================================== Bewegung reduzieren */
@media (prefers-reduced-motion: reduce) {
	.rs-cc__banner, .rs-cc__dialog, .rs-cc__switch, .rs-cc__switch::before, .rs-cc__more .rs-icon, .rs-cc__btn { transition: none; transform: none; }
}
html.rs-a11y-no-motion .rs-cc__banner, html.rs-a11y-no-motion .rs-cc__dialog { transition: none; transform: none; }

@media print { .rs-cc, .rs-cc-reopen { display: none !important; } }
