/* ============================================================
   VitaScreen — Cookie-Consent-Banner (DSGVO / TDDDG, Google Consent Mode v2)
   Eigenstaendig, keine Abhaengigkeit von site.css oder Inline-<style>.
   ============================================================ */
.vs-consent {
  --vc-blue:      #0075C9;
  --vc-blue-dark: #005FA6;
  --vc-navy:      #033B64;
  --vc-ink:       #1F2D3A;
  --vc-body:      #46586A;
  --vc-hairline:  #E6EDF3;
  --vc-paper:     #FAFBFC;
  --vc-white:     #FFFFFF;

  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 999999;
  display: flex;
  justify-content: center;
  padding: 16px;
  padding-bottom: max(16px, env(safe-area-inset-bottom));
  font-family: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  transform: translateY(12px);
  opacity: 0;
  pointer-events: none;
  transition: transform .28s ease, opacity .28s ease;
}
.vs-consent[hidden] { display: none; }
.vs-consent.is-visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.vs-consent__card {
  width: 100%;
  max-width: 640px;
  background: var(--vc-white);
  color: var(--vc-body);
  border: 1px solid var(--vc-hairline);
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(3,59,100,.18), 0 2px 8px rgba(3,59,100,.08);
  padding: 20px 22px;
  max-height: min(560px, 82vh);
  overflow-y: auto;
}

.vs-consent__title {
  margin: 0 0 6px;
  font-weight: 700;
  font-size: 16px;
  color: var(--vc-navy);
  line-height: 1.3;
}
.vs-consent__text {
  margin: 0 0 16px;
  font-size: 13.5px;
  line-height: 1.55;
}
.vs-consent__text a { color: var(--vc-blue); text-decoration: underline; }

.vs-consent__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}
.vs-consent__btn {
  appearance: none;
  border-radius: 10px;
  padding: 11px 18px;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  line-height: 1.2;
  white-space: nowrap;
}
.vs-consent__btn--primary {
  background: var(--vc-blue);
  color: #fff;
  box-shadow: 0 4px 14px rgba(0,117,201,.28);
}
.vs-consent__btn--primary:hover { background: var(--vc-blue-dark); }
.vs-consent__btn--outline {
  background: var(--vc-white);
  color: var(--vc-navy);
  border-color: #C7D6E2;
}
.vs-consent__btn--outline:hover { background: var(--vc-paper); }
.vs-consent__btn--ghost {
  background: transparent;
  color: var(--vc-body);
  text-decoration: underline;
  padding-left: 6px;
  padding-right: 6px;
  margin-right: auto;
}
.vs-consent__btn--ghost:hover { color: var(--vc-navy); }

/* --- Detail-Ansicht (Einstellungen) --- */
.vs-consent__list {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  border-top: 1px solid var(--vc-hairline);
}
.vs-consent__item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 13px 0;
  border-bottom: 1px solid var(--vc-hairline);
}
.vs-consent__item-body { flex: 1; min-width: 0; }
.vs-consent__item-name {
  font-weight: 600;
  font-size: 13.5px;
  color: var(--vc-navy);
  margin: 0 0 2px;
}
.vs-consent__item-desc {
  font-size: 12.5px;
  line-height: 1.5;
  margin: 0;
  color: var(--vc-body);
}

/* Toggle-Switch */
.vs-consent__switch {
  position: relative;
  flex: none;
  width: 40px;
  height: 24px;
  margin-top: 1px;
}
.vs-consent__switch input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}
.vs-consent__switch-track {
  position: absolute;
  inset: 0;
  background: #C7D6E2;
  border-radius: 999px;
  transition: background .18s ease;
}
.vs-consent__switch-track::before {
  content: "";
  position: absolute;
  top: 3px; left: 3px;
  width: 18px; height: 18px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,.25);
  transition: transform .18s ease;
}
.vs-consent__switch input:checked + .vs-consent__switch-track { background: var(--vc-blue); }
.vs-consent__switch input:checked + .vs-consent__switch-track::before { transform: translateX(16px); }
.vs-consent__switch input:disabled + .vs-consent__switch-track { background: #A7CBE8; cursor: not-allowed; }
.vs-consent__switch input:focus-visible + .vs-consent__switch-track { outline: 2px solid var(--vc-blue); outline-offset: 2px; }

@media (max-width: 560px) {
  .vs-consent { padding: 0; }
  .vs-consent__card {
    max-width: none;
    width: 100%;
    border-radius: 16px 16px 0 0;
    padding: 18px 16px calc(16px + env(safe-area-inset-bottom));
  }
  .vs-consent__actions { flex-direction: column-reverse; align-items: stretch; }
  .vs-consent__btn { width: 100%; text-align: center; padding: 12px 16px; }
  .vs-consent__btn--ghost { margin-right: 0; order: 3; }
}

@media (prefers-reduced-motion: reduce) {
  .vs-consent { transition: none; }
}
