/* ============================================================
   Clean Revolution — Cookie-Consent-Banner
   TTDSG §25 / DSGVO-konform: Opt-in, gleichwertige Buttons,
   granulare Einstellungen, jederzeit widerrufbar.
   ============================================================ */

#cr-consent-banner,
#cr-consent-modal {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Footer-Link "Cookie-Einstellungen" — soll wie die Impressum/Datenschutz-Links wirken */
.footer-cookie-btn {
  background: none; border: none; padding: 0; margin: 0;
  font: inherit; color: inherit; cursor: pointer;
  text-decoration: none;
}
.footer-cookie-btn:hover { text-decoration: underline; }

/* ---------- Banner (unten, über gesamte Breite) ---------- */
#cr-consent-banner {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 1000;
  background: #fff;
  border-top: 1px solid var(--border, #e2e8e2);
  box-shadow: 0 -8px 32px rgba(0,0,0,0.12);
  padding: 20px 24px;
  transform: translateY(0);
  transition: transform .3s ease;
}
#cr-consent-banner[hidden] { display: none; }

.cr-consent-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; gap: 24px; flex-wrap: wrap;
}
.cr-consent-text {
  flex: 1 1 380px;
  font-size: 0.88rem; line-height: 1.55;
  color: var(--muted, #5c6b5c);
}
.cr-consent-text strong { color: var(--fg, #0a0f0a); }
.cr-consent-text a { color: var(--accent, #16a34a); text-decoration: underline; }

.cr-consent-actions {
  display: flex; gap: 10px; flex-wrap: wrap; flex-shrink: 0;
}

/* Beide Hauptaktionen (Ablehnen / Akzeptieren) bewusst gleichwertig:
   gleiche Größe, gleiches Padding, gleiche Schriftstärke. */
.cr-btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 20px; border-radius: 999px;
  font-weight: 600; font-size: 0.88rem; font-family: inherit;
  cursor: pointer; transition: all .15s; border: 1.5px solid transparent;
  white-space: nowrap;
}
.cr-btn-reject {
  background: #fff; border-color: var(--border, #e2e8e2); color: var(--fg, #0a0f0a);
}
.cr-btn-reject:hover { border-color: var(--fg, #0a0f0a); }
.cr-btn-accept {
  background: var(--fg, #0a0f0a); color: #fff;
}
.cr-btn-accept:hover { background: var(--accent-dark, #15803d); }
.cr-btn-settings {
  background: transparent; color: var(--muted, #5c6b5c);
  text-decoration: underline; padding: 12px 8px;
}
.cr-btn-settings:hover { color: var(--fg, #0a0f0a); }

@media (max-width: 700px) {
  .cr-consent-inner { flex-direction: column; align-items: stretch; }
  .cr-consent-actions { justify-content: stretch; }
  .cr-consent-actions .cr-btn { flex: 1 1 auto; }
}

/* ---------- Einstellungen-Modal ---------- */
#cr-consent-modal {
  position: fixed; inset: 0; z-index: 1001;
  background: rgba(10,15,10,0.5);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
#cr-consent-modal[hidden] { display: none; }

.cr-modal-box {
  background: #fff; border-radius: var(--radius, 12px);
  max-width: 560px; width: 100%;
  max-height: 88vh; overflow-y: auto;
  padding: 32px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.3);
}
.cr-modal-box h2 { font-size: 1.25rem; font-weight: 800; margin-bottom: 8px; color: var(--fg, #0a0f0a); }
.cr-modal-box > p { font-size: 0.88rem; color: var(--muted, #5c6b5c); margin-bottom: 24px; line-height: 1.55; }
.cr-modal-box > p a { color: var(--accent, #16a34a); }

.cr-category {
  border: 1px solid var(--border, #e2e8e2); border-radius: 10px;
  padding: 16px 18px; margin-bottom: 14px;
}
.cr-category-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-bottom: 6px;
}
.cr-category-head strong { font-size: 0.95rem; color: var(--fg, #0a0f0a); }
.cr-category p { font-size: 0.82rem; color: var(--muted, #5c6b5c); line-height: 1.5; }
.cr-category-locked { font-size: 0.75rem; color: var(--muted, #5c6b5c); font-weight: 600; }

/* Toggle-Switch */
.cr-switch {
  position: relative; display: inline-block; width: 42px; height: 24px; flex-shrink: 0;
}
.cr-switch input { opacity: 0; width: 0; height: 0; }
.cr-switch-track {
  position: absolute; inset: 0; background: var(--border, #e2e8e2);
  border-radius: 999px; transition: background .2s; cursor: pointer;
}
.cr-switch-track::before {
  content: ''; position: absolute; left: 3px; top: 3px;
  width: 18px; height: 18px; border-radius: 50%; background: #fff;
  transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
.cr-switch input:checked + .cr-switch-track { background: var(--accent, #16a34a); }
.cr-switch input:checked + .cr-switch-track::before { transform: translateX(18px); }
.cr-switch input:disabled + .cr-switch-track { background: var(--accent, #16a34a); opacity: 0.55; cursor: not-allowed; }

.cr-modal-actions {
  display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; flex-wrap: wrap;
}
