/**
 * Klaro: Modal muss über .cm-bg liegen, sonst sind keine Klicks möglich.
 * (Ein z-index nur auf .cm-bg ohne höheren Wert auf .cm-modal blockiert alles.)
 */
#klaro,
.klaro {
  position: relative;
  z-index: 20000;
}

.klaro .cookie-notice:not(.cookie-modal-notice),
.klaro .cookie-modal-notice {
  z-index: 20000 !important;
}

.klaro .cookie-modal {
  z-index: 20001 !important;
}

.klaro .cookie-modal .cm-bg {
  z-index: 0 !important;
}

.klaro .cookie-modal .cm-modal.cm-klaro {
  z-index: 2 !important;
  position: fixed !important;
  top: 50% !important;
  left: 50% !important;
  right: auto !important;
  transform: translate(-50%, -50%) !important;
  max-height: 92vh !important;
  overflow: auto !important;
  pointer-events: auto !important;
  isolation: isolate;
}

@media (min-width: 660px) {
  .klaro .cookie-modal .cm-modal.cm-klaro {
    width: min(640px, calc(100vw - 2rem)) !important;
    margin: 0 !important;
  }
}

.klaro .cookie-modal .cm-modal .cm-btn,
.klaro .cookie-modal .cm-modal .cm-list-label,
.klaro .cookie-modal .cm-modal .cm-caret a {
  pointer-events: auto !important;
  cursor: pointer;
}

/* WCAG AA: Cookie-Hinweis auf dunklem Hintergrund (#333) */
.klaro .cookie-notice:not(.cookie-modal-notice) a,
.klaro .cookie-notice:not(.cookie-modal-notice) .cm-link {
  color: #f6ae42 !important;
  text-decoration: underline !important;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}

.klaro .cookie-notice:not(.cookie-modal-notice) a:hover,
.klaro .cookie-notice:not(.cookie-modal-notice) .cm-link:hover {
  color: #fcd34d !important;
}

.klaro .cookie-notice:not(.cookie-modal-notice) .cm-btn.cm-btn-success {
  background-color: #0a5c42 !important;
  color: #ffffff !important;
}

.klaro .cookie-notice:not(.cookie-modal-notice) .cm-btn.cm-btn-danger {
  background-color: #8b2e2e !important;
  color: #ffffff !important;
}

.klaro .cookie-notice:not(.cookie-modal-notice) .cm-btn:not(.cm-btn-success):not(.cm-btn-danger) {
  background-color: #4a4a4a !important;
  color: #ffffff !important;
}
