/* ============================================================================
   SchnellVorlage – Cookie-Consent
   Eigenständige, theme-unabhängige Styles. Sitzt über allem (auch dem Editor).
   ========================================================================== */

#sv-consent-root,
#svc-reopen {
  --svc-ink:    #1a1a1f;
  --svc-mid:    #5b5b66;
  --svc-soft:   #8a8a94;
  --svc-bg:     #ffffff;
  --svc-panel:  #f5f5f7;
  --svc-border: #e3e3e8;
  --svc-red:    #E8341A;
  --svc-red-d:  #c42a13;
  --svc-dark:   #1a1a1f;
  --svc-font:   -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Arial, sans-serif;
  box-sizing: border-box;
}
#sv-consent-root *,
#svc-reopen * { box-sizing: border-box; }

#sv-consent-root[hidden] { display: none; }

/* Overlay nur im Einstellungs-Modus */
.svc-overlay {
  position: fixed; inset: 0;
  background: rgba(15, 15, 20, .45);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  z-index: 2147483000;
  animation: svc-fade .25s ease;
}
.svc-overlay[hidden] { display: none; }

/* Karte */
.svc-box {
  position: fixed;
  left: 50%; bottom: 22px;
  transform: translateX(-50%);
  z-index: 2147483001;
  width: min(640px, calc(100% - 28px));
  background: var(--svc-bg);
  color: var(--svc-ink);
  font-family: var(--svc-font);
  border-radius: 20px;
  padding: 26px 28px;
  box-shadow: 0 24px 80px rgba(0,0,0,.22), 0 0 0 1px rgba(0,0,0,.05);
  animation: svc-up .4s cubic-bezier(.16,1,.3,1) both;
}
.svc-box[hidden] { display: none; }
.svc-box.is-modal { max-height: 90vh; overflow-y: auto; }

.svc-head { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 16px; }
.svc-ico {
  width: 44px; height: 44px; flex-shrink: 0;
  background: rgba(232,52,26,.1);
  border-radius: 13px;
  display: flex; align-items: center; justify-content: center;
  font-size: 23px; line-height: 1;
}
.svc-head h2 { font-size: 16px; font-weight: 800; margin: 2px 0 4px; letter-spacing: -.01em; }
.svc-head p  { font-size: 13px; color: var(--svc-mid); line-height: 1.55; margin: 0; }
.svc-head a  { color: var(--svc-red); text-decoration: underline; font-weight: 600; }

/* Granulare Optionen */
.svc-options {
  background: var(--svc-panel);
  border-radius: 14px;
  padding: 6px 16px;
  margin-bottom: 18px;
}
.svc-options[hidden] { display: none; }
.svc-opt {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 13px 0;
  border-bottom: 1px solid var(--svc-border);
}
.svc-opt:last-child { border-bottom: 0; }
.svc-opt-l  { font-size: 13.5px; font-weight: 700; color: var(--svc-ink); }
.svc-opt-d  { font-size: 11.5px; color: var(--svc-soft); margin-top: 2px; line-height: 1.4; }

/* Schalter */
.svc-tog {
  width: 44px; height: 25px; flex-shrink: 0;
  border-radius: 999px; border: none; cursor: pointer;
  background: #cfcfd6; position: relative;
  transition: background .2s ease;
}
.svc-tog::after {
  content: ""; position: absolute; left: 3px; top: 3px;
  width: 19px; height: 19px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.2);
  transition: transform .2s ease;
}
.svc-tog.on { background: var(--svc-red); }
.svc-tog.on::after { transform: translateX(19px); }
.svc-tog:disabled { opacity: .55; cursor: not-allowed; }
.svc-tog:focus-visible { outline: 2px solid var(--svc-red); outline-offset: 2px; }

/* Buttons */
.svc-actions { display: flex; gap: 10px; align-items: center; }
.svc-actions[hidden] { display: none; }
.svc-btn {
  font-family: var(--svc-font);
  font-size: 14px; font-weight: 700;
  padding: 12px 18px; border-radius: 11px;
  cursor: pointer; border: 1.5px solid transparent;
  transition: transform .12s ease, background .2s ease, border-color .2s ease;
  white-space: nowrap;
}
.svc-btn:active { transform: scale(.97); }
.svc-btn:focus-visible { outline: 2px solid var(--svc-red); outline-offset: 2px; }

/* Ablehnen + Akzeptieren: GLEICH prominent (DSGVO) – beide solide, gleiche Größe */
.svc-btn-reject { flex: 1; background: var(--svc-dark); color: #fff; }
.svc-btn-reject:hover { background: #000; }
.svc-btn-accept { flex: 1; background: var(--svc-red); color: #fff; }
.svc-btn-accept:hover { background: var(--svc-red-d); }
.svc-btn-save   { flex: 1; background: var(--svc-red); color: #fff; }
.svc-btn-save:hover { background: var(--svc-red-d); }

/* Einstellungen: bewusst sekundär (öffnet nur mehr Auswahl, ist keine Einwilligung) */
.svc-btn-settings {
  background: transparent; color: var(--svc-mid);
  border-color: var(--svc-border); flex: 0 0 auto;
}
.svc-btn-settings:hover { border-color: var(--svc-ink); color: var(--svc-ink); }

/* Persistenter Wieder-Öffnen-Button */
#svc-reopen {
  position: fixed; left: 18px; bottom: 18px;
  z-index: 2147482999;
  width: 46px; height: 46px;
  border-radius: 50%; border: 1px solid var(--svc-border);
  background: var(--svc-bg); color: var(--svc-ink);
  font-size: 21px; line-height: 1; cursor: pointer;
  box-shadow: 0 6px 22px rgba(0,0,0,.16);
  display: flex; align-items: center; justify-content: center;
  transition: transform .15s ease, box-shadow .2s ease;
}
#svc-reopen[hidden] { display: none; }
#svc-reopen:hover { transform: scale(1.08); box-shadow: 0 8px 28px rgba(0,0,0,.22); }
#svc-reopen:focus-visible { outline: 2px solid var(--svc-red); outline-offset: 2px; }

@keyframes svc-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes svc-up   { from { opacity: 0; transform: translateX(-50%) translateY(24px); }
                       to  { opacity: 1; transform: translateX(-50%) translateY(0); } }

/* Mobil */
@media (max-width: 560px) {
  .svc-box { padding: 22px 20px; border-radius: 18px; }
  .svc-box.is-modal { top: auto; bottom: 12px; transform: translateX(-50%); max-height: 88vh; overflow-y: auto; }
  .svc-actions { flex-direction: column; align-items: stretch; }
  .svc-btn { width: 100%; }
  .svc-btn-settings { order: 3; }
}

/* Reduzierte Bewegung respektieren */
@media (prefers-reduced-motion: reduce) {
  .svc-box, .svc-overlay, #svc-reopen { animation: none; transition: none; }
}
