/* =========================================================
   Lichtfeld: kompakter Cookie-Hinweis (CCM19)
   Stand 19.10.2026 v3, ConVis

   Nur Layout und Farben. Text, Buttons, Kategorien und die
   Einstellungs-Ansicht von CCM19 bleiben unverändert.
   - Alle Bildschirme: Karte unten (Desktop unten rechts), die
     Seite bleibt bis zur Entscheidung bedienbar, wie es der
     Hinweistext selbst sagt („für die Nutzung unserer Website
     nicht erforderlich“). Bis 15.10. war das nur am Desktop so;
     die Sperre am Handy sah ab v2 bedienbar aus, Tippen auf die
     Seite lief aber ins Leere. Der Meta-Pixel lädt weiterhin
     erst nach Zustimmung (assets/pixel-consent.js).
   - Handy und Tablet: solange die Karte offen ist, bekommt die
     Seite unten Platz, damit sich jeder Button über die Karte
     scrollen lässt.
   - Anfrage-Seite bis 760 px: das schwebende Cookie-Symbol von
     CCM19 ist ausgeblendet, es lag auf der Einwilligungs-Checkbox.
     Die Cookie-Einstellungen bleiben über den Link in der
     Fußzeile erreichbar.
   - Der Hinweistext ist vollständig sichtbar (Zwecke, USA,
     Widerruf). Nur bei sehr niedrigen Fenstern scrollt die Karte.
   - "Alles ablehnen" und "Alles akzeptieren" sind gleich groß
     und gleichfarbig nebeneinander, "Einstellungen" darunter.
   Eingebunden per <link> in index.html, anfrage.html und
   datenschutz.html. Nicht zusätzlich in CCM19 eintragen.
   ========================================================= */

/* Overlay über die ganze Fläche, durchsichtig und ohne Sperre:
   Tippen und Scrollen gehen an die Seite, nur die Karte fängt Eingaben */
html body #ccm-widget.ccm-modal.ccm-show {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: auto !important;
  height: auto !important;
  background: transparent !important;
  backdrop-filter: none !important;
  pointer-events: none !important;
}
html body #ccm-widget.ccm-modal.ccm-show .ccm-modal-inner {
  pointer-events: auto !important;
}

/* Handy und Tablet: Platz unter der Seite, solange die Karte offen ist */
@media (max-width: 1024px) {
  html body:has(#ccm-widget.ccm-show) {
    padding-bottom: 65vh !important;
  }
}

/* Anfrage-Seite: schwebendes Cookie-Symbol aus (lag auf der Checkbox),
   Cookie-Einstellungen bleiben in der Fußzeile */
@media (max-width: 760px) {
  html body:has(#f-contact) .ccm-settings-summoner {
    display: none !important;
  }
}

/* Karte unten statt Vollbild-Modal */
html body #ccm-widget.ccm-modal .ccm-modal-inner {
  position: absolute !important;
  top: auto !important;
  bottom: 10px !important;
  left: 10px !important;
  right: 10px !important;
  transform: none !important;
  width: auto !important;
  max-width: 520px !important;
  max-height: calc(100% - 20px) !important;
  margin: 0 auto !important;
  padding: 14px 16px 10px !important;
  border-radius: 14px !important;
  background: #F9F1E8 !important;
  color: #2a1030 !important;
  box-shadow: 0 -6px 28px rgba(0, 0, 0, .35) !important;
  display: flex !important;
  flex-direction: column !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  font-family: "Montserrat", sans-serif !important;
}

/* CCM19 färbt Kopf, Text und Fußzeile weiß, auf Creme umstellen */
html body #ccm-widget .ccm-modal--header,
html body #ccm-widget .ccm-modal--body,
html body #ccm-widget .ccm-modal--footer {
  background: transparent !important;
}

/* Kopfzeile: Sprachwahl und X klein in der Ecke */
html body #ccm-widget .ccm-modal--header {
  position: absolute !important;
  top: 4px !important;
  right: 4px !important;
  left: auto !important;
  height: 44px !important;
  min-height: 0 !important;
  padding: 0 !important;
  display: flex !important;
  align-items: center !important;
  gap: 4px !important;
  z-index: 2 !important;
}
html body #ccm-widget .ccm-widget--language-switch {
  position: static !important;
  display: flex !important;
  align-items: center !important;
  background: transparent !important;
  border: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  width: auto !important;
}
html body #ccm-widget .ccm-widget--language-switch label img {
  display: none !important;
}
html body #ccm-widget .ccm-widget--language-select {
  width: auto !important;
  max-width: 92px !important;
  height: 26px !important;
  padding: 0 18px 0 6px !important;
  font-size: 11px !important;
  background-color: transparent !important;
  border: 1px solid #cdbfc9 !important;
  border-radius: 6px !important;
  color: #3b2a40 !important;
}

/* X: Tippfläche 44 x 44 px, Symbol 14 px */
html body #ccm-widget .ccm-dismiss-button {
  position: static !important;
  width: 44px !important;
  height: 44px !important;
  padding: 15px !important;
  border-radius: 10px !important;
  background-color: transparent !important;
  border: 0 !important;
  opacity: .8 !important;
}
html body #ccm-widget .ccm-dismiss-button:hover {
  opacity: 1 !important;
}

