/* =========================================================================
   Cookie-Einwilligung – nutzt Farben, Schrift und Buttons aus site.css.
   ========================================================================= */

.consent {
  position: fixed;
  z-index: 1000;
  left: 0; right: 0;
  bottom: calc(var(--mbar-h, 0px) + 0.75rem);
  display: flex; justify-content: center;
  padding: 0 0.75rem;
  pointer-events: none;
}
.consent[hidden] { display: none !important; }

.consent__box {
  pointer-events: auto;
  width: 100%; max-width: 760px;
  max-height: calc(100vh - var(--mbar-h, 0px) - 2rem);
  overflow-y: auto;
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 60px -20px rgba(4, 16, 31, 0.45);
  padding: 1.4rem 1.4rem 1.25rem;
  font-size: var(--step--1);
  line-height: 1.55;
  animation: consent-in 0.45s var(--ease-out) both;
}
@keyframes consent-in {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .consent__box { animation: none; }
}

.consent__title {
  font-family: var(--font-display);
  font-size: var(--step-2);
  font-weight: 500;
  line-height: 1.15;
  color: var(--navy-800);
  margin-bottom: 0.5rem;
  outline: none;
}
.consent__text { color: var(--ink-soft); }
.consent__text a { color: var(--ocean-600); text-decoration: underline; text-underline-offset: 2px; }

.consent__cats { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: 0.6rem; }
.consent__cat {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.8rem 0.9rem;
  background: var(--paper-tint);
}
.consent__cat-text { margin-top: 0.35rem; color: var(--ink-soft); }
.consent__cat-title { font-weight: 600; color: var(--ink); }
.consent__cat-title small { font-weight: 400; color: var(--ink-mute); }

/* Schalter */
.consent__switch { display: flex; align-items: center; gap: 0.7rem; cursor: pointer; }
.consent__switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.consent__track {
  flex: none; position: relative;
  width: 40px; height: 22px; border-radius: 22px;
  background: var(--sand-deep);
  transition: background-color 0.2s;
}
.consent__track::after {
  content: ''; position: absolute; top: 3px; left: 3px;
  width: 16px; height: 16px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s var(--ease-out);
}
.consent__switch input:checked + .consent__track { background: var(--ocean); }
.consent__switch input:checked + .consent__track::after { transform: translateX(18px); }
.consent__switch input:disabled + .consent__track { opacity: 0.55; cursor: not-allowed; }
.consent__switch input:focus-visible + .consent__track { outline: 2px solid var(--ocean); outline-offset: 2px; }

.consent__actions {
  display: flex; flex-wrap: wrap; gap: 0.5rem;
  margin-top: 1.1rem;
}
.consent__btn { flex: 1 1 auto; }
@media (min-width: 640px) {
  .consent__actions { justify-content: flex-end; }
  .consent__btn { flex: 0 0 auto; }
}

/* Tabelle auf der Seite /cookie-richtlinie/ */
.legal-prose table {
  width: 100%; margin: 1rem 0; border-collapse: collapse;
  font-size: var(--step--1); color: var(--ink-soft);
}
.legal-prose th, .legal-prose td {
  text-align: left; vertical-align: top;
  padding: 0.6rem 0.7rem; border-bottom: 1px solid var(--line);
}
.legal-prose th { color: var(--ink); font-weight: 600; background: var(--paper-tint); }
@media (max-width: 560px) {
  .legal-prose table, .legal-prose tbody, .legal-prose tr, .legal-prose td { display: block; }
  .legal-prose thead { display: none; }
  .legal-prose td { border: 0; padding: 0.2rem 0; }
  .legal-prose tr { border-bottom: 1px solid var(--line); padding: 0.6rem 0; }
}

/* Link "Cookie-Einstellungen" im Seitenfuß */
.footer__legal [data-consent-open] { cursor: pointer; }
