/*
 * CCM19-Banner im More-at-Home-CI. Gleiche Datei in website, sanierungsrechner und app (public/ccm19.css) –
 * Änderungen bitte in allen drei übernehmen. Farben stehen hier fest (marketing/brand/farben/farben.css),
 * damit die Datei nicht von den Theme-Variablen des jeweiligen Projekts abhängt.
 * CCM19 lädt sein Stylesheet nach uns und nutzt hohe Spezifität; `:not(#_)` hebt jeden Selektor auf
 * ID-Niveau, ohne !important. Ablehnen und Akzeptieren bewusst gleich gewichtet (DSK/EDPB: kein Nudging).
 * Schrift: --ccm-font / --ccm-font-semibold / --ccm-font-bold (App: Inter je Schnitt), sonst --font-sans.
 */
.ccm-root:not(#_) {
  --ccm-navy: #001932;
  --ccm-navy-hover: #003365;
  --ccm-focus: #0054a5;
  --ccm-lime: #c8ff32;
  --ccm-ink: #464f52;
  --ccm-mist: #f3f6f7;
  --ccm-line: #dfe5e8;
  --ccm-radius: 28px;
  --ccm-pad: 20px;
  font-family: var(--ccm-font, var(--font-sans, 'Barlow', system-ui, sans-serif));
  font-weight: 400;
  color: var(--ccm-ink);
  -webkit-font-smoothing: antialiased;
  font-synthesis: none; /* App: Inter liegt je Schnitt als eigene Familie vor, kein Fake-Fett */
}
@media (min-width: 40em) {
  .ccm-root:not(#_) {
    --ccm-pad: 32px;
  }
}

