/* Admin-Bereich – nur für angemeldete Redakteure geladen. Große, klare Bedienelemente. */
[hidden] { display: none !important; }
.adminleiste { position: sticky; top: 0; z-index: 50; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px;
  padding: 6px 16px; background: #22302f; color: #e6efed; font-size: .92rem; }
.kopf { top: 0; }
body:has(.adminleiste) .kopf { position: relative; }
.adminleiste__wer { opacity: .8; }
.adminleiste__aktionen { display: flex; flex-wrap: wrap; gap: 6px; margin-left: auto; align-items: center; }
.adminleiste a, .adminleiste button { color: #fff; text-decoration: none; padding: 5px 10px; border-radius: 6px;
  background: rgba(255,255,255,.1); border: 0; font: inherit; cursor: pointer; }
.adminleiste a:hover, .adminleiste button:hover { background: rgba(255,255,255,.22); color: #fff; }
.adminleiste .adminleiste__haupt { background: var(--akzent); color: #1f2a2a; font-weight: 700; }
.adminleiste form { margin: 0; }

.meldung { padding: 10px 14px; border-radius: 8px; margin: 0 0 16px; border-left: 5px solid; }
.meldung--ok { background: #e7f6ec; border-color: #2e8b57; }
.meldung--fehler { background: #fdecea; border-color: #c0392b; }
.meldung--hinweis { background: var(--creme); border-color: var(--akzent); }

.knopf { display: inline-block; font: inherit; font-size: 1rem; padding: 10px 18px; border-radius: 8px; border: 1px solid var(--linie);
  background: #fff; color: var(--petrol-dunkel); cursor: pointer; text-decoration: none; line-height: 1.2; }
.knopf:hover { background: var(--petrol-hell); }
.knopf--haupt { background: var(--petrol); border-color: var(--petrol); color: #fff; font-weight: 600; }
.knopf--haupt:hover { background: var(--petrol-dunkel); color: #fff; }
.knopf--gefahr { background: #fff; border-color: #c0392b; color: #a52a1e; }
.knopf--gefahr:hover { background: #fdecea; }
.knopf--klein { padding: 5px 10px; font-size: .9rem; }
.knopf:disabled { opacity: .4; cursor: default; }
.knoepfe { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }

.formular { display: flex; flex-direction: column; gap: 16px; max-width: 640px; }
.formular--schmal { max-width: 420px; }
.formular label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; }
.formular label small { font-weight: 400; color: var(--leise); }
.formular input[type=text], .formular input[type=email], .formular input[type=password], .formular select, .inline input[type=text] {
  font: inherit; font-weight: 400; padding: 10px 12px; border: 1px solid #b9cbc7; border-radius: 8px; background: #fff; }
.formular label.haken { flex-direction: row; align-items: center; gap: 10px; font-weight: 400; }
.formular label.haken input { width: 22px; height: 22px; }
.formular--gefahr { margin-top: 36px; padding-top: 16px; border-top: 1px solid var(--linie); }
.inline { display: flex; gap: 6px; align-items: center; }

.reiter { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 2px solid var(--linie); margin: -4px 0 18px; }
.reiter a { padding: 8px 14px; text-decoration: none; border-radius: 8px 8px 0 0; color: var(--petrol); }
.reiter a[aria-current] { background: var(--petrol); color: #fff; }

.werkzeuge { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; justify-content: space-between; margin-bottom: 8px; }
.filter { display: flex; flex-direction: column; gap: 4px; font-weight: 600; flex: 1 1 320px; max-width: 520px; }
.filter input { font: inherit; font-weight: 400; padding: 10px 12px; border: 1px solid #b9cbc7; border-radius: 8px; }

.baum, .baum ul { list-style: none; margin: 0; padding: 0; }
.baum ul { margin-left: 22px; border-left: 1px dashed #c9d8d5; padding-left: 8px; }
.baum li { margin: 2px 0; }
.baum summary { cursor: pointer; list-style: none; }
.baum summary::-webkit-details-marker { display: none; }
.baum summary::before { content: "▸"; display: inline-block; width: 1.1em; color: var(--petrol); transition: transform .15s; }
.baum details[open] > summary::before { transform: rotate(90deg); }
.baum__blatt { padding-left: 1.1em; }
.baum__zeile { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 3px 0; }
.baum__titel { font-weight: 600; }
.baum__anzahl { font-size: .8rem; color: var(--leise); background: var(--petrol-hell); border-radius: 10px; padding: 0 7px; }
.baum__aktionen { display: inline-flex; gap: 10px; font-size: .88rem; }
.baum__aktionen a { color: var(--leise); }
.baum__aktionen a:hover { color: var(--petrol); }
.marke-klein { font-size: .75rem; padding: 1px 7px; border-radius: 10px; background: #eef2f1; color: var(--leise); font-weight: 400; }
.marke-klein--aus { background: #fdecea; color: #a52a1e; }
.baum li.versteckt { display: none; }
.baum li.treffer > .baum__zeile .baum__titel, .baum li.treffer > details > summary .baum__titel { background: #ffe9a3; }

.tabelle { width: 100%; border-collapse: collapse; }
.tabelle th, .tabelle td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--linie); vertical-align: middle; }
.tabelle th { font-size: .85rem; color: var(--leise); font-weight: 600; }
.tabelle .aktionen { white-space: nowrap; }
.tabelle .aktionen form { display: inline-block; margin: 0 4px 4px 0; }
@media (max-width: 640px) {
  .tabelle thead { display: none; }
  .tabelle tr { display: block; padding: 8px 0; border-bottom: 1px solid var(--linie); }
  .tabelle td { display: block; border: 0; padding: 3px 0; }
}
.fuss__anmelden { opacity: .6; }
.formular > button, .formular > .knopf { align-self: flex-start; }

/* ---------- Seiteneditor ---------- */
.ed { display: flex; flex-direction: column; gap: 18px; padding-bottom: 90px; }
.ed-titel { display: flex; flex-direction: column; gap: 6px; font-weight: 600; }
.ed-titel input { font: inherit; font-size: 1.3rem; font-weight: 600; padding: 10px 12px; border: 1px solid #b9cbc7; border-radius: 8px; }
.ed-bloecke { display: flex; flex-direction: column; gap: 18px; }
.ed-block { border: 2px solid var(--linie); border-radius: 10px; background: #fff; padding: 10px 12px 14px; }
.ed-block:focus-within { border-color: var(--petrol); }
.ed-block__kopf { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 8px; }
.ed-block__kopf strong { color: var(--petrol-dunkel); }
.ed-block__knoepfe { margin-left: auto; display: flex; gap: 6px; }
.ed-layout__wahl { font-size: .92rem; }
.ed-layout { font: inherit; padding: 5px 8px; border-radius: 6px; border: 1px solid #b9cbc7; }
.ed-zusatz { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: .88rem; margin-bottom: 6px; }
.ed-zusatz__gruppe { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.ed-zusatz__gruppe > span:first-child { color: var(--leise); margin-right: 2px; }
.ed-zusatz__bild { background: #fff6d6; border-radius: 8px; padding: 2px 6px; }
.ed-zusatz__gruppe[hidden] { display: none; }

.ed .ql-toolbar.ql-snow { border-radius: 8px 8px 0 0; border-color: #b9cbc7; background: #f6faf9; padding: 6px; }
.ed .ql-toolbar.ql-snow button { width: 34px; height: 32px; }
.ed .ql-container.ql-snow { border-radius: 0 0 8px 8px; border-color: #b9cbc7; font: inherit; font-size: 17px; }
.ed .ql-editor { min-height: 140px; line-height: 1.6; }
.ed .ql-editor p { margin: 0; }
.ed .ql-editor h2 { color: var(--petrol-dunkel); font-size: 1.3rem; margin: 6px 0; }
.ed .ql-editor h3 { color: var(--petrol-dunkel); font-size: 1.12rem; margin: 6px 0; }
.ed .ql-editor img { max-width: 100%; max-height: 420px; width: auto; cursor: pointer; display: block; margin: 8px auto; border-radius: 4px; }
.ed .ql-editor img.bild-links { float: left; max-width: 45%; margin: 4px 16px 8px 0; }
.ed .ql-editor img.bild-rechts { float: right; max-width: 45%; margin: 4px 0 8px 16px; }
.ed .ql-editor img.ed-gewaehlt { outline: 4px solid var(--akzent); }
.ed .ql-editor::after { content: ""; display: table; clear: both; }
.ed .ql-snow .ql-tooltip { z-index: 5; }

.ed-bilder { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.ed-bild { margin: 0; border: 1px solid var(--linie); border-radius: 8px; background: var(--creme); display: flex; flex-direction: column; overflow: hidden; }
.ed-bild img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; background: #e9efee; }
.ed-bild__platz { aspect-ratio: 4 / 3; display: grid; place-items: center; color: var(--leise); background: #e9efee; }
.ed-bild__text { min-height: 3.2em; padding: 6px 8px; font-size: .9rem; line-height: 1.4; background: #fff; border-top: 1px solid var(--linie); outline: none; }
.ed-bild__text:focus { box-shadow: inset 0 0 0 2px var(--petrol); }
.ed-bild__text:empty::before { content: attr(data-platzhalter); color: #9aa; }
.ed-bild__knoepfe { display: flex; gap: 4px; padding: 6px; justify-content: space-between; }
.ed-bild__knoepfe .knopf--gefahr { margin-left: auto; }
.ed-ablage { margin-top: 12px; padding: 14px; border: 2px dashed #b9cbc7; border-radius: 10px; text-align: center; color: var(--leise); }
.ed-ablage--drueber { border-color: var(--petrol); background: var(--petrol-hell); }
.ed-ablage--gross { padding: 24px; }
.ed-neu { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 12px; border: 2px dashed var(--linie); border-radius: 10px; }
.ed-neu > span { color: var(--leise); }

.ed-leiste { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: flex-end;
  padding: 10px 18px; background: rgba(255,255,255,.96); border-top: 2px solid var(--linie); box-shadow: 0 -4px 14px rgba(0,0,0,.08); }
.ed-leiste .knoepfe { margin: 0; }
.ed-leiste .knopf--haupt { font-size: 1.1rem; padding: 12px 28px; }
.ed-status { color: var(--leise); }
.ed-status--ok { color: #2e7d4f; font-weight: 600; }
.ed-status--fehler { color: #a52a1e; font-weight: 600; }
.ed-entwurf { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.ed-entwurf .knoepfe { margin: 0; }

.ed-dialog { width: min(640px, 94vw); border: 0; border-radius: 12px; padding: 20px 22px; box-shadow: 0 10px 40px rgba(0,0,0,.25); }
.ed-dialog::backdrop { background: rgba(0,40,40,.45); }
.ed-dialog h2 { margin-top: 0; }
.ed-dialog label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; margin: 10px 0 6px; }
.ed-dialog input { font: inherit; font-weight: 400; padding: 9px 11px; border: 1px solid #b9cbc7; border-radius: 8px; }
.ed-dialog__teil { margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--linie); }
.ed-treffer { list-style: none; margin: 0; padding: 0; max-height: 240px; overflow: auto; }
.ed-treffer__seite { display: block; width: 100%; text-align: left; font: inherit; padding: 7px 10px; border: 0; border-bottom: 1px solid var(--linie); background: #fff; cursor: pointer; }
.ed-treffer__seite:hover, .ed-treffer__seite:focus { background: var(--petrol-hell); }
.ed-dialog .knoepfe { justify-content: flex-end; margin-top: 18px; }

.nachliefern__liste { text-align: left; margin: 14px 0 0; }
.nachliefern__liste .ok { color: #2e7d4f; }
.nachliefern__liste .fehler { color: #a52a1e; }
.fehlend summary { cursor: pointer; padding: 4px 0; }
.fehlend ul { margin: 4px 0 10px; font-size: .92rem; }
@media (max-width: 640px) {
  .ed-block__knoepfe { margin-left: 0; }
  .ed-leiste { justify-content: center; }
}
@media (max-width: 640px) {
  .ed-leiste { padding: 6px 10px; gap: 4px 10px; }
  .ed-status { font-size: .82rem; width: 100%; text-align: center; }
  .ed-leiste .knopf { padding: 8px 14px; }
  .ed-leiste .knopf--haupt { padding: 9px 22px; font-size: 1rem; }
}

/* Einfügen zwischen Abschnitten (erscheint beim Überfahren, am Handy immer) */
.ed-block { position: relative; }
.ed-zwischen { position: absolute; top: -17px; left: 50%; transform: translateX(-50%); z-index: 3; display: flex; gap: 6px;
  opacity: 0; transition: opacity .15s; }
.ed-block:hover > .ed-zwischen, .ed-zwischen:focus-within { opacity: 1; }
.ed-zwischen__knopf { font: inherit; font-size: .82rem; font-weight: 600; padding: 3px 12px; border-radius: 14px; cursor: pointer;
  border: 1px solid var(--petrol); background: #fff; color: var(--petrol); box-shadow: 0 1px 4px rgba(0,0,0,.12); }
.ed-zwischen__knopf:hover { background: var(--petrol); color: #fff; }
@media (hover: none) { .ed-zwischen { opacity: 1; } }
.ed-bloecke { gap: 30px; }

/* Bildunterschrift: kleine Werkzeugleiste, sichtbar während man schreibt */
.ed-bild__werkzeug { display: none; gap: 4px; padding: 4px 8px; background: #fff; border-top: 1px dashed var(--linie); }
.ed-bild:focus-within .ed-bild__werkzeug { display: flex; }
.ed-mini { font: inherit; font-size: .85rem; min-width: 32px; padding: 3px 8px; border: 1px solid #b9cbc7; border-radius: 6px; background: #f6faf9; cursor: pointer; }
.ed-mini:hover { background: var(--petrol-hell); }
.ed-mini--fett { font-weight: 800; }
.ed-mini--kursiv { font-style: italic; font-family: Georgia, serif; }
.ed-bild__text a { color: var(--petrol); font-weight: 600; }
.ed-bild__knoepfe { flex-wrap: wrap; margin-top: auto; }

/* SweetAlert2-Rückfragen an die Seite angepasst */
.swal2-popup { font-family: inherit; border-radius: 12px; }
.swal2-title { color: var(--petrol-dunkel); }
.swal2-checkbox input { width: 20px; height: 20px; }
.swal2-actions .swal2-styled { font-size: 1rem; padding: 10px 22px; border-radius: 8px; }
