/* Datenschutz-Leiste. Im Normalfall eine dezente Leiste unten. Wer über
   eine Anzeige kommt, sieht sie stattdessen oben mit abgedunkeltem,
   leicht verwischtem Hintergrund (.meta-consent--spotlight) - dort zählt
   die Entscheidung, weil die Messung sonst nie zustande kommt. */
.meta-consent-backdrop {
  position: fixed;
  z-index: 1999;
  inset: 0;
  background: rgba(20, 17, 40, 0.38);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  animation: meta-consent-in 180ms ease-out;
}

.meta-consent {
  position: fixed;
  z-index: 2000;
  right: 16px;
  bottom: 16px;
  left: 16px;
  display: flex;
  max-width: 760px;
  align-items: center;
  gap: 16px;
  margin: 0 auto;
  padding: 12px 12px 12px 18px;
  border: 1px solid var(--line, rgba(23, 20, 33, 0.1));
  border-radius: 14px;
  background: var(--surface, #fff);
  box-shadow: 0 10px 32px rgba(20, 17, 40, 0.12);
  color: var(--text, #15141b);
  font-family:
    Inter,
    ui-sans-serif,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  animation: meta-consent-in 180ms ease-out;
}

/* Nur für Besucher aus einer Anzeige: die Leiste steht oben und der
   Hintergrund ist abgedunkelt. `bottom: auto` ist hier entscheidend -
   mit gesetztem top UND bottom zieht sich die Leiste sonst über die
   gesamte Bildschirmhöhe, was auf dem Handy die ganze Seite verdeckt
   hat. */
.meta-consent--spotlight {
  top: 16px;
  bottom: auto;
}

.meta-consent-copy {
  min-width: 0;
  flex: 1;
  margin: 0;
  color: var(--muted, #706f7c);
  font-size: 13px;
  line-height: 1.45;
}

.meta-consent-copy b {
  color: var(--text, #15141b);
  font-weight: 800;
}

.meta-consent-copy a {
  color: var(--muted, #706f7c);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.meta-consent-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
}

.meta-consent button,
.meta-settings {
  font:
    700 12px/1 Inter,
    ui-sans-serif,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  cursor: pointer;
}

.meta-consent button {
  min-height: 36px;
  padding: 0 14px;
  border-radius: 10px;
  white-space: nowrap;
}

.meta-consent-settings {
  border: 0;
  background: transparent;
  color: var(--muted, #706f7c);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.meta-consent-save {
  border: 1px solid var(--line, rgba(23, 20, 33, 0.14));
  background: var(--surface, #fff);
  color: var(--text, #15141b);
}

.meta-consent-panel {
  flex-wrap: wrap;
}

.meta-consent-panel .meta-consent-copy {
  flex-basis: 100%;
}

.meta-consent-options {
  display: grid;
  min-width: 0;
  flex: 1;
  gap: 8px;
}

.meta-consent-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  line-height: 1.4;
  cursor: pointer;
}

.meta-consent-option input {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  accent-color: var(--primary, #9639d7);
}

.meta-consent-option b {
  display: block;
  font-weight: 800;
}

.meta-consent-option small {
  color: var(--muted, #706f7c);
  font-size: 12px;
}

.meta-consent-accept {
  border: 1px solid transparent;
  background: var(--primary, #9639d7);
  color: #fff;
}

.meta-consent button:hover,
.meta-consent button:focus-visible {
  filter: brightness(0.96);
}

.meta-settings {
  position: fixed;
  left: 12px;
  bottom: 10px;
  z-index: 1100;
  padding: 6px 9px;
  border: 0;
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface, #fff) 86%, transparent);
  color: var(--muted, #706f7c);
  font-size: 10px;
  opacity: 0.72;
}

.meta-settings:hover,
.meta-settings:focus-visible {
  opacity: 1;
}

@keyframes meta-consent-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 620px) {
  .meta-consent {
    right: 8px;
    bottom: max(8px, env(safe-area-inset-bottom));
    left: 8px;
    top: auto;
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
    padding: 12px;
  }

  .meta-consent--spotlight {
    top: max(8px, env(safe-area-inset-top));
    bottom: auto;
  }

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

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