/* Papybara Cookie-Banner. (C) 2026 M0173R, GPL-2.0-or-later. Weiß/technisch, ohne externe Ressourcen. */
.pbc-root {
  --pbc-accent: #0b5cad;
  --pbc-ink: #1b2430;
  --pbc-muted: #55606e;
  --pbc-line: #d3d9e0;
  --pbc-bg: #fff;
  --pbc-soft: #f4f6f8;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: var(--pbc-ink);
}
.pbc-root *, .pbc-root *::before, .pbc-root *::after { box-sizing: border-box; }
.pbc-root [hidden] { display: none !important; }
.pbc-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Platz schaffen, damit die Leiste keinen Seitenfuss verdeckt */
html.pbc-bar-open body { padding-bottom: var(--pbc-bar-h, 0); }

/* Leiste unten */
.pbc-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 2147483000;
  background: var(--pbc-bg);
  border-top: 1px solid var(--pbc-line);
  box-shadow: 0 -6px 24px rgba(20, 30, 45, .10);
  animation: pbc-up .28s ease-out;
}
.pbc-bar-inner {
  max-width: 1160px; margin: 0 auto; padding: 18px 24px 8px;
  display: flex; gap: 28px; align-items: center; justify-content: space-between;
}
.pbc-bar-text { flex: 1 1 auto; min-width: 0; max-width: 760px; }
.pbc-bar-text p { margin: 0 0 6px; color: var(--pbc-muted); }
.pbc-title { margin: 0 0 4px; font-size: 1.05rem; font-weight: 650; letter-spacing: 0; color: var(--pbc-ink); line-height: 1.3; }

.pbc-links { display: inline-flex; gap: 14px; flex-wrap: wrap; font-size: .875rem; }
.pbc-links a { color: var(--pbc-accent); text-decoration: underline; text-underline-offset: 2px; }
.pbc-links a:hover { text-decoration-thickness: 2px; }

