/* SafeNow Consent-Manager — Banner (Ebene 1) + Einstellungen-Dialog (Ebene 2) */

/* ---- Banner ---- */
.cc {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 2000;
  display: flex; justify-content: center; padding: 16px;
  padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  pointer-events: none;
  transform: translateY(130%); transition: transform .45s cubic-bezier(.2, .8, .2, 1);
}
.cc.is-in { transform: none; }
.cc__inner {
  pointer-events: auto; max-width: 760px; width: 100%;
  background: #fff; border: 1px solid rgba(0, 0, 0, 0.12); border-radius: 16px;
  box-shadow: 0 12px 44px rgba(0, 0, 0, 0.20);
  padding: 18px 20px; display: flex; gap: 18px; align-items: center; flex-wrap: wrap;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.cc__text { margin: 0; flex: 1 1 320px; font-size: 0.85rem; line-height: 1.5; color: #1d1d1f; }
.cc__text a { color: #0869D8; }
.cc__actions { display: flex; gap: 10px; flex: 0 0 auto; align-items: center; flex-wrap: wrap; }

/* Buttons — „Ablehnen" und „Akzeptieren" gleich prominent (gleiche Größe/Ebene) */
.cc__btn {
  border: 1px solid transparent; border-radius: 10px; padding: 11px 18px;
  font: inherit; font-size: 0.9rem; font-weight: 500; cursor: pointer;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1; white-space: nowrap;
}
.cc__btn--primary { background: #1d1d1f; color: #fff; border-color: #1d1d1f; }
.cc__btn--primary:hover { background: #000; border-color: #000; }
.cc__btn--outline { background: #fff; color: #1d1d1f; border-color: rgba(0, 0, 0, 0.28); }
.cc__btn--outline:hover { background: #f5f5f7; border-color: rgba(0, 0, 0, 0.45); }
.cc__btn--text { background: transparent; color: #1d1d1f; text-decoration: underline; padding: 11px 8px; }
.cc__btn--text:hover { color: #000; }
.cc__btn:focus-visible { outline: 2px solid #0869D8; outline-offset: 2px; }

@media (max-width: 620px) {
  .cc__inner { flex-direction: column; align-items: stretch; gap: 14px; }
  /* In der Spalte wird die flex-basis (320px vom Desktop-Row-Layout) sonst zur HÖHE
     -> riesiger Weißraum. Text hier natürlich hoch lassen. */
  .cc__text { flex: 0 0 auto; }
  .cc__actions { justify-content: stretch; }
  .cc__actions .cc__btn--outline, .cc__actions .cc__btn--primary { flex: 1; }
}

/* ---- Einstellungen-Dialog (Ebene 2) ---- */
.cc-lock { overflow: hidden; }
.ccm {
  position: fixed; inset: 0; z-index: 2100; display: none;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.ccm.is-in { display: block; }
.ccm__backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.45); }
.ccm__card {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 48px); overflow: auto;
  background: #fff; border-radius: 18px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.32);
  padding: 26px 26px 22px;
}
.ccm__title { margin: 0 0 6px; font-size: 1.25rem; font-weight: 700; color: #1d1d1f; }
.ccm__intro { margin: 0 0 18px; font-size: 0.85rem; line-height: 1.5; color: #55565b; }
.ccm__rows { display: flex; flex-direction: column; gap: 4px; }
.ccm__row { padding: 14px 0; border-top: 1px solid rgba(0, 0, 0, 0.08); }
.ccm__row:first-child { border-top: 0; }
.ccm__row-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.ccm__row-name { font-size: 0.95rem; font-weight: 600; color: #1d1d1f; }
.ccm__row-name em { font-style: normal; font-weight: 500; color: #86868b; font-size: 0.8rem; }
.ccm__row-desc { margin: 6px 0 0; font-size: 0.82rem; line-height: 1.5; color: #55565b; }

/* Toggle-Switch */
.ccm__switch { position: relative; display: inline-block; width: 46px; height: 28px; flex: 0 0 auto; }
.ccm__switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.ccm__slider {
  position: absolute; inset: 0; background: #d2d2d7; border-radius: 999px;
  transition: background .2s ease;
}
.ccm__slider::before {
  content: ""; position: absolute; left: 3px; top: 3px; width: 22px; height: 22px;
  background: #fff; border-radius: 50%; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  transition: transform .2s ease;
}
.ccm__switch input:checked + .ccm__slider { background: #1d1d1f; }
.ccm__switch input:checked + .ccm__slider::before { transform: translateX(18px); }
.ccm__switch input:disabled + .ccm__slider { background: #1d1d1f; opacity: 0.4; cursor: not-allowed; }
.ccm__switch input:focus-visible + .ccm__slider { outline: 2px solid #0869D8; outline-offset: 2px; }

.ccm__actions { display: flex; gap: 10px; margin: 22px 0 4px; flex-wrap: wrap; }
.ccm__actions .cc__btn { flex: 1 1 auto; }
.ccm__link { display: inline-block; margin-top: 10px; font-size: 0.8rem; color: #0869D8; }

@media (max-width: 480px) {
  .ccm__actions { flex-direction: column; }
  .ccm__actions .cc__btn { flex: none; width: 100%; }
}
