/* Separate Vorschau: durch Entfernen der Einbindung komplett ruecknehmbar. */
:root {
  --link-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 12h16M13 5l7 7-7 7' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --external-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 19 19 5M5 5h14v14' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* Gemeinsame Hakenlisten fuer Contao 4 und 5, auch hinter rte/div-Wrappern.
   Komponentenlisten erhalten weder diese Abstaende noch Haken.
   Varianten werden ausschliesslich ueber die Variablen unten gesteuert. */
#main :is(.ce_text, .content-text) ul:not(:where(nav *, [role="navigation"] *, .mod_navigation *, .mod_mobile_menu *, .mod_tagcloud *, .ce_gallery *, .content-gallery *, .pagination *, .cloud, .tag-chain)) {
  width: auto;
  max-width: 100%;
  margin: 0;
  padding: var(--text-list-padding, 0.8rem 0 0.2rem);
  list-style: none;
}

#main :is(.ce_text, .content-text) ul:not(:where(nav *, [role="navigation"] *, .mod_navigation *, .mod_mobile_menu *, .mod_tagcloud *, .ce_gallery *, .content-gallery *, .pagination *, .cloud, .tag-chain)) > li {
  display: block;
  position: relative;
  float: none;
  left: auto;
  width: auto;
  margin: 0 0 0.8rem;
  padding: 0 0 0 var(--text-list-indent, 1.7rem);
  text-align: left;
}

#main :is(.ce_text, .content-text) ul:not(:where(nav *, [role="navigation"] *, .mod_navigation *, .mod_mobile_menu *, .mod_tagcloud *, .ce_gallery *, .content-gallery *, .pagination *, .cloud, .tag-chain)) > li::before {
  content: '\2713';
  display: block;
  position: absolute;
  left: var(--text-list-marker-left, 0.2rem);
  top: var(--text-list-marker-top, 0.2rem);
  width: var(--text-list-marker-size, 1rem);
  height: var(--text-list-marker-size, 1rem);
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 3px;
  background: #66b02f;
  color: white;
  font-family: sans-serif;
  font-size: var(--text-list-marker-size, 1rem);
  font-weight: 400;
  line-height: 1;
  text-align: center;
  text-shadow: none;
  box-shadow: none;
  -webkit-mask: none;
  mask: none;
}

/* Unterlisten bleiben innerhalb ihres uebergeordneten Listenpunkts. */
#main :is(.ce_text, .content-text) ul:not(:where(nav *, [role="navigation"] *, .mod_navigation *, .mod_mobile_menu *, .mod_tagcloud *, .ce_gallery *, .content-gallery *, .pagination *, .cloud, .tag-chain)) > li > ul {
  margin: 0.3rem 0 0;
  padding: 0.3rem 0 0;
}

/* Kompakte Infoboxen, unabhaengig von Seite und Contao-Version. */
#main :is(.ce_text, .content-text).detail {
  --text-list-padding: 0;
  --text-list-indent: 1.2rem;
  --text-list-marker-left: 0;
  --text-list-marker-top: 0.05rem;
  --text-list-marker-size: 0.85rem;
}

#main :is(.ce_text, .content-text).detail ul:not(:where(.cloud, .tag-chain, .mod_tagcloud *, .ce_gallery *, .content-gallery *, nav *, .mod_navigation *)) > li {
  font-size: 0.85rem;
  line-height: 1.2;
}

/* Alte, breit gefasste ce_text-Regeln duerfen keine Haken an
   Navigation, Tags, Pagination oder Galeriebilder anhaengen. */
#main :is(.ce_text, .content-text) :is(nav, [role="navigation"], .mod_navigation, .mod_mobile_menu, .mod_tagcloud, .ce_gallery, .content-gallery, .pagination) li::before,
#main :is(.ce_text, .content-text) :is(.cloud, .tag-chain) > li::before {
  content: none;
  display: none;
}