/* Text: vollständig sichtbar, keine eigene Scrollfläche */
html body #ccm-widget .ccm-modal--body {
  display: flex !important;
  flex-direction: column !important;
  flex: 0 0 auto !important;
  min-height: 0 !important;
  padding: 0 !important;
  overflow: visible !important;
}
html body #ccm-widget .ccm-widget--text {
  flex: 0 0 auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: visible !important;
  margin: 0 0 10px !important;
  padding: 0 !important;
}
/* CCM19 legt unsichtbare Schichten über Textfeld und Scrollleiste, ganz entfernen */
html body #ccm-widget .ccm-widget--text::before,
html body #ccm-widget .ccm-widget--text::after,
html body #ccm-widget .cover-scrollbar::before,
html body #ccm-widget .cover-scrollbar::after {
  content: none !important;
  display: none !important;
}
html body #ccm-widget .ccm-inner-overflow {
  max-height: none !important;
  overflow: visible !important;
  padding: 0 4px 0 2px !important;
  background: transparent !important;
}
html body #ccm-widget .ccm-widget--title {
  font-size: 15px !important;
  line-height: 1.3 !important;
  font-weight: 700 !important;
  margin: 0 40px 6px 0 !important;
  color: #2a1030 !important;
}
html body #ccm-widget .ccm-widget--introduction,
html body #ccm-widget .ccm-widget--introduction .ccm--p {
  font-size: 12px !important;
  line-height: 1.45 !important;
  color: #3b2a40 !important;
  margin: 0 !important;
}

/* Buttons: Ablehnen und Akzeptieren gleich groß nebeneinander,
   Einstellungen darunter */
html body #ccm-widget .ccm-widget--buttons {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  margin: 0 !important;
  padding: 0 !important;
  flex: 0 0 auto !important;
  reading-flow: flex-visual !important;
}
html body #ccm-widget .ccm-widget--buttons button {
  margin: 0 !important;
  min-height: 42px !important;
  max-width: none !important;
  border-radius: 9px !important;
  font-family: inherit !important;
  padding: 0 6px !important;
  font-size: 12.5px !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
  white-space: normal !important;
}
html body #ccm-widget .ccm-widget--buttons .ccm--decline-cookies,
html body #ccm-widget .ccm-widget--buttons .ccm--save-settings {
  flex: 1 1 calc(50% - 4px) !important;
  width: auto !important;
  background: #390941 !important;
  border: 1px solid #390941 !important;
  color: #fff !important;
}
html body #ccm-widget .ccm-widget--buttons .ccm--decline-cookies { order: 1 !important; }
html body #ccm-widget .ccm-widget--buttons .ccm--save-settings { order: 2 !important; }
html body #ccm-widget .ccm-widget--buttons button:not(.ccm--decline-cookies):not(.ccm--save-settings) {
  order: 3 !important;
  flex: 1 1 100% !important;
  min-height: 36px !important;
  background: transparent !important;
  border: 1px solid #8a7a8f !important;
  color: #2a1030 !important;
  font-weight: 600 !important;
}
@media (max-width: 299px) {
  html body #ccm-widget .ccm-widget--buttons .ccm--decline-cookies,
  html body #ccm-widget .ccm-widget--buttons .ccm--save-settings {
    flex-basis: 100% !important;
  }
}

/* Fokus: Ring in Lila, auf Creme gut sichtbar */
html body #ccm-widget .ccm-widget--buttons button:focus-visible,
html body #ccm-widget .ccm-modal--footer a:focus-visible,
html body #ccm-widget .ccm-widget--language-select:focus-visible {
  outline: 2px solid #390941 !important;
  outline-offset: 2px !important;
}
html body #ccm-widget .ccm-dismiss-button:focus-visible {
  outline: 2px solid #390941 !important;
  outline-offset: -2px !important;
  border-radius: 4px !important;
  opacity: 1 !important;
}

/* Fußzeile: Impressum und Datenschutz klein */
html body #ccm-widget .ccm-modal--footer {
  flex: 0 0 auto !important;
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: center !important;
  gap: 2px 12px !important;
  padding: 7px 0 0 !important;
  margin: 0 !important;
  font-size: 11px !important;
  text-align: center !important;
}
html body #ccm-widget .ccm-modal--footer a {
  color: #5d4a62 !important;
  font-size: 11px !important;
}
html body #ccm-widget .ccm-link-container,
html body #ccm-widget .ccm-powered-by {
  margin: 0 !important;
  padding: 0 !important;
}

/* Handy: Sprachwahl ausblenden, die Seite ist nur auf Deutsch */
@media (max-width: 599px) {
  html body #ccm-widget .ccm-widget--language-switch {
    display: none !important;
  }
}
@media (min-width: 600px) {
  html body #ccm-widget .ccm-widget--title {
    margin-right: 140px !important;
  }
}

/* Handy quer und niedrige Fenster: Text links, Buttons rechts */
@media (orientation: landscape) and (max-height: 500px) {
  html body #ccm-widget.ccm-modal .ccm-modal-inner {
    max-width: 760px !important;
  }
  html body #ccm-widget .ccm-modal--body {
    flex-direction: row !important;
    align-items: flex-start !important;
    gap: 16px !important;
  }
  html body #ccm-widget .ccm-widget--text {
    flex: 1 1 auto !important;
    margin: 0 !important;
  }
  html body #ccm-widget .ccm-widget--buttons {
    flex: 0 0 210px !important;
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    margin-top: 30px !important;
  }
  html body #ccm-widget .ccm-widget--buttons button,
  html body #ccm-widget .ccm-widget--buttons .ccm--decline-cookies,
  html body #ccm-widget .ccm-widget--buttons .ccm--save-settings {
    flex: 0 0 auto !important;
    width: 100% !important;
  }
}

/* Desktop: Karte unten rechts */
@media (min-width: 900px) {
  html body #ccm-widget.ccm-modal .ccm-modal-inner {
    left: auto !important;
    right: 24px !important;
    bottom: 24px !important;
    width: 440px !important;
    max-height: calc(100% - 48px) !important;
  }
}
