/* ============================================================
   DAVISON MEDIA GLOBAL — Cookie-Consent, Styles
   Nutzt dieselben Tokens wie index.html / legal.css
   ============================================================ */

.cc {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: flex-end;
  justify-content: center;
  background: rgba(61, 56, 47, 0.55);
  padding: 24px;
}
body.cc-open .cc { display: flex; }
body.cc-open { overflow: hidden; }

.cc-panel {
  background: var(--paper);
  border-top: 3px solid var(--olive-deep);
  width: 100%;
  max-width: 720px;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  padding: 44px 44px 36px;
  animation: cc-rise 0.34s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes cc-rise {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .cc-panel { animation: none; }
}

.cc-marker {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  color: var(--olive-deep);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 18px;
}

.cc-title {
  font-family: 'Fraunces', serif;
  font-weight: 400;
  font-size: 30px;
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin-bottom: 16px;
}

.cc-text {
  font-size: 15px;
  line-height: 1.65;
  color: var(--mute);
  margin-bottom: 28px;
}
.cc-text a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 1px;
  transition: color 0.2s, border-color 0.2s;
}
.cc-text a:hover { color: var(--olive-deep); border-color: var(--olive-deep); }

/* Kategorien */
.cc-cat {
  padding: 22px 0;
  border-top: 1px solid var(--rule);
}
.cc-cat:last-of-type { border-bottom: 1px solid var(--rule); margin-bottom: 28px; }

.cc-cat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 8px;
}
.cc-cat-name {
  font-family: 'Fraunces', serif;
  font-size: 19px;
  letter-spacing: -0.01em;
  cursor: pointer;
}
.cc-cat-text {
  font-size: 14px;
  line-height: 1.6;
  color: var(--mute);
  max-width: 60ch;
}
.cc-always {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--mute);
  white-space: nowrap;
}

/* Schalter */
.cc-switch { display: inline-flex; cursor: pointer; flex-shrink: 0; }
.cc-switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.cc-track {
  display: block;
  width: 46px;
  height: 24px;
  background: var(--paper-2);
  border: 1px solid var(--rule);
  position: relative;
  transition: background 0.2s, border-color 0.2s;
}
.cc-knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  background: var(--mute);
  transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1), background 0.2s;
}
.cc-switch input:checked + .cc-track {
  background: var(--olive-deep);
  border-color: var(--olive-deep);
}
.cc-switch input:checked + .cc-track .cc-knob {
  transform: translateX(22px);
  background: var(--paper);
}
.cc-switch input:focus-visible + .cc-track {
  outline: 1px solid var(--olive-deep);
  outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
  .cc-knob { transition: none; }
}

/* Buttons — Akzeptieren und Ablehnen sind bewusst GLEICHWERTIG.
   Eine optische Bevorzugung von "Akzeptieren" wäre nach AEPD
   ein Dark Pattern und damit angreifbar. */
.cc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.cc-btn {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 14px 22px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.cc-btn:focus-visible {
  outline: 1px solid var(--olive-deep);
  outline-offset: 2px;
}
.cc-btn-primary {
  background: var(--ink);
  border: 1px solid var(--ink);
  color: var(--paper);
}
.cc-btn-primary:hover {
  background: var(--olive-deep);
  border-color: var(--olive-deep);
}
.cc-btn-ghost {
  background: none;
  border: 1px solid var(--rule);
  color: var(--ink);
}
.cc-btn-ghost:hover {
  border-color: var(--ink);
}

@media (max-width: 640px) {
  .cc { padding: 0; align-items: stretch; }
  .cc-panel {
    padding: 32px 24px 28px;
    max-width: none;
    max-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
  }
  .cc-title { font-size: 24px; }
  .cc-actions { flex-direction: column; align-items: stretch; }
  .cc-btn { width: 100%; text-align: center; }
}