/* Bestehende Pfeilpositionen und bewusst ausgeblendete Symbole beibehalten. */
body p a::before,
body :is(.ce_text, .content-text) ol li a::before,
body .download p a::before {
  content: '';
  width: 1em;
  height: 1em;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: #004f91;
  -webkit-mask: var(--link-arrow) center / contain no-repeat;
  mask: var(--link-arrow) center / contain no-repeat;
  vertical-align: -0.15em;
  font-size: inherit;
}

body a.modern-external-link::after {
  content: '';
  display: inline-block;
  width: 0.9em;
  height: 0.9em;
  margin-left: 0.25em;
  vertical-align: -0.1em;
  background: #004f91;
  -webkit-mask: var(--external-arrow) center / contain no-repeat;
  mask: var(--external-arrow) center / contain no-repeat;
}

body p a.modern-external-link::before,
body :is(.ce_text, .content-text) ol li a.modern-external-link::before {
  display: none;
}

/* Inhaltslinks bereits ohne Hover eindeutig erkennbar machen. */
#main :is(.ce_text, .content-text) a[href]:not(:has(img, picture, svg)),
#main :is(.download, .content-download, .content-downloads) a[href]:not(:has(img, picture, svg)),
body p.more a[href] {
  border: 0;
  color: #004f91;
  text-decoration-line: underline;
  text-decoration-color: #004f91;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

#main :is(.ce_text, .content-text) a[href]:not(:has(img, picture, svg)):hover,
#main :is(.download, .content-download, .content-downloads) a[href]:not(:has(img, picture, svg)):hover,
body p.more a[href]:hover {
  border: 0;
  color: #003663;
  text-decoration-thickness: 2px;
}

#main :is(.ce_text, .content-text) a[href]:not(:has(img, picture, svg)):focus-visible,
#main :is(.download, .content-download, .content-downloads) a[href]:not(:has(img, picture, svg)):focus-visible,
body p.more a[href]:focus-visible {
  outline: 2px solid #004f91;
  outline-offset: 3px;
  text-decoration-thickness: 2px;
}

/* Contao 5: Linkpfeile in der neuen Textstruktur positionieren. */
#main .content-text ol li a:not(.modern-external-link)::before {
  display: inline-block;
  margin-right: 0.35em;
}

/* Inhaltsakkordeons wie Textlinks gestalten; Menue-Toggler nicht erfassen. */
#main :is(.ce_accordion, .ce_accordionStart, .ce_accordionSingle) > .toggler {
  height: auto;
  background: transparent;
  color: #004f91;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.45;
  letter-spacing: normal;
  text-decoration-line: underline;
  text-decoration-color: currentColor;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  cursor: pointer;
}

#main :is(.ce_accordion, .ce_accordionStart, .ce_accordionSingle) > .toggler:hover {
  color: #003663;
  text-decoration-thickness: 2px;
}

#main :is(.ce_accordion, .ce_accordionStart, .ce_accordionSingle) > .toggler:focus-visible {
  outline: 2px solid #004f91;
  outline-offset: 3px;
  text-decoration-thickness: 2px;
}

#main :is(.ce_accordion, .ce_accordionStart, .ce_accordionSingle) > .toggler::before {
  color: #004f91;
  font-size: 1rem;
}

/* Beratungsuebersicht: fruehere Einrueckung ohne Browser-Listenpadding. */
#main .beratung.content-text > .rte > ol {
  margin: 1rem 0 0 0.45rem;
  padding: 0;
}

#main .beratung.content-text > .rte > ol > li {
  position: relative;
  margin: 0 0 0.8rem;
  padding: 0;
}

#main .beratung.content-text > .rte > ol > li a {
  display: inline-block;
  position: relative;
  margin: 0;
  padding: 2px 0.3rem 2px 1.4rem;
}

#main .beratung.content-text > .rte > ol > li a::before {
  position: absolute;
  left: 0;
  top: 0.3rem;
  margin: 0;
}
