/* ==========================================================================
   LB Schnellzugriff – Frontend
   Farben: Waldgrün #407336 · Lichtgrün #EAF3DE · Fokus #3D4F89
   Hinweis: !important sichert gegen globale Elementor-Typografie und Link-Stile ab.
   ========================================================================== */

.lb-sz {
	--lb-sz-gruen: #407336;
	--lb-sz-gruen-dunkel: #2F5628;
	--lb-sz-licht: #EAF3DE;
	--lb-sz-fokus: #3D4F89;
	--lb-sz-rand: #4F7A1A; /* barrierefreier Akzent, 5,1 : 1 auf Weiß */
	--lb-sz-abstand: clamp(0.625rem, 1.2vw, 1rem);

	container-type: inline-size;
	container-name: lbsz;
	display: block;
	width: 100%;
	margin: 0;
	font-family: "Quicksand", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif !important;
}

.lb-sz *,
.lb-sz *::before,
.lb-sz *::after {
	box-sizing: border-box;
}

/* Überschrift (optional, per titel="…") --------------------------------- */
.lb-sz .lb-sz__titel {
	margin: 0 0 1rem !important;
	font-family: inherit !important;
	font-size: clamp(1.35rem, 1.1rem + 1vw, 1.75rem) !important;
	font-weight: 700 !important;
	line-height: 1.25 !important;
	color: var(--lb-sz-gruen-dunkel) !important;
	text-align: center;
}

/* Raster ---------------------------------------------------------------
   Flexbox statt Grid, damit eine unvollständige letzte Reihe mittig sitzt.
   --n = Kacheln pro Reihe, wird unten je nach verfügbarer Breite reduziert. */
.lb-sz .lb-sz__liste {
	--n: var(--lb-sz-spalten, 7);
	display: flex !important;
	flex-wrap: wrap;
	justify-content: center;
	gap: var(--lb-sz-abstand);
	margin: 0 !important;
	padding: 0 !important;
	list-style: none !important;
}

.lb-sz .lb-sz__eintrag {
	flex: 0 0 calc((100% - (var(--n) - 1) * var(--lb-sz-abstand)) / var(--n));
	display: flex;
	min-width: 0;
	margin: 0 !important;
	padding: 0 !important;
	list-style: none !important;
}

.lb-sz .lb-sz__eintrag::before,
.lb-sz .lb-sz__eintrag::marker {
	content: none !important;
}

/* Die Breite des umgebenden Elementor-Containers entscheidet, nicht die Bildschirmbreite. */
@container lbsz (max-width: 62rem) {
	.lb-sz .lb-sz__liste { --n: min(var(--lb-sz-spalten, 7), 4); }
}
@container lbsz (max-width: 44rem) {
	.lb-sz .lb-sz__liste { --n: min(var(--lb-sz-spalten, 7), 3); }
}
@container lbsz (max-width: 30rem) {
	.lb-sz .lb-sz__liste { --n: min(var(--lb-sz-spalten, 7), 2); }
}
@container lbsz (max-width: 16rem) {
	.lb-sz .lb-sz__liste { --n: 1; }
}

/* Kachel -------------------------------------------------------------- */
.lb-sz .lb-sz__kachel {
	position: relative;
	display: flex !important;
	flex-direction: column;
	align-items: center;
	justify-content: flex-start;
	gap: 0.75rem;
	width: 100%;
	min-height: 8.25rem;
	padding: 1.25rem 0.5rem 1.1rem !important;
	border: 2px solid var(--lb-sz-rand);
	border-radius: 1.125rem;
	background: var(--lb-sz-licht);
	color: var(--lb-sz-gruen-dunkel) !important;
	text-align: center;
	text-decoration: none !important;
	box-shadow: none !important;
	transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
	-webkit-tap-highlight-color: transparent;
}

.lb-sz .lb-sz__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: 3.5rem;
	height: 3.5rem;
	border-radius: 50%;
	background: var(--lb-sz-gruen);
	color: #fff;
	transition: background-color 0.18s ease, color 0.18s ease;
}

.lb-sz .lb-sz__icon svg {
	display: block;
	width: 1.6rem !important;
	height: 1.6rem !important;
	max-width: none;
}

