/* Consent banner (assets/js/consent.js) — style F. Accept and Reject look exactly the same (equal prominence). */
.consent {
  /* desktop: bottom-right, clear of the text panel (left) and above the «KI-generiert» label */
  position: fixed; z-index: 60; right: 24px; bottom: 56px; width: min(420px, calc(100vw - 48px));
  max-height: calc(100vh - 80px); max-height: calc(100dvh - 80px); overflow-y: auto; overscroll-behavior: contain;
  padding: 22px 24px 20px; border-radius: 24px;
  background: rgba(255,255,255,.9); -webkit-backdrop-filter: blur(18px) saturate(1.15); backdrop-filter: blur(18px) saturate(1.15);
  box-shadow: 0 20px 60px rgba(27,19,64,.18), 0 0 0 1px var(--stl-border);
  color: var(--stl-text); font: var(--t-small); font-size: 14px; line-height: 1.45;
  animation: consent-in .4s cubic-bezier(.2,.7,.2,1) both;
}
.consent:focus { outline: none; }
.consent:focus-visible { outline: 3px solid var(--stl-focus); outline-offset: 3px; }
@keyframes consent-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.consent__title { font: 700 17px/1.25 var(--stl-font); letter-spacing: -.01em; margin: 0 0 6px; color: var(--stl-text); }
.consent__body { margin: 0; color: var(--stl-text); }
.consent__body a { color: var(--stl-accent); font-weight: 700; }
.consent__btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 16px; }
.consent__btn {
  min-height: 44px; padding: .5rem 1rem; border: 0; border-radius: var(--stl-r-full); cursor: pointer;
  background: var(--stl-accent); color: var(--stl-on-accent); font: 700 15px/1.2 var(--stl-font);
  transition: background-color .2s, transform .15s;
}
.consent__btn:hover { background: var(--stl-accent-hover); }
.consent__btn:active { transform: scale(.97); }
.consent__btn--save { grid-column: 1 / -1; background: var(--stl-text); }
.consent__btn--save:hover { background: #2c2260; }
.consent__link {
  grid-column: 1 / -1; justify-self: center; min-height: 44px; padding: .25rem .75rem; border: 0; background: none; cursor: pointer;
  color: var(--stl-text); font: 700 14px/1.2 var(--stl-font); text-decoration: underline; text-underline-offset: .2em;
}
.consent__link:hover { color: var(--stl-accent); }
.consent :focus-visible { outline: 3px solid var(--stl-focus); outline-offset: 2px; }

/* settings: two switches */
.consent__opts { margin-top: 14px; display: grid; gap: 10px; }
.consent__opt { position: relative; padding: 12px 14px; border-radius: 16px; background: var(--stl-bg); }
.consent__opt input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.consent__switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 32px; cursor: pointer; font-weight: 700; font-size: 15px; }
.consent__knob { flex: none; position: relative; width: 46px; height: 28px; border-radius: 999px; background: var(--stl-border-strong); transition: background-color .2s; }
.consent__knob::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(27,19,64,.3); transition: transform .2s; }
.consent__opt input:checked + .consent__switch .consent__knob { background: var(--stl-accent); }
.consent__opt input:checked + .consent__switch .consent__knob::after { transform: translateX(18px); }
.consent__opt input:focus-visible + .consent__switch .consent__knob { outline: 3px solid var(--stl-focus); outline-offset: 2px; }
.consent__optdesc { margin: 4px 0 0; color: var(--stl-text-muted); font-size: 13px; }

/* footer link (a button, so the #fuer fragment is never touched) */
.consent-open-btn { display: inline; padding: 0; border: 0; background: none; cursor: pointer; color: inherit; font: inherit; text-decoration: underline; text-underline-offset: .15em; }
.site-footer .consent-open-btn { color: var(--stl-bg); }

/* phones: full-width sheet at the bottom; the floating CTA bar is hidden while the banner is open (it replaces it) */
@media (max-width: 767px), (max-aspect-ratio: 4/5) {
  .consent { left: 8px; right: 8px; bottom: calc(8px + env(safe-area-inset-bottom)); width: auto; padding: 18px 18px 14px; border-radius: 22px;
    max-height: calc(100vh - 96px); max-height: calc(100dvh - 96px); }
  .consent__title { font-size: 16px; }
  html.consent-open .cta-float { opacity: 0 !important; visibility: hidden !important; pointer-events: none; }
}
@media (prefers-reduced-motion: reduce) {
  .consent { animation: consent-fade .3s ease both; }
  .consent__btn, .consent__knob, .consent__knob::after { transition: none; }
  @keyframes consent-fade { from { opacity: 0; } to { opacity: 1; } }
}