/* Abdunkeln wie die Seiten-Overlays */
.ccm-root:not(#_) .ccm-modal.ccm--is-blocking {
  background-color: rgb(0 25 50 / 0.6);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

/* Handy: Bottom-Sheet; ab Tablet: schwebende, rundum runde Karte. CCM19 positioniert absolut – wir per Flex. */
.ccm-root:not(#_) .ccm-modal.ccm-show {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
}
.ccm-root:not(#_) .ccm-modal-inner {
  position: relative;
  inset: auto;
  width: 100%;
  height: auto;
  margin: 0;
  transform: none;
  max-height: calc(100dvh - 24px);
  background: #fff;
  border-radius: var(--ccm-radius) var(--ccm-radius) 0 0;
  box-shadow: 0 -8px 40px -12px rgb(0 25 50 / 0.35);
  overflow: hidden;
  animation: ccm-in 320ms cubic-bezier(0.22, 1, 0.36, 1);
}
@media (min-width: 40em) {
  .ccm-root:not(#_) .ccm-modal.ccm-show {
    justify-content: center;
  }
  .ccm-root:not(#_) .ccm-modal-inner {
    width: calc(100% - 48px);
    max-width: 680px;
    max-height: calc(100dvh - 48px);
    margin: 24px;
    border-radius: var(--ccm-radius);
    box-shadow: 0 32px 80px -24px rgb(0 25 50 / 0.55);
  }
  .ccm-root:not(#_) .ccm-control-panel .ccm-modal-inner,
  .ccm-root:not(#_) #ccm-details .ccm-modal-inner {
    max-width: 720px;
  }
}
@keyframes ccm-in {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
}
@media (prefers-reduced-motion: reduce) {
  .ccm-root:not(#_) .ccm-modal-inner {
    animation: none;
  }
}

.ccm-root:not(#_) .ccm-modal--header,
.ccm-root:not(#_) .ccm-modal--body,
.ccm-root:not(#_) .ccm-modal--footer {
  padding-inline: var(--ccm-pad);
}
.ccm-root:not(#_) .ccm-modal--header {
  padding-top: var(--ccm-pad);
  padding-bottom: 0;
  border-bottom: none;
}
.ccm-root:not(#_) .ccm-modal--body {
  flex: 1 1 auto;
  min-height: 0;
  padding-top: 12px;
  padding-bottom: 0;
  border-bottom: none;
}
.ccm-root:not(#_) .ccm-widget .ccm-modal--header {
  display: flex;
  justify-content: flex-end;
  padding-top: 16px;
}
.ccm-root:not(#_) .ccm-widget .ccm-modal--body {
  padding-top: 0;
}

/* Sprachwahl als kleine Pille */
.ccm-root:not(#_) .ccm-widget--language-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  position: static;
  width: auto;
  height: 34px;
  padding: 0 4px 0 12px;
  background: var(--ccm-mist);
  border-radius: 9999px;
}
.ccm-root:not(#_) .ccm-widget--language-switch img {
  width: 16px;
  height: 16px;
  opacity: 0.7;
}
.ccm-root:not(#_) .ccm-widget--language-select {
  width: auto;
  min-width: 0;
  height: 34px;
  padding: 0 24px 0 0;
  font-family: inherit;
  font-size: 13px;
  color: var(--ccm-navy);
  background-color: transparent;
  border: none;
}

/* Überschrift mit Lime-Balken wie im Brandbook */
.ccm-root:not(#_) .ccm-widget--title,
.ccm-root:not(#_) .ccm-modal--title {
  margin: 0 0 12px;
  font-family: var(--ccm-font-bold, inherit);
  font-weight: 700;
  font-size: 22px;
  line-height: 1.2;
  color: var(--ccm-navy);
  text-wrap: balance;
}
.ccm-root:not(#_) .ccm-widget--title::after,
.ccm-root:not(#_) .ccm-modal--title::after {
  content: '';
  display: block;
  width: 48px;
  height: 6px;
  margin-top: 12px;
  background: var(--ccm-lime);
  border-radius: 9999px;
}
@media (min-width: 40em) {
  .ccm-root:not(#_) .ccm-widget--title,
  .ccm-root:not(#_) .ccm-modal--title {
    font-size: 26px;
  }
}

/* Fließtext scrollt in sich, die Buttons bleiben immer sichtbar */
.ccm-root:not(#_) .ccm-widget--text .ccm-inner-overflow {
  max-height: min(34dvh, 280px);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-mask-image: linear-gradient(#000 calc(100% - 24px), transparent);
  mask-image: linear-gradient(#000 calc(100% - 24px), transparent);
  padding-bottom: 16px;
}
.ccm-root:not(#_) .ccm-widget--introduction,
.ccm-root:not(#_) .ccm-widget--introduction .ccm--p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--ccm-ink);
}
@media (min-width: 40em) {
  .ccm-root:not(#_) .ccm-widget--introduction,
  .ccm-root:not(#_) .ccm-widget--introduction .ccm--p {
    font-size: 15px;
  }
}

/* Buttons: rund, Navy, Hover Lime */
.ccm-root:not(#_) .button,
.ccm-root:not(#_) button,
.ccm-root:not(#_) .button:hover,
.ccm-root:not(#_) .button:focus,
.ccm-root:not(#_) button:hover,
.ccm-root:not(#_) button:focus {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  margin: 0;
  padding: 6px 20px;
  font-family: var(--ccm-font-semibold, inherit);
  font-weight: 600;
  font-size: 15px;
  line-height: 1.2;
  text-transform: none;
  text-shadow: none;
  letter-spacing: 0;
  color: var(--ccm-navy);
  background: #fff;
  border: 2px solid var(--ccm-navy);
  border-radius: 9999px;
  box-shadow: none;
  outline: none;
  cursor: pointer;
  transition: background-color 150ms, color 150ms, border-color 150ms, transform 150ms;
}
.ccm-root:not(#_) .button:hover,
.ccm-root:not(#_) button:hover {
  background: var(--ccm-mist);
}
.ccm-root:not(#_) .button:active,
.ccm-root:not(#_) button:active {
  transform: scale(0.98);
}
.ccm-root:not(#_) .button:focus-visible,
.ccm-root:not(#_) button:focus-visible {
  outline: 3px solid var(--ccm-focus);
  outline-offset: 2px;
}
.ccm-root:not(#_) button.ccm--button-primary,
.ccm-root:not(#_) button.ccm--decline-cookies,
.ccm-root:not(#_) button.ccm--button-primary:focus,
.ccm-root:not(#_) button.ccm--decline-cookies:focus {
  color: #fff;
  background: var(--ccm-navy);
  border-color: var(--ccm-navy);
}
.ccm-root:not(#_) button.ccm--button-primary:hover,
.ccm-root:not(#_) button.ccm--decline-cookies:hover {
  color: var(--ccm-navy);
  background: var(--ccm-lime);
  border-color: var(--ccm-lime);
}

/* Banner: Handy gestapelt (Akzeptieren, Ablehnen, dann „Einstellungen“ als Link), ab Tablet in einer Reihe */
.ccm-root:not(#_) .ccm-widget--buttons {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 8px 0 4px;
}
.ccm-root:not(#_) .ccm-widget--buttons button {
  flex: 1 1 100%;
  max-width: none;
  width: auto;
}
.ccm-root:not(#_) .ccm-widget--buttons button.ccm--button-primary {
  order: -1;
}
.ccm-root:not(#_) .ccm-widget--buttons button[data-ccm-modal],
.ccm-root:not(#_) .ccm-widget--buttons button[data-ccm-modal]:focus,
.ccm-root:not(#_) .ccm-widget--buttons button[data-ccm-modal]:hover {
  order: 1;
  min-height: 40px;
  padding-inline: 12px;
  font-size: 14px;
  color: var(--ccm-navy);
  background: transparent;
  border-color: transparent;
  text-decoration: underline;
  text-decoration-color: var(--ccm-lime);
  text-decoration-thickness: 3px;
  text-underline-offset: 5px;
}
.ccm-root:not(#_) .ccm-widget--buttons button[data-ccm-modal]:hover {
  background: var(--ccm-mist);
}
@media (min-width: 40em) {
  .ccm-root:not(#_) .ccm-widget--buttons {
    flex-direction: row;
    gap: 10px;
    padding-top: 12px;
  }
  .ccm-root:not(#_) .ccm-widget--buttons button {
    flex: 1 1 0;
  }
  /* CCM19 setzt bis 64em `order: -1 !important` auf Akzeptieren */
  .ccm-root:not(#_) .ccm-widget--buttons button.ccm--button-primary {
    order: 1 !important;
  }
  .ccm-root:not(#_) .ccm-widget--buttons button[data-ccm-modal],
  .ccm-root:not(#_) .ccm-widget--buttons button[data-ccm-modal]:focus,
  .ccm-root:not(#_) .ccm-widget--buttons button[data-ccm-modal]:hover {
    flex: 0 0 auto;
    order: -1;
    min-height: 48px;
  }
}

/* Footer */
.ccm-root:not(#_) .ccm-modal--footer {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 16px;
  margin-top: 12px;
  padding-top: 12px;
  padding-bottom: max(14px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--ccm-line);
}
.ccm-root:not(#_) .ccm-widget .ccm-modal--footer {
  justify-content: center;
}
@media (min-width: 40em) {
  .ccm-root:not(#_) .ccm-widget .ccm-modal--footer {
    justify-content: space-between;
  }
}
.ccm-root:not(#_) .ccm-link-container,
.ccm-root:not(#_) .ccm-powered-by {
  margin: 0;
  padding: 0;
  text-align: center;
}
.ccm-root:not(#_) .ccm-link-container a:link,
.ccm-root:not(#_) .ccm-link-container a:visited,
.ccm-root:not(#_) .ccm-powered-by a:link,
.ccm-root:not(#_) .ccm-powered-by a:visited {
  font-size: 12px;
  color: var(--ccm-ink);
  text-decoration: none;
}
.ccm-root:not(#_) .ccm-powered-by a:link,
.ccm-root:not(#_) .ccm-powered-by a:visited {
  font-size: 11px;
  opacity: 0.7;
}
.ccm-root:not(#_) .ccm-link-container a:hover,
.ccm-root:not(#_) .ccm-powered-by a:hover {
  color: var(--ccm-navy);
  text-decoration: underline;
}

/* Einstellungen & Details: Footer-Buttons als Raster (Handy) bzw. Reihe (Tablet+) */
.ccm-root:not(#_) .ccm-control-panel .ccm-modal--footer,
.ccm-root:not(#_) #ccm-details .ccm-modal--footer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.ccm-root:not(#_) .ccm-control-panel .ccm-modal--footer button,
.ccm-root:not(#_) #ccm-details .ccm-modal--footer button {
  width: 100%;
  max-width: none;
}
.ccm-root:not(#_) .ccm-control-panel .ccm-modal--footer button[data-full-consent] {
  grid-column: 1 / -1;
}
@media (min-width: 40em) {
  .ccm-root:not(#_) .ccm-control-panel .ccm-modal--footer {
    grid-template-columns: auto 1fr 1fr;
  }
  .ccm-root:not(#_) .ccm-control-panel .ccm-modal--footer button[data-full-consent] {
    grid-column: auto;
  }
}

/* Einstellungen: Zwecke als runde Karten, Schalter in Brand-Farben */
.ccm-root:not(#_) .ccm-control-panel .ccm-modal--body {
  overflow-y: auto;
  overscroll-behavior: contain;
}
.ccm-root:not(#_) .ccm-control-panel--purpose {
  position: relative;
  padding: 16px 18px;
  background: var(--ccm-mist);
  border: none;
  border-radius: 20px;
}
.ccm-root:not(#_) .ccm-control-panel--purpose:not(:last-child) {
  margin-bottom: 10px;
}
.ccm-root:not(#_) .ccm-control-panel--purpose > input[type='checkbox'] + label {
  padding-inline-end: 64px;
  font-family: var(--ccm-font-semibold, inherit);
  font-weight: 600;
  font-size: 16px;
  color: var(--ccm-navy);
}
.ccm-root:not(#_) .ccm-control-panel--purpose--description {
  margin-top: 6px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ccm-ink);
}
.ccm-root:not(#_) .ccm-control-panel--purpose input[type='checkbox'].ccm-checkbox-type--switch.ccm-checkbox-align--right {
  top: 30px;
  right: 54px;
  inset-inline-end: 54px;
}
.ccm-root:not(#_) input[type='checkbox'].ccm-checkbox-type--switch + label::before {
  top: 2px;
  width: 44px;
  height: 26px;
  background: #c3ccd1;
  border: none;
  border-radius: 9999px;
}
.ccm-root:not(#_) input[type='checkbox'].ccm-checkbox-type--switch + label::after {
  top: 5px;
  width: 20px;
  height: 20px;
  background: #fff;
  border-radius: 9999px;
  box-shadow: 0 1px 3px rgb(0 25 50 / 0.3);
}
.ccm-root:not(#_) input[type='checkbox'].ccm-checkbox-type--switch.ccm-checkbox-align--right + label::after {
  right: 21px;
  inset-inline-end: 21px;
}
.ccm-root:not(#_) input[type='checkbox'].ccm-checkbox-type--switch:checked.ccm-checkbox-align--right + label::after {
  right: 3px;
  inset-inline-end: 3px;
}
.ccm-root:not(#_) input[type='checkbox'].ccm-checkbox-type--switch:checked + label::before {
  background: var(--ccm-navy);
}
.ccm-root:not(#_) input[type='checkbox'].ccm-checkbox-type--switch:checked + label::after {
  background: var(--ccm-lime);
}
.ccm-root:not(#_) input[type='checkbox'].ccm-checkbox-type--switch:focus-visible + label::before {
  outline: 3px solid var(--ccm-focus);
  outline-offset: 2px;
}
.ccm-root:not(#_) input[type='checkbox'].ccm-checkbox-type--switch[aria-disabled='true']:checked + label::before {
  background: var(--ccm-navy);
  opacity: 0.4;
}
.ccm-root:not(#_) input[type='checkbox'].ccm-checkbox-type--switch[aria-disabled='true']:checked + label::after {
  background: #fff;
}

.ccm-root:not(#_) button.ccm-info-button,
.ccm-root:not(#_) button.ccm-info-button:hover,
.ccm-root:not(#_) button.ccm-info-button:focus {
  width: 28px;
  height: 28px;
  min-height: 0;
  margin-inline-start: 10px;
  padding: 0;
  font-size: 14px;
  color: var(--ccm-navy);
  background: #fff;
  border: none;
  box-shadow: 0 0 0 1.5px var(--ccm-line);
}
.ccm-root:not(#_) button.ccm-info-button:hover {
  background: var(--ccm-lime);
  box-shadow: none;
}