/* Link-Zeile: Links links, fortlaufende Versionsnummer rechts auf gleicher Hoehe */
.pbc-linkrow { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.pbc-ver { margin-left: auto; font-size: .75rem; color: var(--pbc-muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.pbc-bar-foot { max-width: 1160px; margin: 0 auto; padding: 0 24px 12px; }

/* Logo */
.pbc-logo { display: block; width: auto; max-width: 160px; object-fit: contain; object-position: left center; align-self: flex-start; flex: 0 0 auto; }
.pbc-bar-inner > .pbc-logo, .pbc-dlg-brand > .pbc-logo { align-self: center; }
.pbc-logo-bar { height: var(--pbc-logo-h, 56px); }
.pbc-logo-dlg { height: calc(var(--pbc-logo-h, 56px) * .6); max-height: 40px; }
.pbc-dlg-brand { display: flex; align-items: center; gap: 12px; min-width: 0; }

/* Schaltflaechen: Annehmen und Ablehnen sind gleichwertig gestaltet */
.pbc-actions { display: flex; gap: 10px; flex: 0 0 auto; flex-wrap: wrap; justify-content: flex-end; }
.pbc-btn {
  appearance: none; cursor: pointer; font: inherit; font-weight: 600; line-height: 1.2;
  padding: 10px 18px; min-height: 42px; border-radius: 6px;
  background: var(--pbc-bg); color: var(--pbc-ink);
  border: 1.5px solid var(--pbc-ink);
  transition: background .15s, color .15s, border-color .15s;
}
.pbc-btn:hover { background: var(--pbc-ink); color: #fff; }
.pbc-btn-primary { background: var(--pbc-accent); border-color: var(--pbc-accent); color: #fff; }
.pbc-btn-primary:hover { background: color-mix(in srgb, var(--pbc-accent) 82%, #000); border-color: color-mix(in srgb, var(--pbc-accent) 82%, #000); }
.pbc-btn-ghost { border-color: var(--pbc-line); color: var(--pbc-ink); }
.pbc-btn-ghost:hover { background: var(--pbc-soft); color: var(--pbc-ink); border-color: var(--pbc-muted); }

.pbc-root :focus-visible { outline: 3px solid var(--pbc-accent); outline-offset: 2px; }

/* Dialog */
.pbc-dialog {
  padding: 0; border: 1px solid var(--pbc-line); border-radius: 10px; background: var(--pbc-bg); color: var(--pbc-ink);
  width: min(640px, calc(100vw - 24px)); max-height: min(86vh, 760px);
  box-shadow: 0 24px 60px rgba(20, 30, 45, .28);
}
.pbc-dialog[open] { display: flex; flex-direction: column; animation: pbc-pop .2s ease-out; }
.pbc-dialog::backdrop { background: rgba(20, 30, 45, .45); }
.pbc-dlg-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 20px 24px 8px; }
.pbc-dlg-head .pbc-title { font-size: 1.2rem; margin: 0; }
.pbc-close { appearance: none; cursor: pointer; background: transparent; border: 0; border-radius: 6px; width: 36px; height: 36px; display: grid; place-items: center; color: var(--pbc-muted); flex: 0 0 auto; }
.pbc-close:hover { background: var(--pbc-soft); color: var(--pbc-ink); }
.pbc-dlg-body { padding: 4px 24px 16px; overflow-y: auto; flex: 1 1 auto; }
.pbc-dlg-intro { margin: 0 0 14px; color: var(--pbc-muted); }
.pbc-dlg-foot { padding: 14px 24px 18px; border-top: 1px solid var(--pbc-line); background: var(--pbc-soft); border-radius: 0 0 10px 10px; display: flex; flex-direction: column; gap: 12px; }
.pbc-dlg-foot .pbc-actions { justify-content: flex-start; }
.pbc-reset { appearance: none; background: none; border: 0; padding: 4px 0; align-self: flex-start; font: inherit; font-size: .875rem; color: var(--pbc-muted); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.pbc-reset:hover { color: var(--pbc-ink); }
.pbc-links-dlg { margin-top: 10px; }

/* Kategorien */
.pbc-cats { border: 1px solid var(--pbc-line); border-radius: 8px; overflow: hidden; }
.pbc-cat { padding: 14px 16px; background: var(--pbc-bg); }
.pbc-cat + .pbc-cat { border-top: 1px solid var(--pbc-line); }
.pbc-cat-head { display: flex; align-items: center; gap: 10px; }
.pbc-cat-label { font-weight: 650; flex: 1 1 auto; cursor: pointer; }
.pbc-cat-desc { margin: 4px 0 0; font-size: .9rem; color: var(--pbc-muted); padding-right: 56px; }
.pbc-badge { font-size: .75rem; font-weight: 600; color: var(--pbc-muted); background: var(--pbc-soft); border: 1px solid var(--pbc-line); border-radius: 999px; padding: 2px 9px; }

/* Schalter */
.pbc-switch { position: relative; width: 44px; height: 26px; flex: 0 0 auto; }
.pbc-switch-input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.pbc-switch-input:disabled { cursor: not-allowed; }
.pbc-switch-ui { position: absolute; inset: 0; border-radius: 999px; background: #aeb7c2; transition: background .15s; }
.pbc-switch-ui::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: transform .15s; }
.pbc-switch-input:checked + .pbc-switch-ui { background: var(--pbc-accent); }
.pbc-switch-input:checked + .pbc-switch-ui::after { transform: translateX(18px); }
.pbc-switch-input:disabled + .pbc-switch-ui { opacity: .55; }
.pbc-switch-input:focus-visible + .pbc-switch-ui { outline: 3px solid var(--pbc-accent); outline-offset: 2px; }

/* Symbol zum nachtraeglichen Aendern */
.pbc-icon {
  position: fixed; bottom: 16px; z-index: 2147482000;
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  background: var(--pbc-bg); color: var(--pbc-ink); border: 1px solid var(--pbc-line);
  box-shadow: 0 2px 10px rgba(20, 30, 45, .16); cursor: pointer; padding: 0;
  transition: transform .15s, box-shadow .15s, color .15s;
}
.pbc-icon.pbc-pos-left { left: 16px; }
.pbc-icon.pbc-pos-right { right: 16px; }
.pbc-icon:hover { transform: scale(1.06); color: var(--pbc-accent); box-shadow: 0 4px 14px rgba(20, 30, 45, .22); }

/* Platzhalter fuer blockierte Einbettungen */
.pbc-placeholder { border: 1px dashed var(--pbc-muted); border-radius: 8px; background: var(--pbc-soft); padding: 22px; text-align: center; color: var(--pbc-ink); font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; }
.pbc-placeholder p { margin: 0 0 12px; }

@keyframes pbc-up { from { transform: translateY(100%); opacity: .4; } to { transform: none; opacity: 1; } }
@keyframes pbc-pop { from { transform: translateY(10px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .pbc-bar, .pbc-dialog[open], .pbc-icon, .pbc-switch-ui, .pbc-switch-ui::after, .pbc-btn { animation: none !important; transition: none !important; }
}

/* Schmale Bildschirme */
@media (max-width: 760px) {
  .pbc-bar-inner { flex-direction: column; align-items: stretch; gap: 14px; padding: 16px; }
  .pbc-logo-bar { height: min(var(--pbc-logo-h, 56px), 44px); }
  .pbc-bar-inner > .pbc-logo { align-self: flex-start; }
  .pbc-bar .pbc-actions { flex-direction: column; }
  .pbc-bar .pbc-btn { width: 100%; }
  .pbc-bar { max-height: 90vh; overflow-y: auto; }
  .pbc-dlg-head, .pbc-dlg-body, .pbc-dlg-foot { padding-left: 16px; padding-right: 16px; }
  .pbc-dlg-foot .pbc-actions { flex-direction: column; }
  .pbc-dlg-foot .pbc-btn { width: 100%; }
  .pbc-cat-desc { padding-right: 0; }
}
@media (forced-colors: active) {
  .pbc-switch-ui { border: 1px solid CanvasText; }
  .pbc-switch-input:checked + .pbc-switch-ui { background: Highlight; }
}
