/* AH-BK · Overlays: Suche, Lightbox, Datenschutz-Einstellungen, Kollegium-Detail */
/* Suche */
.search-overlay { position: fixed; inset: 0; z-index: 1200; background: rgba(18, 30, 59, .97); color: #fff; display: grid; place-items: center; opacity: 0; visibility: hidden; pointer-events: none; transition: .2s }
.search-overlay.open { opacity: 1; visibility: visible; pointer-events: auto }
.search-close { position: absolute; right: 28px; top: 24px }
.search-box { width: min(880px, calc(100% - 48px)) }
.search-box h2 { font-size: clamp(2.6rem, 6vw, 5.6rem); line-height: .95; letter-spacing: -.06em; margin: 12px 0 34px }
.search-field { display: flex; align-items: center; gap: 12px; border-bottom: 2px solid rgba(255, 255, 255, .34) }
.search-field:focus-within { border-color: var(--accent) }
.search-field input { width: 100%; border: 0; background: none; color: #fff; outline: 0; padding: 15px 0 17px; font-size: clamp(1.05rem, 2vw, 1.55rem) }
.search-field input::placeholder { color: #6b7489 }
.search-field svg { width: 26px; height: 26px; color: var(--accent) }
.search-suggestions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 22px }
.search-suggestions > span { font-size: .76rem; text-transform: uppercase; letter-spacing: .12em; color: #a9b4cf; font-weight: 800; margin-right: 4px }
.search-suggestions a { border: 1px solid rgba(255, 255, 255, .18); border-radius: var(--r-pill); padding: 7px 12px; font-size: .8rem; color: #e7ebf7 }
.search-result { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 11px 0; border-bottom: 1px solid rgba(255, 255, 255, .14); font-size: .92rem }
.search-result small { opacity: .6; font-size: .76rem; white-space: nowrap }
.search-result:hover { color: var(--accent) }

/* Lightbox (Galerie) */
.lightbox { position: fixed; inset: 0; z-index: 3000; background: rgba(12, 18, 34, .92); display: none; align-items: center; justify-content: center }
.lightbox.open { display: flex }
.lightbox img { max-width: 92vw; max-height: 86vh; border-radius: var(--r-sm); box-shadow: 0 20px 60px rgba(0, 0, 0, .4) }
.lightbox button { position: absolute; width: 48px; height: 48px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .12); color: #fff; font-size: 1.5rem; cursor: pointer }
.lightbox button:hover { background: rgba(255, 255, 255, .25) }
.lb-close { top: 18px; right: 18px } .lb-prev { left: 18px } .lb-next { right: 18px }
.lb-count { position: absolute; bottom: 18px; left: 0; right: 0; text-align: center; color: #fff; font-size: .85rem; opacity: .8 }

/* Datenschutz-Einstellungen */
html.consent-open { overflow: hidden }
.consent { position: fixed; inset: 0; z-index: 4000; display: flex; align-items: center; justify-content: center; padding: 24px }
.consent[hidden] { display: none }
.consent-backdrop { position: absolute; inset: 0; background: rgba(14, 22, 45, .5); backdrop-filter: blur(3px) }
.consent-dialog { position: relative; width: min(600px, 100%); max-height: calc(100vh - 48px); max-height: calc(100dvh - 48px); overflow: auto; background: #fff; border-radius: var(--r-xl); box-shadow: var(--shadow-lg); outline: none; animation: einblenden .35s ease }
/* Kopf: dunkelblau mit Schließen-Knopf */
.consent-head { position: relative; padding: 30px 68px 26px 36px; border-bottom: 3px solid var(--accent); background: var(--primary-800); color: #fff }   /* orange Linie wie der Akzent unter Überschriften */
.consent-zu { position: absolute; top: 18px; right: 18px; display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .1); color: #fff; font-size: 1rem; cursor: pointer; transition: background var(--t-fast) }
.consent-zu:hover { background: rgba(255, 255, 255, .22) }
.consent-zu:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px }
.consent-head .kicker { margin-bottom: 10px }
.consent-head h2 { margin: 0 0 10px; font-size: 1.45rem; line-height: 1.2; letter-spacing: -.02em }
.consent-head p { margin: 0; font-size: .9rem; line-height: 1.6; color: rgba(255, 255, 255, .82) }
/* Kategorien: Liste mit Trennlinien (wie Linkzeilen), Schalter rechts, Details wie das Akkordeon */
.consent-body { padding: 8px 36px 0 }
.consent-cat { padding: 18px 0; border-bottom: 1px solid var(--line) }
.consent-cat-head { display: flex; align-items: center; justify-content: space-between; gap: 24px }
.consent-cat-head strong { display: block; font-size: .95rem; color: var(--primary-800) }
.consent-cat-head span { display: block; margin-top: 2px; font-size: .84rem; line-height: 1.45; color: var(--muted) }
.consent-cat details { margin-top: 10px }
.consent-cat summary { display: inline-flex; align-items: center; gap: 8px; list-style: none; cursor: pointer; font-size: .8rem; font-weight: 700; color: var(--primary) }
.consent-cat summary::-webkit-details-marker { display: none }
.consent-cat summary::after { content: "+"; display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--soft); color: var(--accent-strong); font-size: .9rem; line-height: 1; transition: transform var(--t), background var(--t) }
.consent-cat details[open] summary::after { transform: rotate(45deg); background: var(--accent-soft) }
.consent-cat dl { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 6px 16px; margin: 12px 0 0; padding: 14px 16px; border-radius: var(--r-md); background: var(--soft); font-size: .8rem; line-height: 1.5 }
.consent-cat dt { font-weight: 800; color: var(--primary-800) }
.consent-cat dd { margin: 0; color: var(--text) }
/* Entscheidung: Linie darüber, Buttons über die Breite verteilt */
.consent-actions { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; padding: 24px 36px }
/* Fußzeile: abgesetzt mit Linie und hellem Grund – Löschen links, Links rechts */
.consent-links { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 20px; padding: 16px 36px 18px; border-top: 1px solid var(--line); background: var(--soft); font-size: .8rem }
.consent-links a { color: var(--muted) }
.consent-links a:hover { color: var(--primary) }
.consent-loeschen { padding: 0; border: 0; background: none; font: inherit; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(95, 106, 128, .4); cursor: pointer }
.consent-loeschen:hover { color: var(--danger); text-decoration-color: currentColor }
.content-main .consent-meldung, .consent-meldung { margin: 0; padding: 12px 36px; border-top: 1px solid var(--line); background: var(--ok-soft); color: var(--ok); font-size: .84rem; font-weight: 700 }
.switch { position: relative; flex: none; width: 52px; height: 30px; cursor: pointer }
.switch input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer }
.switch i { position: absolute; inset: 0; border-radius: var(--r-pill); background: #7d879b; transition: background .2s }
.switch i::after { content: ""; position: absolute; left: 4px; top: 4px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .15); transition: transform .2s }
.switch input:checked + i { background: var(--primary) }   /* blau – Orange bleibt der Anmeldung vorbehalten; Spur aus: 3,6 : 1 */
.switch input:checked + i::after { transform: translateX(22px) }
.switch input:focus-visible + i { outline: 3px solid var(--primary); outline-offset: 2px }
.switch.is-locked { opacity: .55; cursor: not-allowed }

/* Kollegium-Detail */
.staff-overlay { position: fixed; inset: 0; z-index: 3000; display: none; align-items: center; justify-content: center; padding: 20px; background: rgba(15, 22, 42, .55) }
.staff-overlay.open { display: flex }
.staff-overlay-card { position: relative; width: 100%; max-width: 340px; padding: 32px 28px; border-radius: var(--r-lg); background: #fff; box-shadow: var(--shadow-lg); text-align: center }
.staff-overlay-close { position: absolute; top: 12px; right: 12px; width: 30px; height: 30px; border: 0; border-radius: 50%; background: var(--soft); color: var(--muted); font-size: 1.1rem; cursor: pointer }
.staff-overlay-card h3 { margin: 0 }

/* Weitere Schnellzugriffe (includes/schnellzugriffe.php) */
html:has(.ql-dialog[open]) { overflow: hidden }
.ql-dialog { width: min(900px, calc(100% - 32px)); max-height: calc(100vh - 48px); max-height: calc(100dvh - 48px); padding: 0; border: 0; border-radius: var(--r-lg); background: #fff; color: var(--ink); box-shadow: 0 40px 100px rgba(10, 16, 36, .4) }
.ql-dialog[open] { animation: einblenden .3s ease }
.ql-dialog::backdrop { background: rgba(14, 22, 45, .55); backdrop-filter: blur(3px) }
.ql-dialog-innen { padding: 28px 30px 22px }
.ql-dialog-kopf { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: -28px -30px 20px; padding: 22px 30px 16px; border-bottom: 1px solid var(--line); background: #fff }   /* bleibt beim Scrollen stehen */
.ql-dialog-kopf h2 { margin: 0; font-size: 1.5rem; letter-spacing: -.02em; color: var(--primary-800) }
.ql-zu { width: 40px; height: 40px; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--soft); color: var(--primary-800); font-size: 1.1rem; cursor: pointer }
.ql-zu:hover { background: var(--soft-blue) }
.ql-bg { margin: 0 0 24px }   /* Bildungsgänge oben im Overlay */
.ql-bg h3 { margin: 0 0 10px; font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted) }
.ql-bildungsgaenge { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px }
.ql-bildungsgaenge a { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-radius: var(--r-md); background: var(--accent-soft); color: var(--primary-900); font-size: .9rem; font-weight: 800; line-height: 1.25; transition: background var(--t) }
.ql-bildungsgaenge a:hover { background: var(--accent) }
/* Schnellzugriffe einzeilig: zu lange Namen enden mit … (vollständiger Name als title) */
.ql-gruppe .zeilen-text strong { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis }
.ql-bildungsgaenge a > span:first-child { min-width: 0; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; min-height: 2.5em }   /* Name zweizeilig (seit 18.10.2026), alle Kästen gleich hoch */
.ql-gruppe .zeilen-text { min-width: 0 } .ql-gruppe .zeilen-text strong { display: block }
.ql-bildungsgaenge .pfeil { font-style: normal; color: var(--accent-text); transition: transform var(--t) }
.ql-bildungsgaenge a:hover .pfeil { color: var(--primary-900); transform: translateX(3px) }
.ql-gruppen { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px }
.ql-gruppe h3 { margin: 0 0 8px; font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted) }
/* Fußleiste „Nicht dabei?“ (seit 18.10.2026): hellgrau über die volle Breite, bleibt wie der Kopf beim Scrollen stehen */
.ql-fuss { position: sticky; bottom: 0; z-index: 2; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px; margin: 26px -30px -22px; padding: 18px 30px; border-top: 1px solid var(--line); background: var(--soft) }
.ql-fuss p { display: grid; gap: 2px; margin: 0; font-size: .86rem; line-height: 1.45; color: var(--muted) }
.ql-fuss strong { font-size: 1rem; color: var(--primary-800) }
.ql-fuss .btn-row { margin: 0; gap: 8px }

/* Responsive */
@media (max-width: 760px) {
	.consent { padding: 10px; align-items: flex-end }
	.consent-dialog { border-radius: var(--r-lg) var(--r-lg) var(--r-md) var(--r-md) }
	.consent-head, .consent-body, .consent-actions, .consent-links, .consent-meldung { padding-left: 20px; padding-right: 20px }
	.consent-cat dl { grid-template-columns: 1fr; gap: 0 }
	.consent-cat dd { margin-bottom: 6px }
	.consent-head { padding-right: 60px }
	.consent-actions { flex-direction: column-reverse } .consent-actions .btn { width: 100% }
}
@media (max-width: 480px) {
	.ql-bildungsgaenge { grid-template-columns: minmax(0, 1fr) }   /* Bildungsgänge untereinander, damit die Namen nicht abgeschnitten werden */
	.search-box h2 { font-size: 2.6rem }
}
@media (max-width: 1020px) {
	.ql-gruppen { grid-template-columns: repeat(2, minmax(0, 1fr)) }
	.ql-bildungsgaenge { grid-template-columns: repeat(2, minmax(0, 1fr)) }   /* minmax: Spalten nie breiter als das Fenster (sonst seitlich scrollbar auf kleinen Handys) */
}
@media (max-width: 760px) {
	.ql-gruppen { grid-template-columns: minmax(0, 1fr) }
	.ql-dialog-innen { padding: 22px 18px 18px }
	.ql-dialog-kopf { margin: -22px -18px 16px; padding: 16px 18px 12px }
	.ql-fuss { margin: 22px -18px -18px; padding: 16px 18px }
}

/* Personen-Ansicht im Kollegium (person_ansicht()) */
.staff-overlay-card.pv { max-width: 640px; max-height: calc(100vh - 40px); max-height: calc(100dvh - 40px); overflow-y: auto; padding: 30px 30px 26px; text-align: left }
.pv-kopf { display: flex; align-items: flex-end; gap: 22px; padding-right: 30px }
.pv-foto { flex: none; display: grid; place-items: center; width: 190px; aspect-ratio: 4 / 5; overflow: hidden; border-radius: var(--r-lg); background: var(--soft-blue); color: var(--primary); font-size: 2.6rem; font-weight: 800 }
.pv-foto img { width: 100%; height: 100%; object-fit: cover; object-position: top }
.pv-kopf h3 { margin: 0 0 4px; font-size: var(--fs-h3); line-height: 1.15; color: var(--primary-800) }
.pv-kopf p { margin: 0; color: var(--muted) }
.pv-sprechzeit { display: flex; align-items: center; gap: 12px; margin: 20px 0 0; padding: 12px 16px; border-radius: var(--r-md); background: var(--soft-blue); color: var(--primary-800); font-weight: 700 }
.pv-sprechzeit svg { width: 22px; height: 22px; flex: none; color: var(--primary) }
.pv-sprechzeit small { display: block; font-size: .7rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted) }
.pv-abschnitt { margin: 20px 0 0 }
.pv-abschnitt h4 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 8px; font-size: .74rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted) }
.pv-vorschlag { padding: 2px 8px; border-radius: var(--r-pill); background: #fdf0db; color: #8a5300; font-size: .66rem; letter-spacing: .02em; text-transform: none }
.pv-aufgaben { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none }
.pv-aufgaben a { display: inline-flex; gap: 6px; padding: 6px 12px; border-radius: var(--r-pill); background: var(--soft); font-size: .86rem; font-weight: 700; color: var(--primary-800); text-decoration: none }
.pv-aufgaben a:hover { background: var(--soft-blue) }
.pv-aufgaben span { color: var(--accent-strong) }
.pv-kontakt { margin: 22px 0 0 }
@media (max-width: 560px) { .pv-kopf { flex-direction: column; align-items: flex-start } .pv-foto { width: 150px } .staff-overlay-card.pv .pv-kontakt { margin: 24px 0 0 } }
.pv-kopf p.pv-extern { margin-top: 8px; display: inline-block; padding: 3px 10px; border-radius: var(--r-pill); background: var(--soft); font-size: .76rem; font-weight: 700; color: var(--primary) }
