#ns-consent{
  --ns-accent:var(--primary-color,var(--primary,var(--accent-color,var(--accent,#2563eb))));
  --ns-bg:#151922;
  --ns-text:#f1f5f9;
  --ns-muted:#aeb7c5;
  --ns-border:rgba(255,255,255,.12);

  position:fixed;
  z-index:2147483647;
  left:16px;
  right:16px;
  bottom:16px;
  max-width:760px;
  margin:auto;
  padding:22px;
  color:var(--ns-text,#e8edf5);
  background:var(--ns-bg,#151922);
  border:1px solid var(--ns-border,rgba(255,255,255,.12));
  border-radius:18px;
  box-shadow:0 18px 55px rgba(0,0,0,.35);
  backdrop-filter:blur(18px);
  -webkit-backdrop-filter:blur(18px);
  font:14px/1.55 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
}

#ns-consent *,
#ns-consent *::before,
#ns-consent *::after{
  box-sizing:border-box;
}

#ns-consent h2{
  margin:0 0 7px;
  color:var(--ns-text,#fff);
  font-size:19px;
  line-height:1.3;
  font-weight:700;
  letter-spacing:-.01em;
}

#ns-consent p{
  margin:0 0 17px;
  color:var(--ns-muted,#aeb7c5);
}

.ns-consent-actions{
  display:flex;
  flex-wrap:wrap;
  gap:9px;
}

.ns-consent-btn{
  appearance:none;
  border:1px solid var(--ns-border,rgba(255,255,255,.12));
  border-radius:10px;
  min-height:42px;
  padding:10px 16px;
  color:var(--ns-text,#fff);
  background:rgba(127,127,127,.14);
  font:600 14px/1 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  cursor:pointer;
  transition:background .16s ease,transform .16s ease,border-color .16s ease;
}

.ns-consent-btn:hover{
  background:rgba(127,127,127,.24);
  transform:translateY(-1px);
}

.ns-consent-btn:focus-visible,
.ns-consent-link:focus-visible,
.ns-consent-toggle input:focus-visible+.ns-consent-slider{
  outline:3px solid var(--ns-accent,#2563eb);
  outline-offset:3px;
}

.ns-consent-accept{
  color:var(--ns-button-text,#fff);
  background:var(--ns-accent,#2563eb);
  border-color:var(--ns-accent,#2563eb);
}

.ns-consent-accept:hover{
  filter:brightness(1.08);
}

.ns-consent-link{
  display:inline-block;
  margin-top:13px;
  padding:2px 0;
  color:var(--ns-muted,#aeb7c5);
  text-decoration:underline;
  text-underline-offset:3px;
  cursor:pointer;
}

.ns-consent-link:hover{
  color:var(--ns-text,#fff);
}

#ns-consent-panel{
  display:none;
}

.ns-consent-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  padding:14px 0;
  border-top:1px solid var(--ns-border,rgba(255,255,255,.10));
}

.ns-consent-row strong{
  display:block;
  color:var(--ns-text,#fff);
  font-weight:650;
}

.ns-consent-row small{
  display:block;
  margin-top:3px;
  color:var(--ns-muted,#9aa5b5);
  font-size:12px;
  line-height:1.45;
}

.ns-consent-toggle{
  position:relative;
  width:44px;
  height:24px;
  flex:none;
}

.ns-consent-toggle input{
  position:absolute;
  opacity:0;
  width:1px;
  height:1px;
}

.ns-consent-slider{
  position:absolute;
  inset:0;
  background:#667085;
  border-radius:24px;
  cursor:pointer;
  transition:.18s;
}

.ns-consent-slider::before{
  content:"";
  position:absolute;
  width:18px;
  height:18px;
  left:3px;
  top:3px;
  background:#fff;
  border-radius:50%;
  transition:.18s;
}

.ns-consent-toggle input:checked+.ns-consent-slider{
  background:var(--ns-accent,#2563eb);
}

.ns-consent-toggle input:checked+.ns-consent-slider::before{
  transform:translateX(20px);
}

.ns-consent-toggle input:disabled+.ns-consent-slider{
  opacity:.55;
  cursor:not-allowed;
}


@media(max-width:600px){
  #ns-consent{
    left:10px;
    right:10px;
    bottom:10px;
    padding:18px;
    border-radius:15px;
  }

  .ns-consent-actions{
    display:grid;
    grid-template-columns:1fr;
  }

  .ns-consent-btn{
    width:100%;
  }
}

@media(prefers-reduced-motion:reduce){
  #ns-consent *,
  #ns-consent *::before,
  #ns-consent *::after{
    transition:none!important;
  }
}

/* CSP-sicheres Häkchen – kein data:image/svg+xml */
.ns-consent-toggle input:checked + .ns-consent-slider::after{
  content:"";
  position:absolute;
  left:14px;
  top:5px;
  width:6px;
  height:11px;
  border:solid #fff;
  border-width:0 2px 2px 0;
  transform:rotate(45deg);
}
