/* Luy Consent – Cookie-Leiste & Präferenz-Center. Farben/Maße kommen als CSS-Variablen aus dem Backend. */
#luy-consent {
	--luyc-bg: #fff; --luyc-text: #000; --luyc-link: #000; --luyc-border: #ddd;
	--luyc-primary-bg: #000; --luyc-primary-text: #fff;
	--luyc-sec-bg: #fff; --luyc-sec-text: #000; --luyc-sec-bd: #000;
	--luyc-nav-bg: #f2f2f2; --luyc-nav-text: #333; --luyc-nav-active: #fff;
	--luyc-indicator: #000; --luyc-accent: #1a73e8;
	--luyc-toggle-on: #000; --luyc-toggle-off: #757575; --luyc-always: #3b5bdb;
	--luyc-overlay: rgba(0,0,0,.4); --luyc-font: inherit; --luyc-fs: 15px;
	--luyc-btn-h: 50px; --luyc-btn-r: 0; --luyc-btn-ls: .5px; --luyc-btn-tt: uppercase; --luyc-h-tt: uppercase;
	--luyc-modal-w: 920px; --luyc-modal-h: 760px; --luyc-modal-r: 0; --luyc-banner-w: 100%; --luyc-logo-w: 120px;
	font-family: var(--luyc-font);
	font-size: var(--luyc-fs);
	line-height: 1.5;
	color: var(--luyc-text);
}
#luy-consent *, #luy-consent *::before, #luy-consent *::after { box-sizing: border-box; }
#luy-consent [hidden] { display: none !important; }

/* ---------- Buttons ---------- */
#luy-consent .luyc-btn {
	display: inline-flex; align-items: center; justify-content: center;
	min-height: var(--luyc-btn-h); padding: 8px 22px; margin: 0;
	font: inherit; font-size: .95em; font-weight: 400; line-height: 1.2;
	text-transform: var(--luyc-btn-tt); letter-spacing: var(--luyc-btn-ls); text-align: center;
	border: 1px solid var(--luyc-primary-bg); border-radius: var(--luyc-btn-r);
	background: var(--luyc-primary-bg); color: var(--luyc-primary-text);
	cursor: pointer; box-shadow: none; text-decoration: none; white-space: normal;
	transition: opacity .15s ease;
}
#luy-consent .luyc-btn:hover { opacity: .85; }
#luy-consent .luyc-btn--secondary { background: var(--luyc-sec-bg); color: var(--luyc-sec-text); border-color: var(--luyc-sec-bd); }
#luy-consent .luyc-btn:focus-visible,
#luy-consent .luyc-nav__item:focus-visible,
#luy-consent .luyc-link:focus-visible,
#luy-consent summary:focus-visible,
#luy-consent .luyc-close:focus-visible,
#luy-consent .luyc-fab:focus-visible { outline: 2px solid var(--luyc-accent); outline-offset: 2px; }
#luy-consent .luyc-link { color: var(--luyc-link); text-decoration: underline; text-underline-offset: 2px; }
#luy-consent .luyc-link--strong { font-weight: 600; text-decoration: none; }
#luy-consent .luyc-link--strong:hover { text-decoration: underline; }

/* ---------- Overlay ---------- */
#luy-consent .luyc-overlay { position: fixed; inset: 0; background: var(--luyc-overlay); z-index: 2147483000; }

