/* Bestehende TOC-Kinder bleiben an Ort und Stelle; Sticky gilt weiter für das Gesamtwidget. */
/*
 * Nur Darstellung: Erzeugung/Position übernimmt JavaScript, Ladeerlaubnis das PHP-Modul.
 * Originalen TOC-Rahmen auf Header/Body verteilen, damit die Box optisch separat steht,
 * aber auf Desktop innerhalb desselben Sticky-Widgets bleiben kann.
 */
.elementor-widget-table-of-contents.oa-google-source-toc {
  border: 0 !important;
  background: transparent !important;
}
.oa-google-source-toc > .elementor-toc__header {
  border-top: var(--oa-toc-border-width, 1px) solid var(--oa-toc-border-color, #9da5ae);
  border-left: var(--oa-toc-border-width, 1px) solid var(--oa-toc-border-color, #9da5ae);
  border-right: var(--oa-toc-border-width, 1px) solid var(--oa-toc-border-color, #9da5ae);
  border-radius: var(--oa-toc-radius, 3px) var(--oa-toc-radius, 3px) 0 0;
  background: #fff;
}
.oa-google-source-toc > .elementor-toc__body {
  border: var(--oa-toc-border-width, 1px) solid var(--oa-toc-border-color, #9da5ae);
  border-top: 0;
  border-radius: 0 0 var(--oa-toc-radius, 3px) var(--oa-toc-radius, 3px);
  background: #fff;
}
/* Gemeinsame Grunddarstellung muss auch für die mobil aus dem TOC verschobene Box gelten. */
.oa-google-source,
.oa-google-source-info {
  box-sizing: border-box;
  color: #0f172a;
  font-family: inherit;
  font-size: 15px;
  line-height: 1.55;
  text-align: left;
}
.oa-google-source {
  margin-top: 16px;
  padding: 20px;
  border: 1px solid #9cd4da;
  border-radius: 12px;
  background: #edf8f8;
  overflow-wrap: anywhere;
}
.oa-google-source__top { display: flex; align-items: flex-start; gap: 10px; }
/* Lokal gestaltetes farbiges G aus Text/CSS; keine externe Logo- oder Schriftdatei. */
.oa-google-source__google {
  flex: 0 0 27px;
  font: 800 31px/1.1 Arial, sans-serif;
  background: conic-gradient(#4285f4 0deg 105deg, #34a853 105deg 195deg, #fbbc05 195deg 240deg, #ea4335 240deg 300deg, #4285f4 300deg);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}
.oa-google-source .oa-google-source__heading {
  flex: 1 1 auto;
  margin: 0;
  color: #0f172a;
  font-family: inherit;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.35;
}
.oa-google-source .oa-google-source__text { margin: 14px 0 18px; font-size: 15px; line-height: 1.55; }
/* Info-/Schließen-Schaltflächen gegen allgemeine Theme-Buttonstile abgrenzen. */
.oa-google-source button.oa-google-source__info,
.oa-google-source-info button.oa-google-source-info__close {
  display: inline-grid;
  place-items: center;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  padding: 0;
  border: 1px solid #43616a;
  border-radius: 50%;
  background: transparent;
  color: #234852;
  font: 700 17px/1 Georgia, serif;
  cursor: pointer;
  box-shadow: none;
}
/* Hauptlink mit ausreichender Höhe und umbrechendem Text auch auf schmalen Displays. */
.oa-google-source a.oa-google-source__link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 48px;
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  border: 1px solid #147581;
  border-radius: 9px;
  background: #147581;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
  text-decoration: none;
}
.oa-google-source a.oa-google-source__link:hover { background: #105d67; color: #fff; }
.oa-google-source__link-label { min-width: 0; }
.oa-google-source__arrow { flex: 0 0 auto; font-size: 22px; line-height: 1; }
/* Sichtbare Tastaturfokussierung für Link sowie Info-/Schließen-Button erhalten. */
.oa-google-source__info:focus-visible,
.oa-google-source__link:focus-visible,
.oa-google-source-info__close:focus-visible { outline: 3px solid #0f172a; outline-offset: 3px; }
/* hidden darf durch Theme-CSS nicht aufgehoben werden; Desktop-Info liegt außerhalb des TOCs. */
.oa-google-source-info[hidden] { display: none !important; }
.oa-google-source-info {
  position: fixed;
  z-index: 100001;
  width: 370px;
  max-width: calc(100vw - 32px);
  padding: 22px;
  border: 1px solid #9da5ae;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 28px rgb(15 23 42 / 16%);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.oa-google-source-info .oa-google-source-info__close {
  float: right;
  margin: -8px -8px 8px 12px;
  font-family: Arial, sans-serif;
  font-size: 23px;
}
.oa-google-source-info .oa-google-source-info__heading { margin: 0 0 12px; font-size: 17px; font-weight: 700; line-height: 1.4; }
.oa-google-source-info .oa-google-source-info__text { margin: 0; font-size: 15px; line-height: 1.55; }
/* Höhenvariablen kommen aus JS; Scrollbereiche halten lange TOCs und den Button erreichbar. */
@media (min-width: 1025px) {
  .elementor-widget-table-of-contents.oa-google-source-toc {
    max-height: var(--oa-toc-total-max, calc(100dvh - 24px));
    overflow-y: auto !important;
    scrollbar-width: thin;
    overscroll-behavior: contain;
  }
  .oa-google-source-toc > .elementor-toc__body {
    max-height: var(--oa-toc-body-max, 40vh);
    overflow-y: auto;
    scrollbar-width: thin;
  }
}
/* Dieselbe 1024-px-Schwelle wie in JS: Infofeld in den normalen mobilen Textfluss setzen. */
@media (max-width: 1024px) {
  .oa-google-source { padding: 16px; }
  .oa-google-source-info.oa-google-source-info--inline {
    position: static;
    width: 100%;
    max-width: none;
    margin: 0 0 16px;
    padding: 16px;
    box-shadow: none;
  }
}

/* Mobile Platzierung vor dem vorhandenen Kontakt-Template. */
/* Bei fehlendem mobilen Kontaktziel verbirgt JS die Box; auch hier hidden durchsetzen. */
.oa-google-source[hidden] { display: none !important; }
/* Slot wird von JS vor Kontakt-Template 3455 eingefügt; seitlicher Abstand auf Mobil/Tablet. */
.oa-google-source-mobile-slot { box-sizing: border-box; width: calc(100% - 40px); max-width: 680px; margin: 32px auto; align-self: center; }
.oa-google-source-mobile-slot > .oa-google-source { margin-top: 0; font-family: inherit; }
@media (min-width: 1025px) { .oa-google-source-mobile-slot { display: none; } }