.lb-sz .lb-sz__text {
	display: block;
	max-width: 100%;
	font-family: inherit !important;
	font-size: 1rem !important;
	font-weight: 700 !important;
	line-height: 1.25 !important;
	letter-spacing: 0 !important;
	text-transform: none !important;
	color: inherit !important;
	overflow-wrap: normal;
	word-break: normal;
	-webkit-hyphens: auto;
	hyphens: auto;
}

.lb-sz .lb-sz__extern {
	display: inline-block;
	width: 0.8em !important;
	height: 0.8em !important;
	margin-left: 0.2em;
	vertical-align: 0.05em;
}

/* Maus & Tastatur ----------------------------------------------------- */
.lb-sz a.lb-sz__kachel:hover {
	background: var(--lb-sz-gruen);
	border-color: var(--lb-sz-gruen);
	color: #fff !important;
}
.lb-sz a.lb-sz__kachel:hover .lb-sz__icon {
	background: #fff;
	color: var(--lb-sz-gruen);
}

.lb-sz a.lb-sz__kachel:focus {
	outline: none;
}
/* Doppelter Fokusring (innen weiß, außen blau): gut sichtbar auf jedem Hintergrund.
   Der transparente Outline-Rand wird im Windows-Kontrastmodus sichtbar. */
.lb-sz a.lb-sz__kachel:focus-visible {
	outline: 3px solid transparent !important;
	outline-offset: 2px;
	box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--lb-sz-fokus) !important;
	background: var(--lb-sz-gruen);
	border-color: var(--lb-sz-gruen);
	color: #fff !important;
}
.lb-sz a.lb-sz__kachel:focus-visible .lb-sz__icon {
	background: #fff;
	color: var(--lb-sz-gruen);
}

.lb-sz a.lb-sz__kachel:active {
	background: var(--lb-sz-gruen-dunkel);
}

/* Variante für grüne oder dunkle Hintergründe: stil="dunkel" ---------- */
.lb-sz--dunkel .lb-sz__titel {
	color: #fff !important;
}
.lb-sz--dunkel .lb-sz__kachel {
	background: rgba(255, 255, 255, 0.08);
	border-color: rgba(255, 255, 255, 0.8); /* 4,3 : 1 auf Waldgrün */
	color: #fff !important;
}
.lb-sz--dunkel .lb-sz__icon {
	background: #fff;
	color: var(--lb-sz-gruen);
}
.lb-sz--dunkel a.lb-sz__kachel:hover,
.lb-sz--dunkel a.lb-sz__kachel:focus-visible {
	background: #fff;
	border-color: #fff;
	color: var(--lb-sz-gruen-dunkel) !important;
}
.lb-sz--dunkel a.lb-sz__kachel:hover .lb-sz__icon,
.lb-sz--dunkel a.lb-sz__kachel:focus-visible .lb-sz__icon {
	background: var(--lb-sz-gruen);
	color: #fff;
}
.lb-sz--dunkel a.lb-sz__kachel:focus-visible {
	box-shadow: 0 0 0 3px var(--lb-sz-gruen-dunkel), 0 0 0 6px #fff !important;
}

/* Nur für angemeldete Redakteure sichtbar ------------------------------ */
.lb-sz .lb-sz__kachel--leer {
	border: 2px dashed #b3261e;
	background: #fff;
	opacity: 0.85;
}
.lb-sz .lb-sz__fehlt {
	font-size: 0.8rem;
	font-weight: 700;
	color: #b3261e;
}
.lb-sz-hinweis {
	padding: 0.75rem 1rem;
	border: 2px dashed #b3261e;
	border-radius: 0.5rem;
	color: #b3261e;
}

/* Nur für Screenreader ------------------------------------------------ */
.lb-sz .lb-sz__sr {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	margin: -1px !important;
	padding: 0 !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	white-space: nowrap !important;
	border: 0 !important;
}

/* Windows-Kontrastmodus ----------------------------------------------- */
@media (forced-colors: active) {
	.lb-sz .lb-sz__kachel { border-color: LinkText; }
	.lb-sz .lb-sz__icon { border: 2px solid currentColor; }
}

@media (prefers-reduced-motion: reduce) {
	.lb-sz .lb-sz__kachel,
	.lb-sz .lb-sz__icon { transition: none; }
}
