/* ── Cookie banner & settings modal ────────────────────────
   DSGVO-konform: Opt-in, Google Consent Mode v2 kompatibel.
   Dark-on-cream, matched to Blatt & Blüte brand tokens. */

#cc-banner, #cc-modal-backdrop { font-family: 'Plus Jakarta Sans', system-ui, sans-serif; }

/* Banner */
#cc-banner {
  position: fixed;
  left: 1.25rem; right: 1.25rem; bottom: 1.25rem;
  z-index: 9999;
  max-width: 520px;
  background: #1A1714;
  color: #FDFBF7;
  border: 1px solid rgba(197,180,154,0.18);
  border-radius: 1.5rem;
  padding: 1.75rem;
  box-shadow: 0 24px 60px rgba(26,23,20,0.35), inset 0 1px 0 rgba(255,255,255,0.05);
  transform: translateY(130%);
  opacity: 0;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.5s;
}
#cc-banner.cc-visible { transform: translateY(0); opacity: 1; }

#cc-banner h2 {
  font-family: 'Instrument Serif', Georgia, serif;
  font-weight: 500;
  font-size: 1.3rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 0.625rem;
  color: #FDFBF7;
}
#cc-banner p {
  font-size: 0.875rem;
  font-weight: 300;
  line-height: 1.65;
  color: rgba(197,180,154,0.7);
  margin: 0 0 1.25rem;
}
#cc-banner p a {
  color: #C5B49A;
  text-decoration: underline;
  text-underline-offset: 3px;
}
#cc-banner p a:hover { color: #FDFBF7; }

#cc-banner .cc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
#cc-banner button {
  flex: 1 1 auto;
  min-width: 120px;
  padding: 0.75rem 1.125rem;
  border-radius: 100px;
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.3s, transform 0.3s, border-color 0.3s;
}
#cc-banner .cc-btn-accept {
  background: #FDFBF7;
  color: #1A1714;
}
#cc-banner .cc-btn-accept:hover { background: #EDE4D8; transform: translateY(-1px); }
#cc-banner .cc-btn-reject {
  background: transparent;
  color: #FDFBF7;
  border-color: rgba(197,180,154,0.25);
}
#cc-banner .cc-btn-reject:hover { border-color: rgba(197,180,154,0.5); }
#cc-banner .cc-btn-settings {
  background: transparent;
  color: rgba(197,180,154,0.75);
  border: none;
  flex: 0 0 auto;
  min-width: auto;
  padding: 0.75rem 0.5rem;
  text-decoration: underline;
  text-underline-offset: 3px;
}
#cc-banner .cc-btn-settings:hover { color: #FDFBF7; }

/* Modal */
#cc-modal-backdrop {
  position: fixed; inset: 0; z-index: 10000;
  background: rgba(26,23,20,0.7);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  padding: 1.25rem;
  opacity: 0; pointer-events: none;
  transition: opacity 0.35s;
}
#cc-modal-backdrop.cc-visible { opacity: 1; pointer-events: auto; }

#cc-modal {
  background: #FDFBF7;
  color: #1A1714;
  border-radius: 1.75rem;
  max-width: 520px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2rem;
  box-shadow: 0 30px 80px rgba(26,23,20,0.35);
  transform: scale(0.96);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
#cc-modal-backdrop.cc-visible #cc-modal { transform: scale(1); }

#cc-modal h2 {
  font-family: 'Instrument Serif', Georgia, serif;
  font-weight: 500;
  font-size: 1.6rem;
  letter-spacing: -0.02em;
  margin: 0 0 0.5rem;
}
#cc-modal > p {
  font-size: 0.875rem;
  font-weight: 300;
  line-height: 1.65;
  color: #7A7068;
  margin: 0 0 1.5rem;
}

.cc-category {
  padding: 1rem 0;
  border-top: 1px solid #EDE4D8;
}
.cc-category:last-of-type { border-bottom: 1px solid #EDE4D8; margin-bottom: 1.5rem; }
.cc-cat-head {
  display: flex; justify-content: space-between; align-items: center;
  gap: 1rem;
}
.cc-cat-head h3 {
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  color: #1A1714;
  margin: 0;
}
.cc-category p {
  font-size: 0.8125rem;
  font-weight: 300;
  color: #7A7068;
  line-height: 1.6;
  margin: 0.5rem 0 0;
}
.cc-category .cc-locked {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #8B7355;
  font-weight: 600;
}

/* Toggle */
.cc-toggle {
  position: relative;
  width: 40px; height: 22px;
  flex-shrink: 0;
}
.cc-toggle input { opacity: 0; width: 0; height: 0; }
.cc-toggle .cc-slider {
  position: absolute; inset: 0;
  background: #C5B49A;
  border-radius: 22px;
  transition: background 0.25s;
  cursor: pointer;
}
.cc-toggle .cc-slider::before {
  content: '';
  position: absolute;
  top: 3px; left: 3px;
  width: 16px; height: 16px;
  background: #FDFBF7;
  border-radius: 50%;
  transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}
.cc-toggle input:checked + .cc-slider { background: #8B7355; }
.cc-toggle input:checked + .cc-slider::before { transform: translateX(18px); }

#cc-modal .cc-actions {
  display: flex; flex-wrap: wrap; gap: 0.5rem;
}
#cc-modal .cc-actions button {
  flex: 1 1 auto;
  min-width: 140px;
  padding: 0.75rem 1.125rem;
  border-radius: 100px;
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.3s, transform 0.3s;
}
#cc-modal .cc-btn-save {
  background: #1A1714;
  color: #FDFBF7;
}
#cc-modal .cc-btn-save:hover { background: #2E2A26; transform: translateY(-1px); }
#cc-modal .cc-btn-accept {
  background: #FDFBF7;
  color: #1A1714;
  border-color: rgba(139,115,85,0.25);
}
#cc-modal .cc-btn-accept:hover { background: #EDE4D8; }

@media (max-width: 600px) {
  #cc-banner { left: 0.75rem; right: 0.75rem; bottom: 0.75rem; padding: 1.375rem; }
  #cc-banner .cc-actions button { min-width: 100%; }
  #cc-banner .cc-btn-settings { min-width: auto; }
  #cc-modal { padding: 1.5rem; }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  #cc-banner, #cc-modal-backdrop, #cc-modal, .cc-toggle .cc-slider, .cc-toggle .cc-slider::before {
    transition: none !important;
  }
}
