/* =========================================
   Banner Grundlayout
========================================= */
#consent-banner {
  position: fixed;
  bottom: 20px;
  right: -380px;
  max-width: var(--banner-width, 340px);
  padding: 20px;
  background: var(--banner-bg, #202020bb);
  color: var(--banner-text, #f5f5f5);
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.6);
  font-family: system-ui, sans-serif;
  z-index: 999999;
  transition: right 0.4s ease, left 0.4s ease;
  font-size: var(--body-font-size, 14px);
}


/* sichtbar / versteckt */
#consent-banner.show {
  right: 20px;
}

#consent-banner.hide {
  right: -380px;
}

/* Banner links-Variante */
#consent-banner.position-left {
  left: -380px;
  right: auto;
}

#consent-banner.position-left.show {
  left: 20px;
}

#consent-banner.position-left.hide {
  left: -380px;
}

/* Dark/Light/Auto Themes (Light vor allem relevant, wenn du Farben nicht überschreibst) */
#consent-banner.theme-light {
  --banner-bg: #ffffffee;
  --banner-text: #202020;
}

#consent-banner.theme-dark {
  /* nutzt die gesetzten Variablen, Default ist dunkel */
}

@media (prefers-color-scheme: dark) {
  #consent-banner.theme-auto {
    --banner-bg: #202020ee;
    --banner-text: #f5f5f5;
  }
}

@media (prefers-color-scheme: light) {
  #consent-banner.theme-auto {
    --banner-bg: #ffffffee;
    --banner-text: #202020;
  }
}

/* Inhalte */
#consent-content h3 {
  margin: 0 0 8px;
  font-size: var(--title-font-size, 16px);
  font-weight: 600;
}

#consent-content p {
  margin: 0 0 10px;
  line-height: 1.4;
}

/* Kategorien */
#consent-categories {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

#consent-categories .consent-item {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: 13px;
}

#consent-categories .consent-item input {
  margin-top: 3px;
}

.consent-title {
  font-weight: 600;
  display: block;
}

.consent-desc {
  opacity: 0.85;
}

/* Buttons */
#consent-actions {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

/* Button-Reset + Basis */
#consent-actions button {
  all: unset;
  display: inline-block;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  font-family: inherit;
  text-align: center;
  user-select: none;
}

/* Button-Farben über Variablen */
#consent-actions .primary {
  background: var(--btn-primary-bg, #0a84ff);
  color: var(--btn-primary-text, #ffffff);
}

#consent-actions .primary:hover {
  filter: brightness(0.93);
}

#consent-actions .secondary {
  background: var(--btn-secondary-bg, #333333);
  color: var(--btn-secondary-text, #f5f5f5);
}

#consent-actions .secondary:hover {
  filter: brightness(1.15);
}

#consent-actions .ghost {
  background: transparent;
  border: 1px solid var(--btn-ghost-border, #444444);
  color: var(--btn-ghost-text, #dddddd);
}

#consent-actions .ghost:hover {
  border-color: #666;
}

/* Footer-Links (Impressum / Datenschutz) */
#consent-footer-links {
  margin-top: 10px;
  font-size: 11px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  opacity: 0.85;
}

#consent-footer-links a {
  color: inherit;
  text-decoration: underline;
}

#consent-footer-links a:hover {
  opacity: 1;
}

/* =========================================
   Reiter / Tab (Standard: rechts)
========================================= */
#consent-tab {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 45px;
  height: 30px;
  background: #000;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999998;
  opacity: 0;
  overflow: hidden;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

#consent-tab img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#consent-tab.show {
  opacity: 0.6;
  transform: scale(0.5);
}

#consent-tab.hidden {
  opacity: 0;
  pointer-events: none;
}

#consent-tab:hover {
  opacity: 1;
  transform: scale(1.5);
}

/* Reiter links */
#consent-tab.position-left {
  left: 20px;
  right: auto;
}

/* =========================================
   Fix: Checkbox / Layout / Themes von WP
========================================= */

#consent-categories input[type="checkbox"] {
  appearance: auto !important;
  -webkit-appearance: auto !important;
  -moz-appearance: auto !important;
  width: 16px !important;
  height: 16px !important;
  margin: 3px 6px 0 0 !important;
  accent-color: #0a84ff !important;
}

#consent-categories .consent-item {
  display: flex !important;
  flex-direction: row !important;
  align-items: flex-start !important;
  gap: 8px !important;
}

#consent-categories .consent-title,
#consent-categories .consent-desc {
  line-height: 1.35 !important;
}

/* =========================================
   Optional: ReCAPTCHA / WPForms blockieren,
   solange "Funktional" nicht erlaubt ist
   (per JS-Klasse auf <html>)
========================================= */

/* Beispiel: reCAPTCHA Badge verstecken */
html:not(.consent-functional-allowed) .grecaptcha-badge {
  display: none !important;
}

