/* ==========================================================================
   Antrophy – Cookie-Consent-Banner (cookie-consent.css)
   Schlicht, schwarzer Hintergrund. Akzeptieren = weiß, die anderen zwei =
   outline weiß. Logik: js/cookie-consent.js · Consent Mode: js/consent-init.js
   ========================================================================== */

.cookie-banner {
  position: fixed;
  z-index: 1000;
  left: 1.5rem;
  bottom: 1.5rem;
  width: min(420px, calc(100vw - 3rem));
  box-sizing: border-box;
  padding: 1.75rem;
  color: #fff;
  font-family: var(--font-primary, "Inter CST", Arial, sans-serif);

  background-color: #0a0a0a;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-m, 20px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);

  /* Einblenden */
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.cookie-banner.is-visible {
  opacity: 1;
  transform: none;
}

.cookie-banner__title {
  font-family: var(--font-secondary, "Sourceserif CSTM", Georgia, serif);
  font-size: 1.4rem;
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 0.55rem;
  color: #fff; /* explizit – sonst greift die globale dunkle h2-Farbe */
}
.cookie-banner__text {
  font-size: 0.9rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.66);
  margin: 0 0 1.3rem;
}
.cookie-banner__text a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* --- Buttons --- */
.cookie-banner__actions {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.cookie-banner__row {
  display: flex;
  gap: 0.6rem;
}
.cookie-banner__row .cookie-btn {
  flex: 1 1 0;
}

.cookie-btn {
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1;
  border-radius: 1000px;
  padding: 0.8rem 1.3rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}
/* Akzeptieren / Speichern – weiß gefüllt */
.cookie-btn--primary {
  background-color: #fff;
  color: #0a0a0a;
}
.cookie-btn--primary:hover {
  background-color: rgba(255, 255, 255, 0.85);
}
/* Einstellungen / Nur notwendige – outline weiß */
.cookie-btn--ghost {
  background-color: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.4);
}
.cookie-btn--ghost:hover {
  border-color: #fff;
}

/* --- Einstellungen-Panel (Kategorien) --- */
.cookie-banner__settings {
  display: none;
  margin: 0 0 1.3rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}
.cookie-banner.is-settings .cookie-banner__settings {
  display: block;
}
.cookie-btn--save {
  width: 100%;
  margin-top: 1.1rem;
}

.cookie-cat {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}
.cookie-cat:last-of-type {
  border-bottom: 0;
}
.cookie-cat__label {
  font-weight: 600;
  font-size: 0.92rem;
}
.cookie-cat__desc {
  font-size: 0.78rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 0.25rem;
}

/* --- Toggle-Switch --- */
.cookie-switch {
  position: relative;
  flex: 0 0 auto;
  width: 42px;
  height: 24px;
  margin-top: 0.1rem;
}
.cookie-switch input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.cookie-switch__track {
  position: absolute;
  inset: 0;
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 1000px;
  transition: background-color 0.2s ease;
  pointer-events: none;
}
.cookie-switch__track::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background-color: #fff;
  transition: transform 0.2s ease;
}
.cookie-switch input:checked + .cookie-switch__track {
  background-color: #fff;
}
.cookie-switch input:checked + .cookie-switch__track::before {
  transform: translateX(18px);
  background-color: #0a0a0a;
}
.cookie-switch input:disabled {
  cursor: not-allowed;
}
.cookie-switch input:disabled + .cookie-switch__track {
  background-color: rgba(255, 255, 255, 0.32);
}

/* --- Mobil: volle Breite unten, obere zwei Buttons gestapelt --- */
@media screen and (max-width: 540px) {
  .cookie-banner {
    left: 0.75rem;
    right: 0.75rem;
    bottom: 0.75rem;
    width: auto;
    padding: 1.5rem 1.25rem;
  }
  .cookie-banner__row {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cookie-banner {
    transition: none;
    transform: none;
  }
}
