/* ============================================================
   Cookie Banner — CI-Variablen hier anpassen
   ============================================================ */
:root {
  --cb-bg: #01071A;
  --cb-bg-elevated: #0A1330;
  --cb-accent: #DCBB6B;
  --cb-accent-start: #F6D49E;
  --cb-accent-end: #A27E45;
  --cb-text: #FFFFFF;
  --cb-text-muted: #AEB4C7;
  --cb-border: rgba(220, 187, 107, 0.25);
  --cb-radius: 12px;
  --cb-radius-btn: 8px;
}

/* ============================================================
   Backdrop (blurs the page behind the banner)
   ============================================================ */
#cb-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  background: rgba(0, 0, 0, 0.45);
  z-index: 9998;
}

#cb-backdrop.cb-visible {
  display: block;
}

/* ============================================================
   Main Banner (bottom bar)
   ============================================================ */
#cb-banner {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--cb-bg);
  border-top: 1px solid var(--cb-border);
  padding: 20px 32px;
  z-index: 9999;
  font-family: inherit;
}

#cb-banner.cb-visible {
  display: block;
}

.cb-banner-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.cb-banner-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--cb-text);
  margin: 0 0 8px 0;
}

.cb-banner-text {
  font-size: 13px;
  color: var(--cb-text-muted);
  margin: 0 0 12px 0;
  line-height: 1.6;
}

.cb-banner-links {
  margin-bottom: 20px;
}

.cb-banner-links a {
  font-size: 13px;
  color: var(--cb-accent);
  text-decoration: none;
  margin-right: 16px;
}

.cb-banner-links a:hover {
  text-decoration: underline;
}

.cb-banner-actions {
  display: flex;
  align-items: center;
  gap: 28px;
}

/* Text-only buttons (Mehr erfahren, Ablehnen) */
.cb-btn-text {
  background: none;
  border: none;
  padding: 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--cb-text-muted);
  cursor: pointer;
  transition: color 0.15s ease;
  font-family: inherit;
}

.cb-btn-text:hover {
  color: var(--cb-text);
}

/* Primary button (Zustimmen) */
.cb-btn-primary {
  background: linear-gradient(135deg, var(--cb-accent-start) 0%, var(--cb-accent-end) 100%);
  border: none;
  border-radius: 50px;
  padding: 10px 28px;
  font-size: 14px;
  font-weight: 600;
  color: #01071A;
  cursor: pointer;
  transition: opacity 0.15s ease;
  font-family: inherit;
  margin-left: auto;
}

.cb-btn-primary:hover {
  opacity: 0.88;
}

/* ============================================================
   Settings Modal
   ============================================================ */
#cb-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10000;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

#cb-modal.cb-visible {
  display: flex;
}

.cb-modal-box {
  background: var(--cb-bg-elevated);
  border: 1px solid var(--cb-border);
  border-radius: var(--cb-radius);
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 32px;
  position: relative;
}

.cb-modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  color: var(--cb-text-muted);
  font-size: 20px;
  cursor: pointer;
  line-height: 1;
  padding: 4px;
  font-family: inherit;
}

.cb-modal-close:hover {
  color: var(--cb-text);
}

.cb-modal-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--cb-text);
  margin: 0 0 12px 0;
}

.cb-modal-text {
  font-size: 13px;
  color: var(--cb-text-muted);
  line-height: 1.6;
  margin: 0 0 12px 0;
}

.cb-modal-links {
  margin-bottom: 24px;
}

.cb-modal-links a {
  font-size: 13px;
  color: var(--cb-accent);
  text-decoration: none;
  margin-right: 16px;
}

.cb-modal-links a:hover {
  text-decoration: underline;
}

.cb-modal-section-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--cb-text);
  margin: 0 0 16px 0;
}

/* Category rows */
.cb-category {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 16px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  gap: 16px;
}

.cb-category-info {
  flex: 1;
}

.cb-category-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--cb-text);
  margin-bottom: 4px;
}

.cb-category-desc {
  font-size: 12px;
  color: var(--cb-text-muted);
  line-height: 1.5;
}

/* Toggle switch */
.cb-toggle {
  position: relative;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
  margin-top: 2px;
}

.cb-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.cb-toggle-track {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 50px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.cb-toggle input:checked + .cb-toggle-track {
  background: linear-gradient(135deg, var(--cb-accent-start) 0%, var(--cb-accent-end) 100%);
}

.cb-toggle input:disabled + .cb-toggle-track {
  cursor: not-allowed;
  opacity: 0.7;
}

.cb-toggle-track::after {
  content: '';
  position: absolute;
  left: 3px;
  top: 3px;
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s ease;
}

.cb-toggle input:checked + .cb-toggle-track::after {
  transform: translateX(20px);
}

/* Modal action buttons */
.cb-modal-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.cb-modal-btn-text {
  background: none;
  border: none;
  padding: 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--cb-text-muted);
  cursor: pointer;
  transition: color 0.15s ease;
  font-family: inherit;
}

.cb-modal-btn-text:hover {
  color: var(--cb-text);
}

.cb-modal-btn-outline {
  background: none;
  border: 1px solid var(--cb-border);
  border-radius: var(--cb-radius-btn);
  padding: 9px 20px;
  font-size: 13px;
  font-weight: 500;
  color: var(--cb-text);
  cursor: pointer;
  transition: border-color 0.15s ease;
  font-family: inherit;
}

.cb-modal-btn-outline:hover {
  border-color: var(--cb-accent);
}

.cb-modal-btn-primary {
  background: linear-gradient(135deg, var(--cb-accent-start) 0%, var(--cb-accent-end) 100%);
  border: none;
  border-radius: 50px;
  padding: 10px 24px;
  font-size: 13px;
  font-weight: 600;
  color: #01071A;
  cursor: pointer;
  transition: opacity 0.15s ease;
  font-family: inherit;
  margin-left: auto;
}

.cb-modal-btn-primary:hover {
  opacity: 0.88;
}

/* ============================================================
   Footer hint
   ============================================================ */
.cb-hint {
  font-size: 11px;
  color: var(--cb-text-muted);
  margin-top: 16px;
}

/* ============================================================
   Floating re-open button (bottom-left after consent)
   ============================================================ */
#cb-reopen {
  display: none;
  position: fixed;
  bottom: 16px;
  left: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--cb-bg-elevated);
  border: 1px solid var(--cb-border);
  cursor: pointer;
  z-index: 9990;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s ease;
}

#cb-reopen.cb-visible {
  display: flex;
}

#cb-reopen:hover {
  border-color: var(--cb-accent);
}

#cb-reopen svg {
  width: 16px;
  height: 16px;
  fill: var(--cb-accent);
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 600px) {
  #cb-banner {
    padding: 16px 20px;
  }

  .cb-banner-actions {
    flex-wrap: wrap;
    gap: 16px;
  }

  .cb-btn-primary {
    margin-left: 0;
    width: 100%;
    text-align: center;
  }

  .cb-modal-box {
    padding: 24px 20px;
  }

  .cb-modal-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .cb-modal-btn-primary {
    margin-left: 0;
    text-align: center;
  }
}
