/* Consent banner (assets/js/consent.js) — dark card at the bottom left, the
   look of the new design (glass card as in the docs), on the old homepage and
   on the docs/legal pages alike. Plain CSS with literal values: the homepage
   pages have no Tailwind and none of its tokens (values from app/assets/css/main.css). */
#consent {
  position: fixed;
  left: 32px;
  bottom: 32px;
  z-index: 99999;
  box-sizing: border-box;
  width: 380px;
  max-width: calc(100vw - 64px);
  max-height: calc(100vh - 64px);
  overflow-y: auto;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.01)),
    rgba(8, 9, 10, 0.88);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 18px 44px rgba(8, 9, 10, 0.45);
  -webkit-backdrop-filter: blur(22px) saturate(1.25);
  backdrop-filter: blur(22px) saturate(1.25);
  color: #D0D6E0;
  color-scheme: dark;
  font-family: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  text-align: left;
  -webkit-font-smoothing: antialiased;
  animation: consent-in 220ms ease-out;
}
#consent[hidden] { display: none; }
#consent *, #consent *::before, #consent *::after { box-sizing: border-box; }

@keyframes consent-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  #consent { animation: none; }
}

#consent .consent-titel {
  margin: 0 0 8px;
  color: #F7F8F8;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  outline: none;
}
#consent p { margin: 0; }
#consent a {
  color: #F7F8F8;
  text-decoration: underline;
  text-decoration-color: rgba(247, 248, 248, 0.35);
  text-underline-offset: 2px;
}
#consent a:hover { text-decoration-color: #F7F8F8; }

/* Categories (settings) */
#consent form { margin: 16px 0 0; display: flex; flex-direction: column; gap: 2px; }
#consent form[hidden] { display: none; }
#consent .consent-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 150ms ease;
}
#consent .consent-option:hover { background: rgba(255, 255, 255, 0.04); }
#consent .consent-option input {
  flex: none;
  width: 16px;
  height: 16px;
  margin: 2px 0 0;
  accent-color: oklch(57.37% 0.1946 257.86);
  cursor: pointer;
}
#consent .consent-option input:disabled { cursor: default; }
#consent .consent-option strong { display: block; color: #F7F8F8; font-weight: 500; }
#consent .consent-option span span { display: block; color: #8A8F98; font-size: 13px; }

/* Buttons: "Nur notwendige" and "Alle akzeptieren" side by side with the same
   weight — no nudging towards "accept". */
#consent .consent-knoepfe { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 16px; }
#consent button {
  appearance: none;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #F7F8F8;
  font: inherit;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  transition: background-color 150ms ease, border-color 150ms ease;
}
#consent button:hover { background: rgba(255, 255, 255, 0.14); border-color: rgba(255, 255, 255, 0.16); }
#consent button:focus-visible { outline: 2px solid oklch(57.37% 0.1946 257.86); outline-offset: 2px; }
#consent button[hidden] { display: none; }
/* "Einstellungen" is the quiet third option: a text button across both columns */
#consent button[data-consent="einstellungen"] {
  grid-column: 1 / -1;
  padding: 6px;
  border-color: transparent;
  background: transparent;
  color: #8A8F98;
  font-weight: 400;
}
#consent button[data-consent="einstellungen"]:hover { color: #F7F8F8; background: transparent; }
#consent button[data-consent="speichern"] { grid-column: 1 / -1; }

@media (max-width: 480px) {
  #consent { left: 12px; right: 12px; bottom: 12px; width: auto; max-width: none; max-height: calc(100vh - 24px); }
}
