/* LJ Consent – Frontend */
:root {
	--ljc-bg: #fff;
	--ljc-text: #1d2327;
	--ljc-primary: #1e5aa8;
	--ljc-primary-text: #fff;
	--ljc-radius: 8px;
	--ljc-muted: color-mix(in srgb, var(--ljc-text) 62%, var(--ljc-bg));
	--ljc-line: color-mix(in srgb, var(--ljc-text) 14%, var(--ljc-bg));
	--ljc-soft: color-mix(in srgb, var(--ljc-text) 5%, var(--ljc-bg));
}

.ljc[hidden],
.ljc [hidden] { display: none !important; }

.ljc {
	position: fixed;
	inset: 0;
	z-index: 999999;
	pointer-events: none;
	font-size: 15px;
	line-height: 1.5;
	color: var(--ljc-text);
}
.ljc *, .ljc *::before, .ljc *::after { box-sizing: border-box; }

.ljc-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, .45);
	opacity: 0;
	transition: opacity .2s ease;
}
.ljc-pos-center .ljc-backdrop,
.ljc-is-details .ljc-backdrop { opacity: 1; pointer-events: auto; }

.ljc-panel {
	position: absolute;
	pointer-events: auto;
	background: var(--ljc-bg);
	color: var(--ljc-text);
	border-radius: var(--ljc-radius);
	box-shadow: 0 10px 40px rgba(0, 0, 0, .25);
	padding: 24px;
	width: calc(100% - 32px);
	max-width: 480px;
	max-height: calc(100vh - 32px);
	max-height: calc(100dvh - 32px);
	overflow-y: auto;
	overscroll-behavior: contain;
	animation: ljc-in .25s ease-out;
}

.ljc-pos-bottom-left .ljc-panel { left: 16px; bottom: 16px; }
.ljc-pos-bottom-right .ljc-panel { right: 16px; bottom: 16px; }
.ljc-pos-bar .ljc-panel { left: 0; right: 0; bottom: 0; width: 100%; max-width: none; border-radius: 0; }
.ljc-pos-bar:not(.ljc-is-details) .ljc-view[data-ljc-view="main"] { max-width: 1100px; margin: 0 auto; }

.ljc-pos-center .ljc-panel,
.ljc-is-details .ljc-panel {
	left: 50%;
	top: 50%;
	right: auto;
	bottom: auto;
	transform: translate(-50%, -50%);
	max-width: 720px;
	border-radius: var(--ljc-radius);
}
.ljc-pos-center:not(.ljc-is-details) .ljc-panel { max-width: 560px; }

@keyframes ljc-in {
	from { opacity: 0; translate: 0 12px; }
	to { opacity: 1; translate: 0 0; }
}
@media (prefers-reduced-motion: reduce) {
	.ljc-panel { animation: none; }
	.ljc-backdrop { transition: none; }
}

/* Überschriften gegen Theme-/Page-Builder-Styles absichern (z. B. Divi, Elementor, Breakdance). */
#ljc-box h2.ljc-title,
#ljc-box .ljc-group-head h3 {
	margin: 0 0 8px;
	padding: 0;
	border: 0;
	background: none;
	font-family: inherit;
	font-size: 1.25em;
	font-weight: 600;
	font-style: normal;
	line-height: 1.3;
	letter-spacing: normal;
	text-transform: none;
	text-align: left;
	color: inherit;
	max-width: none;
}
#ljc-box .ljc-group-head h3 { margin: 0; font-size: 1em; }
#ljc-box h2.ljc-title::before, #ljc-box h2.ljc-title::after,
#ljc-box .ljc-group-head h3::before, #ljc-box .ljc-group-head h3::after { content: none; display: none; }
.ljc-title:focus { outline: none; }
.ljc-desc { font-size: .9em; color: var(--ljc-muted); }
.ljc-desc p { margin: 0 0 .6em; }
.ljc a { color: var(--ljc-primary); text-decoration: underline; }