/* ---------- Banner ---------- */
#luy-consent .luyc-banner {
	position: fixed; left: 0; right: 0; bottom: 0; z-index: 2147483001;
	display: flex; justify-content: center;
	background: var(--luyc-bg); color: var(--luyc-text);
	box-shadow: 0 -2px 16px rgba(0,0,0,.08);
}
#luy-consent.luyc--banner-top .luyc-banner { top: 0; bottom: auto; box-shadow: 0 2px 16px rgba(0,0,0,.08); }
#luy-consent.luyc--banner-line .luyc-banner { border-top: 1px solid var(--luyc-border); }
#luy-consent.luyc--banner-top.luyc--banner-line .luyc-banner { border-top: 0; border-bottom: 1px solid var(--luyc-border); }
#luy-consent .luyc-banner__inner {
	width: 100%; max-width: var(--luyc-banner-w);
	display: flex; align-items: center; gap: 24px 40px;
	padding: 28px 30px;
}
#luy-consent .luyc-banner__text { flex: 1 1 auto; font-size: .97em; max-width: 960px; }
#luy-consent .luyc-banner__text p { margin: 0 0 .5em; }
#luy-consent .luyc-banner__text p:last-child { margin-bottom: 0; }
#luy-consent .luyc-banner__actions { flex: 0 0 auto; display: flex; gap: 12px; align-items: center; }
#luy-consent .luyc-banner__actions .luyc-btn { min-height: calc(var(--luyc-btn-h) - 4px); }
#luy-consent.luyc--banner-stacked .luyc-banner__inner { flex-direction: column; align-items: stretch; }
#luy-consent.luyc--banner-stacked .luyc-banner__text { max-width: none; }
#luy-consent.luyc--banner-stacked .luyc-banner__actions { justify-content: flex-end; flex-wrap: wrap; }

/* ---------- Modal / Präferenz-Center ---------- */
#luy-consent .luyc-modal {
	position: fixed; inset: 0; z-index: 2147483002;
	display: flex; align-items: center; justify-content: center;
	padding: 16px; background: var(--luyc-overlay);
}
#luy-consent .luyc-modal__box {
	width: 100%; max-width: var(--luyc-modal-w);
	height: var(--luyc-modal-h); max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px);
	display: flex; flex-direction: column; overflow: hidden;
	background: var(--luyc-bg); color: var(--luyc-text);
	border-radius: var(--luyc-modal-r); box-shadow: 0 10px 40px rgba(0,0,0,.25);
	outline: none;
}
#luy-consent .luyc-modal__head {
	position: relative; flex: 0 0 auto;
	padding: 28px 36px 20px; border-bottom: 1px solid var(--luyc-border);
}
#luy-consent .luyc-logo { display: block; width: var(--luyc-logo-w); max-width: 60%; height: auto; margin: 0 0 26px; }
#luy-consent .luyc-logo--text { width: auto; font-size: 2em; font-weight: 600; letter-spacing: .04em; line-height: 1; text-transform: var(--luyc-h-tt); }
#luy-consent .luyc-modal__title {
	margin: 0; padding: 0; font: inherit; font-size: 1.2em; font-weight: 400; line-height: 1.3;
	letter-spacing: .03em; text-transform: var(--luyc-h-tt); color: inherit;
}
#luy-consent .luyc-close {
	position: absolute; top: 18px; right: 18px; width: 40px; height: 40px;
	display: flex; align-items: center; justify-content: center;
	background: transparent; border: 0; color: inherit; cursor: pointer; padding: 0;
}
#luy-consent .luyc-nav { position: relative; }
#luy-consent .luyc-modal__body {
	flex: 1 1 auto; min-height: 0;
	display: grid; grid-template-columns: minmax(200px, 30%) 1fr;
}

/* Navigation links */
#luy-consent .luyc-nav { background: var(--luyc-nav-bg); overflow-y: auto; padding: 4px 0; align-self: start; max-height: 100%; }
#luy-consent .luyc-nav__item {
	position: relative; display: block; width: 100%;
	padding: 14px 18px 14px 28px; margin: 0;
	font: inherit; font-size: .95em; line-height: 1.45; text-align: left;
	text-transform: var(--luyc-h-tt); letter-spacing: .02em;
	color: var(--luyc-nav-text); background: var(--luyc-nav-bg);
	border: 0; border-bottom: 1px solid var(--luyc-border); border-radius: 0;
	cursor: pointer; box-shadow: none;
}
#luy-consent .luyc-nav__item:hover { background: var(--luyc-nav-active); }
#luy-consent .luyc-nav__item.is-active {
	background: var(--luyc-nav-active); color: var(--luyc-text);
	border-top: 1px solid var(--luyc-accent); border-bottom: 1px solid var(--luyc-accent);
	margin-top: -1px;
}
#luy-consent .luyc-nav__item.is-active::before {
	content: ""; position: absolute; left: 0; top: 4px; bottom: 4px; width: 8px; background: var(--luyc-indicator);
}

