/* ── Cookie Consent Banner ─────────────────────────────────────────────── */

@keyframes cookieSlideUp {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

.cookie-consent {
  position: fixed;
  left: 50%;
  bottom: 72px;
  transform: translateX(-50%);
  width: min(640px, calc(100vw - 32px));
  z-index: 2147483646;
  animation: cookieSlideUp 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.cookie-consent__card {
  border-radius: 20px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.06);
  border: none;
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.50),
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    inset 0 -1px 0 rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(24px) saturate(150%);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
}

.cookie-consent__row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
}

.cookie-consent__title {
  margin: 0 0 5px 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.15px;
  color: rgba(255, 255, 255, 0.95);
}

.cookie-consent__text {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-weight: 400;
  font-size: 13px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.60);
}

.cookie-consent__text a {
  color: rgba(255, 255, 255, 0.80);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s ease;
}

.cookie-consent__text a:hover {
  color: rgba(255, 255, 255, 0.95);
}

.cookie-consent__actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-shrink: 0;
}

/* "Nur essenzielle" — ghost pill (matches .back-button) */
.cookie-consent__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.55);
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.22s ease, color 0.22s ease, transform 0.22s ease;
  -webkit-tap-highlight-color: transparent;
}

.cookie-consent__btn:hover {
  background: rgba(255, 255, 255, 0.11);
  color: rgba(255, 255, 255, 0.80);
  transform: translateY(-1px);
}

.cookie-consent__btn:active {
  transform: translateY(0);
}

.cookie-consent__btn:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.45);
  outline-offset: 2px;
}

/* "Alle akzeptieren" — green accent pill (matches .next-button) */
.cookie-consent__btn--primary {
  background: rgba(var(--accent-rgb), 0.85);
  border-color: transparent;
  color: #fff;
}

.cookie-consent__btn--primary:hover {
  background: rgba(var(--accent-rgb), 1);
  color: #fff;
}

/* ── Light mode overrides ───────────────────────────────────────────────── */
html[data-theme="light"] .cookie-consent__card {
  background: rgba(255, 255, 255, 0.68);
  border: none;
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.90),
    inset 0 -1px 0 rgba(0, 0, 0, 0.06);
}

html[data-theme="light"] .cookie-consent__title {
  color: rgba(0, 0, 0, 0.88);
}

html[data-theme="light"] .cookie-consent__text {
  color: rgba(0, 0, 0, 0.55);
}

html[data-theme="light"] .cookie-consent__text a {
  color: rgba(0, 0, 0, 0.75);
}

html[data-theme="light"] .cookie-consent__text a:hover {
  color: rgba(0, 0, 0, 0.95);
}

html[data-theme="light"] .cookie-consent__btn {
  border-color: rgba(0, 0, 0, 0.10);
  background: rgba(0, 0, 0, 0.05);
  color: rgba(0, 0, 0, 0.50);
}

html[data-theme="light"] .cookie-consent__btn:hover {
  background: rgba(0, 0, 0, 0.09);
  color: rgba(0, 0, 0, 0.75);
}

html[data-theme="light"] .cookie-consent__btn--primary {
  background: rgba(var(--accent-rgb), 0.90);
  border-color: transparent;
  color: #fff;
}

html[data-theme="light"] .cookie-consent__btn--primary:hover {
  background: rgba(var(--accent-rgb), 1);
  color: #fff;
}

/* ── Mobile ─────────────────────────────────────────────────────────────── */
@media (max-width: 560px) {
  .cookie-consent {
    bottom: 60px;
  }

  .cookie-consent__card {
    padding: 12px 14px;
  }

  .cookie-consent__row {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .cookie-consent__actions {
    width: 100%;
    justify-content: flex-end;
  }
}
