/* ── Cookie-Banner im Dashboard-Design ──────────────────────────────────────
   Struktur/Klassen aus clients/AF/custom-cookie-banner-standalone
   (ccbs/assets/css/ccb-style.css), optisch auf mein.radontec.de umgestellt:
   Figtree, RadonTec-Rot, Buttons/Karten wie assets/css/dashboard.css.
   Eigene --ccb-Variablen, damit der Banner auch auf Seiten ohne
   dashboard.css (Login, Registrierung) identisch aussieht. */

:root {
  --ccb-font:      'Figtree', system-ui, sans-serif;
  --ccb-red:       #b70e0c;
  --ccb-red-dark:  #8c0a09;
  --ccb-red-soft:  #fef2f2;
  --ccb-text:      #111827;
  --ccb-text-2:    #1f2937;
  --ccb-muted:     #6b7280;
  --ccb-border:    #e5e7eb;
  --ccb-soft:      #f6f6f6;
  --ccb-radius:    16px;
  --ccb-shadow:    0 24px 60px -12px rgba(17, 24, 39, 0.30);
  --ccb-z:         9000;
}

/* ── Banner ─────────────────────────────────────────────────────────────── */
.ccb-banner {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  width: min(640px, calc(100vw - 32px));
  background: #fff;
  border: 1px solid var(--ccb-border);
  border-radius: var(--ccb-radius);
  box-shadow: var(--ccb-shadow);
  padding: 22px 24px 20px;
  z-index: var(--ccb-z);
  font-family: var(--ccb-font);
  color: var(--ccb-text);
  animation: ccb-slide-up 0.3s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
@keyframes ccb-slide-up {
  from { opacity: 0; transform: translateX(-50%) translateY(16px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.ccb-banner-inner { display: flex; flex-direction: column; gap: 16px; }

.ccb-banner-text strong {
  display: block;
  font-size: 15.5px; font-weight: 600; letter-spacing: -0.01em;
  margin-bottom: 5px;
  color: var(--ccb-text);
}
.ccb-banner-text p {
  margin: 0;
  font-size: 13.5px; line-height: 1.55;
  color: var(--ccb-muted);
}

.ccb-banner-buttons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

/* ── Buttons (wie .btn-primary / .btn-secondary im Dashboard) ───────────── */
.ccb-btn {
  font-family: var(--ccb-font);
  font-size: 13.5px; font-weight: 600;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  text-align: center;
  line-height: 1.2;
  width: 100%;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.ccb-btn-primary { background: var(--ccb-red); color: #fff; }
.ccb-btn-primary:hover { background: var(--ccb-red-dark); }

.ccb-btn-secondary,
.ccb-btn-ghost {
  background: #fff;
  color: var(--ccb-text-2);
  border-color: var(--ccb-border);
}
.ccb-btn-secondary:hover,
.ccb-btn-ghost:hover { background: #f9fafb; border-color: #d1d5db; }
.ccb-btn:focus-visible { outline: 2px solid var(--ccb-red); outline-offset: 2px; }

/* ── Overlay + Modal (wie .modal im Dashboard) ──────────────────────────── */
.ccb-overlay {
  position: fixed; inset: 0;
  background: rgba(17, 24, 39, 0.48);
  backdrop-filter: blur(2px);
  z-index: calc(var(--ccb-z) + 1);
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  font-family: var(--ccb-font);
  animation: ccb-fade-in 0.15s ease both;
}
@keyframes ccb-fade-in { from { opacity: 0; } to { opacity: 1; } }

.ccb-modal {
  background: #fff;
  border-radius: var(--ccb-radius);
  width: min(620px, 100%);
  max-height: min(680px, 90vh);
  display: flex; flex-direction: column;
  box-shadow: var(--ccb-shadow);
  overflow: hidden;
  color: var(--ccb-text);
  animation: ccb-modal-in 0.18s ease both;
}
@keyframes ccb-modal-in {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.ccb-modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px 14px;
  border-bottom: 1px solid var(--ccb-border);
  flex-shrink: 0;
}
.ccb-modal-title {
  margin: 0;
  font-size: 17px; font-weight: 600; letter-spacing: -0.01em;
  color: var(--ccb-text);
}
.ccb-close-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px;
  background: transparent; border: none; border-radius: 6px;
  color: var(--ccb-muted); cursor: pointer;
  transition: background 0.12s, color 0.12s;
}
.ccb-close-btn:hover { background: #f3f4f6; color: var(--ccb-text); }
.ccb-close-btn svg { width: 14px; height: 14px; }

/* ── Tabs (wie .settings-tab) ───────────────────────────────────────────── */
.ccb-tabs {
  display: flex; gap: 4px;
  border-bottom: 1px solid var(--ccb-border);
  padding: 0 20px;
  flex-shrink: 0;
}
.ccb-tab {
  background: none; border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  padding: 11px 12px;
  font-family: var(--ccb-font);
  font-size: 13.5px; font-weight: 500;
  color: var(--ccb-muted);
  cursor: pointer;
  transition: color 0.12s, border-color 0.12s;
}
.ccb-tab:hover { color: var(--ccb-text-2); }
.ccb-tab.active { color: var(--ccb-red); border-bottom-color: var(--ccb-red); font-weight: 600; }

.ccb-tab-pane { display: none; overflow-y: auto; flex: 1; padding: 8px 24px 16px; }
.ccb-tab-pane.active { display: block; }

/* ── Kategorien ─────────────────────────────────────────────────────────── */
.ccb-cat { border-bottom: 1px solid #f1f2f4; }
.ccb-cat:last-child { border-bottom: none; }

.ccb-cat-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 14px 0;
}
.ccb-cat-toggle {
  flex: 1;
  display: flex; align-items: center; gap: 8px;
  background: none; border: none; padding: 0;
  font-family: var(--ccb-font);
  font-size: 14px; font-weight: 600;
  color: var(--ccb-text);
  text-align: left; cursor: pointer;
}
.ccb-cat-toggle:hover { color: var(--ccb-red); }
.ccb-cat-count { font-weight: 400; font-size: 13px; color: var(--ccb-muted); }
.ccb-chevron { flex-shrink: 0; color: #9ca3af; transition: transform 0.2s; }
.ccb-cat-toggle[aria-expanded="true"] .ccb-chevron { transform: rotate(180deg); }

.ccb-cat-body { padding-bottom: 14px; }
.ccb-cat-desc { margin: 0 0 10px; font-size: 13px; line-height: 1.55; color: var(--ccb-muted); }

.ccb-cookie-item {
  padding: 10px 12px;
  background: var(--ccb-soft);
  border: 1px solid var(--ccb-border);
  border-radius: 8px;
  margin-bottom: 8px;
}
.ccb-cookie-item:last-child { margin-bottom: 0; }
.ccb-cookie-item strong { display: block; font-size: 13px; font-weight: 600; color: var(--ccb-text); margin-bottom: 2px; }
.ccb-cookie-item p { margin: 0; font-size: 12.5px; line-height: 1.5; color: var(--ccb-muted); }

/* ── Schalter ───────────────────────────────────────────────────────────── */
.ccb-switch { position: relative; display: inline-flex; align-items: center; cursor: pointer; flex-shrink: 0; }
.ccb-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.ccb-track {
  position: relative; display: block;
  width: 40px; height: 22px;
  background: #d1d5db;
  border-radius: 11px;
  transition: background 0.2s;
}
.ccb-thumb {
  position: absolute; top: 3px; left: 3px;
  width: 16px; height: 16px;
  background: #fff; border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s;
}
.ccb-switch input:checked ~ .ccb-track { background: var(--ccb-red); }
.ccb-switch input:checked ~ .ccb-track .ccb-thumb { transform: translateX(18px); }
.ccb-switch input:focus-visible ~ .ccb-track { outline: 2px solid var(--ccb-red); outline-offset: 2px; }
.ccb-switch-locked { cursor: not-allowed; }
.ccb-switch-locked .ccb-track,
.ccb-switch-locked input:checked ~ .ccb-track { background: #e8a3a2; }

/* ── Über Cookies ───────────────────────────────────────────────────────── */
.ccb-about { padding-top: 8px; }
.ccb-about h3 { font-size: 14px; font-weight: 600; margin: 16px 0 5px; color: var(--ccb-text); }
.ccb-about h3:first-child { margin-top: 0; }
.ccb-about p { margin: 0 0 8px; font-size: 13px; line-height: 1.6; color: var(--ccb-muted); }

/* ── Footer ─────────────────────────────────────────────────────────────── */
.ccb-modal-footer {
  display: flex; justify-content: flex-end; gap: 10px;
  padding: 16px 24px;
  border-top: 1px solid #f1f2f4;
  flex-shrink: 0;
}
.ccb-modal-footer .ccb-btn { width: auto; }

body.ccb-no-scroll { overflow: hidden; }

/* ── Handy ──────────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .ccb-banner {
    bottom: 0; left: 0; right: 0;
    width: 100%;
    transform: none;
    border-radius: var(--ccb-radius) var(--ccb-radius) 0 0;
    border-bottom: none;
    padding: 18px 16px calc(16px + env(safe-area-inset-bottom));
    animation-name: ccb-slide-up-m;
  }
  @keyframes ccb-slide-up-m {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
  }
  .ccb-banner-buttons { grid-template-columns: 1fr; }
  .ccb-modal-footer { flex-direction: column-reverse; }
  .ccb-modal-footer .ccb-btn { width: 100%; }
}