/* Panels rechts */
#luy-consent .luyc-panels { overflow-y: auto; padding: 32px 36px 28px 40px; min-height: 320px; }
#luy-consent .luyc-panel__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
#luy-consent .luyc-panel__title { margin: 0; padding: 0; font: inherit; font-size: 1.07em; font-weight: 700; line-height: 1.35; color: inherit; text-transform: none; letter-spacing: 0; }
#luy-consent .luyc-panel__desc { font-size: .97em; }
#luy-consent .luyc-panel__desc p { margin: 0 0 .9em; }
#luy-consent .luyc-always { color: var(--luyc-always); font-weight: 700; white-space: nowrap; font-size: .97em; }

/* Toggle */
#luy-consent .luyc-switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; flex: 0 0 auto; margin: 0; }
#luy-consent .luyc-switch__state { font-size: .95em; }
#luy-consent .luyc-switch__input { position: absolute; opacity: 0; width: 54px; height: 30px; right: 0; margin: 0; cursor: pointer; z-index: 1; }
#luy-consent .luyc-switch__track {
	position: relative; width: 54px; height: 30px; border-radius: 30px;
	background: var(--luyc-toggle-off); transition: background .2s ease;
}
#luy-consent .luyc-switch__knob {
	position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%;
	background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .2s ease;
}
#luy-consent .luyc-switch__input:checked + .luyc-switch__track { background: var(--luyc-toggle-on); }
#luy-consent .luyc-switch__input:checked + .luyc-switch__track .luyc-switch__knob { transform: translateX(24px); }
#luy-consent .luyc-switch__input:focus-visible + .luyc-switch__track { outline: 2px solid var(--luyc-accent); outline-offset: 2px; }

/* Cookie-Details */
#luy-consent .luyc-details { margin-top: 22px; }
#luy-consent .luyc-details summary { cursor: pointer; list-style: none; font-size: .97em; display: inline-flex; align-items: center; gap: 8px; }
#luy-consent .luyc-details summary::-webkit-details-marker { display: none; }
#luy-consent .luyc-details summary::after { content: ""; width: 6px; height: 6px; margin-top: -4px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); transition: transform .2s, margin .2s; }
#luy-consent .luyc-details[open] summary::after { transform: rotate(225deg); margin-top: 3px; }
#luy-consent .luyc-services { list-style: none; margin: 16px 0 0; padding: 0; }
#luy-consent .luyc-service { padding: 14px 16px; margin: 0 0 10px; background: var(--luyc-nav-bg); font-size: .9em; }
#luy-consent .luyc-service__name { display: block; margin-bottom: 6px; }
#luy-consent .luyc-service dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; margin: 0; }
#luy-consent .luyc-service dt { opacity: .7; margin: 0; }
#luy-consent .luyc-service dd { margin: 0; word-break: break-word; }
#luy-consent .luyc-service code { font-family: inherit; font-size: 1em; background: none; padding: 0; color: inherit; }
#luy-consent .luyc-empty { margin: 12px 0 0; opacity: .75; font-size: .92em; }

/* Footer-Buttons */
#luy-consent .luyc-modal__foot {
	flex: 0 0 auto; display: flex; flex-direction: column; gap: 10px;
	padding: 20px 36px 24px; border-top: 1px solid var(--luyc-border);
}
#luy-consent .luyc-modal__foot .luyc-btn { width: 100%; }
#luy-consent.luyc--btns-inline .luyc-modal__foot { flex-direction: row; }
#luy-consent.luyc--btns-inline .luyc-modal__foot .luyc-btn { flex: 1 1 0; }

