/*
 * Saatio Cookie-Consent — Styles (Vanilla, keine Dependencies).
 * Website-Stil: Urbanist, Indigo/Violet. Prefix: .sc-  (keine Kollisionen).
 * "Alle akzeptieren" und "Nur essenzielle" sind bewusst GLEICHWERTIG
 * (identischer Button-Stil, gleiche Größe/Ebene) – kein Dark Pattern.
 */
#sc-root {
  --sc-indigo: #6366f1;
  --sc-violet: #a855f7;
  --sc-grad: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
  --sc-ink: #0b0f19;
  --sc-ink-soft: #3a4256;
  --sc-mute: #6b7280;
  --sc-line: #e7e9ee;
  --sc-white: #ffffff;
  --sc-bg: #f6f6fb;
}

#sc-root, #sc-root * {
  box-sizing: border-box;
  font-family: 'Urbanist', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
#sc-root a { color: var(--sc-indigo); text-decoration: underline; }
#sc-root a:hover { color: var(--sc-violet); }

/* ---------------- Banner (Bottom-Card, nicht blockierend) ---------------- */
.sc-banner {
  position: fixed;
  left: 16px; right: 16px; bottom: 16px;
  z-index: 2147483000;
  max-width: 940px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
  background: var(--sc-white);
  border: 1px solid var(--sc-line);
  border-radius: 18px;
  box-shadow: 0 24px 60px -20px rgba(11, 15, 25, 0.30), 0 0 0 1px rgba(11, 15, 25, 0.02);
  padding: 22px 24px;
  animation: sc-rise .3s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes sc-rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

.sc-banner-body { flex: 1; min-width: 0; }
.sc-title {
  margin: 0 0 8px;
  font-size: 18px; font-weight: 700; line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--sc-ink);
}
.sc-text {
  margin: 0;
  font-size: 14px; line-height: 1.55;
  color: var(--sc-ink-soft);
}

.sc-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* ---------------- Buttons ---------------- */
.sc-btn {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 12px 22px;
  font-size: 14px; font-weight: 600;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, border-color .15s ease, color .15s ease;
}
.sc-btn:hover { transform: translateY(-1px); }
.sc-btn:focus-visible { outline: 2px solid var(--sc-indigo); outline-offset: 2px; }

/* Solid = Akzeptieren UND Ablehnen (gleichwertig, gleicher Stil/Größe) */
.sc-btn-solid {
  background: var(--sc-grad);
  color: #fff;
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.28);
}
.sc-btn-solid:hover { box-shadow: 0 8px 26px rgba(99, 102, 241, 0.42); }

/* Ghost = dritte Option "Einstellungen" (granular) */
.sc-btn-ghost {
  background: var(--sc-white);
  color: var(--sc-ink);
  border-color: var(--sc-line);
}
.sc-btn-ghost:hover { border-color: var(--sc-mute); background: var(--sc-bg); }

/* ---------------- Einstellungen (Modal) ---------------- */
.sc-overlay {
  position: fixed; inset: 0;
  z-index: 2147483000;
  background: rgba(11, 15, 25, 0.45);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  animation: sc-fade .2s ease both;
}
@keyframes sc-fade { from { opacity: 0; } to { opacity: 1; } }

