/* Cookie-Consent-Banner (Markup: includes/cookie_banner.inc.php, Logik: cookie-consent_MGYF.js)
   Der Banner traegt selbst die Klasse .ccm-page, damit die Novopress-Styles
   (Inter, .button.button-primary, Checkboxen) greifen. Leiste am unteren Rand, kein Overlay. */

#cookie-consent.cookie-consent {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2000; /* ueber #customModalOverlay (1050) */
  max-height: 60vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background-color: #3e5c58;
  color: #ffffff;
  border-top: 4px solid #d9000d;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.35);
  font-size: 15px;
  line-height: 1.5;
}

#cookie-consent.cookie-consent[hidden] {
  display: none;
}

#cookie-consent.cookie-consent:focus {
  outline: none;
}

#cookie-consent .cookie-consent-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 20px 24px;
  display: flex;
  align-items: flex-end;
  gap: 24px 40px;
}

#cookie-consent .cookie-consent-content {
  flex: 1 1 auto;
  min-width: 0;
}

#cookie-consent .cookie-consent-title {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 6px;
}

#cookie-consent .cookie-consent-text {
  font-size: 15px;
  font-weight: 300;
  line-height: 1.5;
  margin: 0;
}

#cookie-consent a {
  color: #ffffff;
  text-decoration: underline;
}

#cookie-consent a:hover,
#cookie-consent a:focus {
  color: #ffffff;
  text-decoration: none;
}

/* Einstellungen */
#cookie-consent .cookie-consent-settings {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.3);
}

#cookie-consent .cookie-consent-settings[hidden] {
  display: none;
}

#cookie-consent .cookie-consent-option {
  align-items: flex-start;
  margin-bottom: 12px;
}

/* Checkbox: weisser Rahmen auf dunklem Grund, rotes Quadrat mittig (ueberschreibt die Site-Varianten) */
#cookie-consent .cookie-consent-option input[type="checkbox"],
#cookie-consent .cookie-consent-option input[type="checkbox"]:hover,
#cookie-consent .cookie-consent-option input[type="checkbox"]:focus,
#cookie-consent .cookie-consent-option input[type="checkbox"]:active,
#cookie-consent .cookie-consent-option input[type="checkbox"]:checked {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  min-width: 24px;
  min-height: 24px;
  margin-top: 0;
  padding: 0;
  border: 2px solid #ffffff;
  background: #243f3f;
}

#cookie-consent .cookie-consent-option input[type="checkbox"]:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}

#cookie-consent .cookie-consent-option input[type="checkbox"]:checked:after {
  content: " ";
  top: 50%;
  left: 50%;
  width: 12px;
  height: 12px;
  transform: translate(-50%, -50%);
  background: #d9000d;
}

/* "Notwendig": immer aktiv, nur abgeschwaecht statt grauem Site-Disabled-Look */
#cookie-consent .cookie-consent-option input[type="checkbox"][disabled],
#cookie-consent .cookie-consent-option input[type="checkbox"][disabled]:hover,
#cookie-consent .cookie-consent-option input[type="checkbox"][disabled]:focus,
#cookie-consent .cookie-consent-option input[type="checkbox"][disabled]:checked {
  border-color: #ffffff;
  background: #243f3f;
  opacity: 0.6;
  cursor: default;
}

#cookie-consent .cookie-consent-option input[type="checkbox"][disabled]:checked:after {
  background: #d9000d;
}

#cookie-consent .cookie-consent-option label {
  color: #ffffff;
  font-size: 15px;
  font-weight: 600;
}

#cookie-consent .cookie-consent-option input[type="checkbox"][disabled] + label {
  color: #ffffff;
  cursor: default;
}

#cookie-consent .cookie-consent-option-desc {
  display: block;
  font-weight: 300;
}

#cookie-consent .cookie-consent-save-wrap {
  margin-top: 4px;
}

/* Buttons: "Ablehnen" und "Alle akzeptieren" gleich gross und gleich gestaltet (DSK) */
#cookie-consent .cookie-consent-actions {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 12px 24px;
}

/* Schraege Kante absolut am rechten Rand, damit sie bei zentriertem Text nicht mitwandert */
#cookie-consent .cookie-consent-btn {
  min-width: 200px;
  padding: 13px 15px 13px 20px;
  justify-content: center;
  font-family: 'Inter', sans-serif;
  margin: 0;
}

#cookie-consent .cookie-consent-btn:after {
  position: absolute;
  top: -1px;
  right: -6px;
  height: 48px;
}

#cookie-consent .cookie-consent-btn:focus-visible,
#cookie-consent .cookie-consent-link:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 3px;
}

/* "Auswahl speichern": weiss mit roter Schrift, Hover rot */
#cookie-consent .cookie-consent-btn-secondary {
  background: #ffffff;
  border-color: #ffffff;
  color: #d9000d;
}

#cookie-consent .cookie-consent-btn-secondary:after {
  background: #ffffff;
  border-color: #ffffff;
}

#cookie-consent .cookie-consent-btn-secondary:hover {
  background: #d9000d;
  border-color: #d9000d;
  color: #ffffff;
}

#cookie-consent .cookie-consent-btn-secondary:hover:after {
  background: #d9000d;
  border-color: #d9000d;
}

#cookie-consent .cookie-consent-link {
  background: none;
  border: 0;
  padding: 4px 0;
  margin: 0;
  color: #ffffff;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}

#cookie-consent .cookie-consent-link:hover {
  text-decoration: none;
}

/* Mobil / Tablet: Buttons untereinander */
@media (max-width: 991px) {
  #cookie-consent .cookie-consent-inner {
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
    gap: 16px;
  }

  #cookie-consent .cookie-consent-title {
    font-size: 16px;
  }

  #cookie-consent .cookie-consent-text {
    font-size: 14px;
  }
}

@media (max-width: 575px) {
  /* Platz fuer die absolut positionierte schraege Kante, kein horizontaler Ueberlauf */
  #cookie-consent .cookie-consent-actions,
  #cookie-consent .cookie-consent-save-wrap {
    padding-right: 6px;
  }

  #cookie-consent .cookie-consent-actions {
    flex-direction: column;
    align-items: stretch;
  }

  #cookie-consent .cookie-consent-btn {
    width: 100%;
    min-width: 0;
  }

  #cookie-consent .cookie-consent-link {
    align-self: center;
  }
}
