/* ============================================================
   COOKIE-CONSENT / CMP · Stein am Rhein
   Edle, ruhige Anmutung im Paper/Gold/Ink-Stil der Seite.
   Erscheint unten als schwebende Karte (mobil: vollbreit unten).
   ============================================================ */
:root {
  --cc-gold: #b8912f;
  --cc-paper: #fbf8f1;
  --cc-paper-2: #f4eede;
  --cc-ink: #2a2722;
  --cc-ink-soft: #5a554c;
  --cc-line: rgba(42, 39, 34, 0.14);
  --cc-ease: cubic-bezier(0.16, 1, 0.3, 1);
}

.cc-overlay {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 100000;
  display: flex;
  justify-content: center;
  padding: 18px;
  pointer-events: none; /* nur die Karte fängt Klicks – kein Seiten-Blocker */
}

.cc-card {
  pointer-events: auto;
  width: min(560px, 100%);
  background: linear-gradient(180deg, var(--cc-paper) 0%, var(--cc-paper-2) 100%);
  color: var(--cc-ink);
  border: 1px solid var(--cc-line);
  border-radius: 18px;
  box-shadow: 0 18px 50px -12px rgba(42, 39, 34, 0.45),
              0 2px 0 rgba(255, 255, 255, 0.6) inset;
  padding: 20px 22px 18px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, system-ui, sans-serif;
  animation: cc-rise 0.5s var(--cc-ease) both;
  max-height: calc(100vh - 36px);
  overflow-y: auto;
}
.cc-card-wide { width: min(620px, 100%); }

@keyframes cc-rise {
  from { opacity: 0; transform: translateY(26px) scale(0.98); }
  to   { opacity: 1; transform: none; }
}

/* ---------- Kopf mit Maskottchen ---------- */
.cc-head {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.cc-mascot {
  flex: 0 0 auto;
  width: 64px; height: 64px;
  filter: drop-shadow(0 4px 8px rgba(42, 39, 34, 0.18));
  animation: cc-wobble 5.5s ease-in-out infinite;
  transform-origin: 60% 70%;
}
.cc-mascot svg,
.cc-mascot img { width: 100%; height: 100%; display: block; object-fit: contain; }
@keyframes cc-wobble {
  0%, 100% { transform: rotate(-3deg); }
  50%      { transform: rotate(3deg); }
}
.cc-title {
  margin: 2px 0 4px;
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.cc-intro {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--cc-ink-soft);
}

/* ---------- Kategorien ---------- */
.cc-cats {
  margin: 16px 0 4px;
  display: grid;
  gap: 2px;
  border-top: 1px solid var(--cc-line);
}
.cc-cats.cc-collapsed { display: none; }

.cc-cat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 2px;
  border-bottom: 1px solid var(--cc-line);
  cursor: pointer;
}
.cc-cat-name {
  display: block;
  font-weight: 650;
  font-size: 0.96rem;
}
.cc-cat-desc {
  display: block;
  margin-top: 2px;
  font-size: 0.84rem;
  line-height: 1.42;
  color: var(--cc-ink-soft);
}

/* ---------- Schalter ---------- */
.cc-switch {
  flex: 0 0 auto;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}
.cc-switch input {
  position: absolute;
  opacity: 0;
  width: 46px; height: 26px;
  margin: 0;
  cursor: pointer;
}
.cc-knob {
  width: 46px; height: 26px;
  border-radius: 999px;
  background: #d8d0bf;
  border: 1px solid var(--cc-line);
  transition: background 0.25s var(--cc-ease);
  position: relative;
}
.cc-knob::after {
  content: '';
  position: absolute;
  top: 2px; left: 2px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  transition: transform 0.25s var(--cc-ease);
}
.cc-switch input:checked + .cc-knob {
  background: var(--cc-gold);
}
.cc-switch input:checked + .cc-knob::after { transform: translateX(20px); }
.cc-switch input:focus-visible + .cc-knob {
  outline: 2px solid var(--cc-gold);
  outline-offset: 2px;
}
.cc-locked .cc-knob { opacity: 0.85; background: var(--cc-gold); }
.cc-locked input { cursor: not-allowed; }
.cc-always {
  font-size: 0.66rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--cc-gold);
  font-weight: 700;
}

/* ---------- Datenschutz-Link ---------- */
.cc-privacy {
  display: inline-block;
  margin: 12px 0 2px;
  font-size: 0.82rem;
  color: var(--cc-gold);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.cc-privacy:hover { border-bottom-color: var(--cc-gold); }

/* ---------- Aktionen ---------- */
.cc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}
.cc-btn {
  flex: 1 1 auto;
  min-width: 130px;
  padding: 12px 16px;
  border-radius: 11px;
  font-size: 0.92rem;
  font-weight: 650;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.15s var(--cc-ease), background 0.2s, box-shadow 0.2s;
  font-family: inherit;
}
.cc-btn:active { transform: translateY(1px); }

/* Ablehnen & Akzeptieren bewusst GLEICH gross/prominent (EU/Google-konform) */
.cc-reject,
.cc-accept {
  color: #fff;
}
.cc-reject {
  background: #6b6457;
  border-color: #5a554c;
}
.cc-reject:hover { background: #5a554c; }
.cc-accept {
  background: linear-gradient(180deg, #c79b35 0%, var(--cc-gold) 100%);
  border-color: #9c7430;
  box-shadow: 0 6px 16px -6px rgba(184, 145, 47, 0.7);
}
.cc-accept:hover { filter: brightness(1.05); }
.cc-save {
  background: linear-gradient(180deg, #c79b35 0%, var(--cc-gold) 100%);
  border-color: #9c7430;
  color: #fff;
}
.cc-ghost {
  flex: 0 0 auto;
  min-width: 0;
  background: transparent;
  color: var(--cc-ink-soft);
  border-color: var(--cc-line);
}
.cc-ghost:hover { background: rgba(42, 39, 34, 0.05); }

/* ---------- Mobil ---------- */
@media (max-width: 560px) {
  .cc-overlay { padding: 0; }
  .cc-card {
    width: 100%;
    border-radius: 18px 18px 0 0;
    border-bottom: none;
    padding: 18px 16px 16px;
    max-height: 88vh;
  }
  .cc-actions { gap: 8px; }
  .cc-btn { min-width: calc(50% - 4px); }
  .cc-ghost { min-width: 100%; order: 3; }
}

@media (prefers-reduced-motion: reduce) {
  .cc-card { animation: none; }
  .cc-mascot { animation: none; }
}

/* Im Druck/PDF niemals mitdrucken. */
@media print {
  .cc-overlay { display: none !important; }
}