.sc-modal {
  position: fixed;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  z-index: 2147483001;
  width: calc(100% - 32px);
  max-width: 640px;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  background: var(--sc-white);
  border: 1px solid var(--sc-line);
  border-radius: 20px;
  box-shadow: 0 40px 90px -24px rgba(11, 15, 25, 0.45);
  padding: 28px;
  animation: sc-pop .28s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes sc-pop { from { opacity: 0; transform: translate(-50%, -46%) scale(.98); } to { opacity: 1; transform: translate(-50%, -50%) scale(1); } }

.sc-modal .sc-title { font-size: 22px; }
.sc-modal .sc-text { margin-bottom: 20px; }

.sc-cats { display: flex; flex-direction: column; gap: 14px; margin-bottom: 24px; }
.sc-cat {
  border: 1px solid var(--sc-line);
  border-radius: 14px;
  padding: 16px 18px;
  background: var(--sc-bg);
}
.sc-cat-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.sc-cat-name { font-size: 15px; font-weight: 600; color: var(--sc-ink); }
.sc-cat-desc { margin: 8px 0 0; font-size: 13px; line-height: 1.5; color: var(--sc-ink-soft); }

.sc-svc { list-style: none; margin: 10px 0 0; padding: 0; }
.sc-svc li { font-size: 12px; line-height: 1.5; color: var(--sc-mute); }
.sc-svc li + li { margin-top: 4px; }
.sc-svc strong { color: var(--sc-ink-soft); font-weight: 600; }
.sc-cookies { display: inline-block; color: var(--sc-mute); }
.sc-svc-empty { margin: 8px 0 0; font-size: 12px; color: var(--sc-mute); font-style: italic; }

/* ---------------- Toggle-Switch ---------------- */
.sc-switch { position: relative; flex-shrink: 0; width: 46px; height: 26px; display: inline-block; }
.sc-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.sc-slider {
  position: absolute; inset: 0;
  background: #cfd2da;
  border-radius: 999px;
  transition: background .2s ease;
}
.sc-slider::before {
  content: '';
  position: absolute; left: 3px; top: 3px;
  width: 20px; height: 20px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  transition: transform .2s ease;
}
.sc-switch input:checked + .sc-slider { background: var(--sc-grad); }
.sc-switch input:checked + .sc-slider::before { transform: translateX(20px); }
.sc-switch input:focus-visible + .sc-slider { outline: 2px solid var(--sc-indigo); outline-offset: 2px; }
.sc-switch-locked { opacity: 0.7; cursor: not-allowed; }
.sc-switch-locked input:checked + .sc-slider { background: #b6bac6; }

.sc-modal .sc-actions { justify-content: flex-end; }

/* ---------------- Schwebendes Schild-Widget (unten links) ---------------- */
.sc-widget {
  position: fixed;
  left: 18px; bottom: 18px;
  z-index: 2147482000;                 /* unter Banner/Modal */
  width: 46px; height: 46px;
  padding: 0;
  display: none;                       /* JS blendet nach Bestätigung ein */
  align-items: center; justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 10px 26px -8px rgba(99, 102, 241, 0.55), 0 2px 6px rgba(11, 15, 25, 0.18);
  transition: transform .15s ease, box-shadow .15s ease;
  font-family: 'Urbanist', -apple-system, BlinkMacSystemFont, sans-serif;
}
.sc-widget:hover { transform: translateY(-2px); box-shadow: 0 14px 32px -8px rgba(99, 102, 241, 0.65), 0 2px 8px rgba(11, 15, 25, 0.22); }
.sc-widget:focus-visible { outline: 2px solid #6366f1; outline-offset: 3px; }
.sc-widget svg { width: 22px; height: 22px; display: block; }
@media (max-width: 720px) { .sc-widget { left: 12px; bottom: 12px; width: 44px; height: 44px; } }
@media (prefers-reduced-motion: reduce) { .sc-widget:hover { transform: none; } }

/* ---------------- Mobil ---------------- */
@media (max-width: 720px) {
  .sc-banner { flex-direction: column; align-items: stretch; gap: 16px; padding: 20px; }
  .sc-actions { flex-direction: column-reverse; }
  .sc-btn { width: 100%; padding: 14px 22px; }
  .sc-modal { padding: 22px 20px; }
  .sc-modal .sc-actions { flex-direction: column-reverse; }
}

/* ---------------- Dark Mode (System) ---------------- */
@media (prefers-color-scheme: dark) {
  #sc-root {
    --sc-ink: #f3f4f8;
    --sc-ink-soft: #c3c7d2;
    --sc-mute: #9aa0ae;
    --sc-line: #2a2e39;
    --sc-white: #1c1f26;
    --sc-bg: #23262f;
  }
  .sc-btn-ghost { color: var(--sc-ink); }
}

@media (prefers-reduced-motion: reduce) {
  .sc-banner, .sc-modal, .sc-overlay { animation: none; }
  .sc-btn:hover { transform: none; }
}