/* Schwebender Button zum Widerruf */
#luy-consent .luyc-fab {
	position: fixed; bottom: 18px; z-index: 2147482999;
	width: 44px; height: 44px; border-radius: 50%; padding: 0;
	display: flex; align-items: center; justify-content: center;
	background: var(--luyc-bg); color: var(--luyc-text);
	border: 1px solid var(--luyc-border); box-shadow: 0 2px 10px rgba(0,0,0,.15); cursor: pointer;
}
#luy-consent .luyc-fab--left { left: 18px; }
#luy-consent .luyc-fab--right { right: 18px; }

html.luyc-locked, html.luyc-locked body { overflow: hidden !important; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
	#luy-consent.luyc--banner-row .luyc-banner__inner { flex-direction: column; align-items: stretch; gap: 18px; }
	#luy-consent .luyc-banner__text { max-width: none; }
	#luy-consent .luyc-banner__actions { justify-content: flex-end; flex-wrap: wrap; }
}
@media (max-width: 720px) {
	#luy-consent { font-size: calc(var(--luyc-fs) - 1px); }
	#luy-consent .luyc-banner__inner { padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); }
	#luy-consent .luyc-banner__text { max-height: 38vh; overflow-y: auto; }
	#luy-consent .luyc-banner__actions { flex-direction: column; align-items: stretch; gap: 8px; }
	#luy-consent .luyc-banner__actions .luyc-btn { width: 100%; min-height: 46px; }

	#luy-consent .luyc-modal { padding: 0; align-items: stretch; }
	#luy-consent .luyc-modal__box { max-width: none; max-height: none; height: 100%; border-radius: 0; }
	#luy-consent .luyc-modal__box { height: 100dvh; }
	#luy-consent .luyc-modal__head { padding: 18px 16px 14px; }
	#luy-consent .luyc-logo { margin-bottom: 14px; max-width: 45%; }
	#luy-consent .luyc-logo--text { max-width: none; font-size: 1.6em; }
	#luy-consent .luyc-modal__body { display: flex; flex-direction: column; overflow: hidden; }
	#luy-consent .luyc-nav {
		display: flex; overflow-x: auto; overflow-y: hidden; padding: 0; flex: 0 0 auto;
		align-self: stretch; width: 100%; min-width: 0;
		max-height: none; scrollbar-width: none; -webkit-overflow-scrolling: touch;
	}
	#luy-consent .luyc-nav::-webkit-scrollbar { display: none; }
	#luy-consent .luyc-nav__item { flex: 0 0 auto; width: auto; max-width: 70vw; padding: 12px 16px; font-size: .82em; border-bottom: 2px solid transparent; border-right: 1px solid var(--luyc-border); white-space: normal; }
	#luy-consent .luyc-nav__item.is-active { border-top: 0; border-bottom: 2px solid var(--luyc-indicator); margin-top: 0; }
	#luy-consent .luyc-nav__item.is-active::before { display: none; }
	#luy-consent .luyc-panels { flex: 1 1 auto; padding: 20px 16px; min-height: 0; }
	#luy-consent .luyc-panel__head { margin-bottom: 14px; }
	#luy-consent .luyc-modal__foot { padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); gap: 8px; }
	#luy-consent.luyc--btns-inline .luyc-modal__foot { flex-direction: column; }
	#luy-consent .luyc-modal__foot .luyc-btn { min-height: 44px; }
	#luy-consent .luyc-service dl { grid-template-columns: 1fr; gap: 0; }
	#luy-consent .luyc-service dd { margin-bottom: 6px; }
}
@media (prefers-reduced-motion: reduce) {
	#luy-consent * { transition: none !important; }
}
@media print { #luy-consent { display: none !important; } }