.ljc-quick {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 6px 18px;
	margin: 12px 0 4px;
	padding: 0;
}
.ljc-quick label { display: inline-flex; gap: 6px; align-items: center; cursor: pointer; font-size: .92em; }
.ljc-quick input,
.ljc-service-toggle input { width: 18px; height: 18px; margin: 0; accent-color: var(--ljc-primary); }

.ljc-actions {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin: 16px 0 8px;
}
.ljc-is-details .ljc-actions,
.ljc-pos-bar .ljc-actions { flex-direction: row; flex-wrap: wrap; }
.ljc-is-details .ljc-actions .ljc-btn,
.ljc-pos-bar .ljc-actions .ljc-btn { flex: 1 1 180px; }

.ljc-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 10px 18px;
	border: 1px solid var(--ljc-primary);
	border-radius: calc(var(--ljc-radius) * .75);
	background: transparent;
	color: var(--ljc-primary);
	font: inherit;
	font-weight: 600;
	line-height: 1.2;
	text-align: center;
	cursor: pointer;
	transition: background-color .15s, color .15s;
}
.ljc-btn:hover { background: var(--ljc-soft); }
.ljc-btn-primary { background: var(--ljc-primary); color: var(--ljc-primary-text); }
.ljc-btn-primary:hover { background: color-mix(in srgb, var(--ljc-primary) 86%, #000); }
.ljc-btn:focus-visible,
.ljc-link:focus-visible,
.ljc summary:focus-visible,
.ljc input:focus-visible + .ljc-slider { outline: 2px solid var(--ljc-primary); outline-offset: 2px; }

.ljc-link {
	background: none;
	border: 0;
	padding: 4px 0;
	color: var(--ljc-primary);
	font: inherit;
	font-size: .9em;
	text-decoration: underline;
	cursor: pointer;
}
.ljc-more { margin: 4px 0; text-align: center; }
.ljc-legal { margin: 8px 0 0; font-size: .8em; text-align: center; color: var(--ljc-muted); }

/* Details */
.ljc-groups { display: grid; gap: 12px; margin-top: 12px; }
.ljc-group { border: 1px solid var(--ljc-line); border-radius: var(--ljc-radius); padding: 14px 16px; }
.ljc-group-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ljc-count { color: var(--ljc-muted); font-weight: 400; }
.ljc-group-desc { margin: 6px 0 8px; font-size: .88em; color: var(--ljc-muted); }

.ljc-switch { position: relative; display: inline-block; width: 44px; height: 24px; flex: none; cursor: pointer; }
.ljc-switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: inherit; }
.ljc-slider {
	position: absolute;
	inset: 0;
	border-radius: 24px;
	background: var(--ljc-line);
	transition: background-color .15s;
}
.ljc-slider::before {
	content: "";
	position: absolute;
	left: 3px;
	top: 3px;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 1px 3px rgba(0, 0, 0, .3);
	transition: transform .15s;
}
.ljc-switch input:checked + .ljc-slider { background: var(--ljc-primary); }
.ljc-switch input:checked + .ljc-slider::before { transform: translateX(20px); }
.ljc-switch input:indeterminate + .ljc-slider { background: color-mix(in srgb, var(--ljc-primary) 50%, var(--ljc-line)); }
.ljc-switch input:indeterminate + .ljc-slider::before { transform: translateX(10px); }
.ljc-switch input:disabled { cursor: not-allowed; }
.ljc-switch input:disabled + .ljc-slider { opacity: .55; }

.ljc-services summary { cursor: pointer; font-size: .88em; color: var(--ljc-primary); padding: 4px 0; }
.ljc-service { margin-top: 10px; padding: 10px 12px; background: var(--ljc-soft); border-radius: calc(var(--ljc-radius) * .75); font-size: .86em; }
.ljc-service-toggle { display: flex; gap: 8px; align-items: center; cursor: pointer; }
.ljc-service dl {
	margin: 8px 0 0;
	display: grid;
	/* Bezeichnungsspalte so breit wie die längste Bezeichnung – keine Überlappung bei langen Wörtern. */
	grid-template-columns: max-content minmax(0, 1fr);
	gap: 4px 16px;
}
.ljc-service dl > div { display: contents; }
.ljc-service dt { font-weight: 600; margin: 0; }
.ljc-service dd { margin: 0; overflow-wrap: anywhere; }

@media (max-width: 520px) {
	.ljc-panel { padding: 18px 16px; }
	/* Auf dem Handy immer als Karte unten über die volle Breite – auch Detailansicht und Modal.
	   transform zurücksetzen, sonst verschiebt die Zentrierung die Box aus dem Bild. */
	.ljc .ljc-panel {
		left: 8px;
		right: 8px;
		top: auto;
		bottom: 8px;
		width: auto;
		max-width: none;
		transform: none;
		max-height: calc(100vh - 16px);
		max-height: calc(100dvh - 16px);
	}
	.ljc-pos-bar:not(.ljc-is-details) .ljc-panel { left: 0; right: 0; bottom: 0; border-radius: 0; }
	.ljc-service dl { grid-template-columns: minmax(0, 1fr); gap: 0; }
	.ljc-service dd { margin-bottom: 6px; }
}

/* Content Blocker */
.ljc-blocked {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 220px;
	/* Hat der Container eine feste Höhe (Page-Builder), diese übernehmen – sonst 16:9. */
	height: 100%;
	aspect-ratio: 16 / 9;
	max-width: 100%;
	margin: 0 0 1.5em;
	padding: 24px;
	background: #1d2327;
	color: #fff;
	border-radius: var(--ljc-radius);
	text-align: center;
	font-size: 15px;
	line-height: 1.5;
}
/* Container, die das Seitenverhältnis per ::before-Padding halten und das Video absolut darüberlegen
   (Breakdance-Video, WordPress-Embed-Block): Platzhalter ebenfalls darüberlegen. */
.ee-video-container > .ljc-blocked,
.wp-has-aspect-ratio .wp-block-embed__wrapper > .ljc-blocked {
	position: absolute;
	inset: 0;
	height: auto;
	min-height: 0;
	aspect-ratio: auto;
	margin: 0;
}
.ljc-ph { max-width: 520px; }
.ljc-ph-text { margin: 0 0 14px; overflow-wrap: anywhere; }
@media (max-width: 520px) {
	.ljc-blocked { aspect-ratio: auto; padding: 20px 16px; font-size: 14px; }
}
.ljc-ph-text a { color: inherit; }
.ljc-ph .ljc-btn-primary { border-color: var(--ljc-primary); }
.ljc-ph-always { display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 12px; font-size: .88em; cursor: pointer; }
.ljc-ph-always input { width: 16px; height: 16px; margin: 0; }

/* Shortcode-Tabelle */
.ljc-table-wrap { overflow-x: auto; }
.ljc-table { width: 100%; border-collapse: collapse; font-size: .92em; }
.ljc-table th, .ljc-table td { padding: 8px 10px; border: 1px solid #ddd; text-align: left; vertical-align: top; }
.ljc-open-btn { color: var(--ljc-primary-text); }

/* Hinweis in Formularen mit gesperrtem Captcha */
.ljc-captcha {
	margin: 0 0 16px;
	padding: 14px 16px;
	border: 1px solid rgba(0, 0, 0, .15);
	border-left: 4px solid var(--ljc-primary, #1e5aa8);
	border-radius: var(--ljc-radius, 8px);
	background: rgba(0, 0, 0, .03);
	font-size: 14px;
	line-height: 1.5;
}
.ljc-captcha-text { margin: 0 0 10px; overflow-wrap: anywhere; }
.ljc-captcha-text a { color: inherit; }
.ljc-captcha .ljc-btn { border-color: var(--ljc-primary, #1e5aa8); }
.ljc-captcha-alert { animation: ljc-shake .4s ease; border-color: #d63638; }
@keyframes ljc-shake { 0%, 100% { transform: none; } 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
@media (prefers-reduced-motion: reduce) { .ljc-captcha-alert { animation: none; } }
