/* ===================== CONSENT BANNER ===================== */
.consent-banner {
  position: fixed;
  left: 24px;
  bottom: 24px;
  z-index: 300;
  width: min(440px, calc(100vw - 32px));
  background: #ffffff;
  border: 1px solid rgba(52,87,213,.12);
  border-radius: 18px;
  padding: 24px 24px 20px;
  box-shadow:
    0 2px 4px rgba(52,87,213,.06),
    0 12px 32px rgba(52,87,213,.14),
    0 32px 64px rgba(26,26,46,.12);
  font-family: 'Roboto', sans-serif;
  color: #6B7280;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .35s ease, transform .45s cubic-bezier(0.16, 1, 0.3, 1);
}
.consent-banner.is-visible { opacity: 1; transform: translateY(0); }

.consent-banner h2 {
  font-family: 'Roboto', sans-serif;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.3;
  color: #1A1A2E;
  margin: 0 0 8px;
}
.consent-banner p {
  font-size: 14px;
  line-height: 1.6;
  color: #6B7280;
  margin: 0;
}
.consent-banner a {
  color: #3457d5;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.consent-banner a:hover { color: #1A1A2E; }

/* Kategorien */
.consent-options {
  margin: 16px 0 4px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.consent-options[hidden] { display: none; }
.consent-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid #E5E7EB;
  border-radius: 12px;
  background: #F5F6F8;
  cursor: pointer;
}
.consent-option.is-locked { cursor: default; }
.consent-option input {
  appearance: none;
  -webkit-appearance: none;
  flex-shrink: 0;
  position: relative;
  width: 36px;
  height: 20px;
  margin-top: 1px;
  border-radius: 999px;
  background: #D1D5DB;
  cursor: pointer;
  transition: background-color .2s ease;
}
.consent-option input::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(26,26,46,.25);
  transition: transform .25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.consent-option input:checked { background: #3457d5; }
.consent-option input:checked::after { transform: translateX(16px); }
.consent-option input:disabled { opacity: .55; cursor: default; }
.consent-option input:focus-visible { outline: 2px solid #3457d5; outline-offset: 3px; }
.consent-option-text { display: flex; flex-direction: column; gap: 2px; }
.consent-option-text strong {
  font-size: 14px;
  font-weight: 600;
  color: #1A1A2E;
}
.consent-option-text span { font-size: 13px; line-height: 1.5; }

/* Buttons */
.consent-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 18px;
}
.consent-btn {
  font-family: 'Roboto', sans-serif;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  padding: 13px 16px;
  border-radius: 10px;
  cursor: pointer;
  border: 1.5px solid #3457d5;
  transition: transform .2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow .2s ease, background-color .18s ease, color .18s ease;
}
.consent-btn:focus-visible { outline: 2px solid #3457d5; outline-offset: 3px; }
.consent-btn:active { transform: scale(0.97); }
.consent-btn--primary { background: #3457d5; color: #ffffff; }
.consent-btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(52,87,213,.18), 0 8px 20px rgba(52,87,213,.22);
}
.consent-btn--secondary { background: #ffffff; color: #3457d5; }
.consent-btn--secondary:hover { background: rgba(52,87,213,.06); transform: translateY(-1px); }

.consent-more {
  display: block;
  margin: 12px auto 0;
  background: none;
  border: none;
  padding: 4px 8px;
  border-radius: 6px;
  font-family: 'Roboto', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: #6B7280;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color .18s ease;
}
.consent-more:hover { color: #3457d5; }
.consent-more:focus-visible { outline: 2px solid #3457d5; outline-offset: 2px; }
.consent-more:active { color: #1A1A2E; }

@media (max-width: 640px) {
  .consent-banner { left: 16px; right: 16px; bottom: 16px; width: auto; padding: 20px 18px 16px; }
  .consent-actions { grid-template-columns: 1fr; }
  .consent-btn { min-height: 44px; }
}

/* ===================== PLATZHALTER: EXTERNES FORMULAR ===================== */
.consent-placeholder {
  position: relative;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  background: #ffffff;
  overflow: hidden;
  min-height: 494px; /* Höhe des geladenen Lead-Booster-Formulars */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 32px;
  text-align: center;
}
.consent-placeholder::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 6px;
  background: linear-gradient(90deg, #3457d5 25%, #E5E7EB 25%);
}
/* Angedeutete Formular-Struktur im Hintergrund */
.consent-placeholder-ghost {
  position: absolute;
  inset: 48px 40px 40px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: 120px 1fr 48px;
  gap: 16px;
  opacity: .5;
  pointer-events: none;
}
.consent-placeholder-ghost span {
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  background: #F5F6F8;
}
.consent-placeholder-ghost span:nth-child(4) { grid-column: 1 / -1; }
.consent-placeholder-ghost span:nth-child(5) { grid-column: 1 / -1; background: rgba(52,87,213,.15); border-color: transparent; }
.consent-placeholder-inner {
  position: relative;
  max-width: 340px;
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(52,87,213,.10);
  border-radius: 16px;
  padding: 28px 24px 22px;
  box-shadow: 0 2px 4px rgba(52,87,213,.05), 0 12px 32px rgba(52,87,213,.12);
}
.consent-placeholder-inner h3 {
  font-family: 'Roboto', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: #1A1A2E;
  margin: 0 0 8px;
}
.consent-placeholder-inner p {
  font-size: 14px;
  line-height: 1.6;
  color: #6B7280;
  margin: 0 0 18px;
}
.consent-placeholder-inner .consent-btn { width: 100%; }
.consent-placeholder-inner small {
  display: block;
  margin-top: 12px;
  font-size: 12px;
  color: #6B7280;
}
.consent-placeholder-inner small a {
  color: #3457d5;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.consent-placeholder-inner small a:hover { color: #1A1A2E; }

@media (max-width: 640px) {
  .consent-placeholder { min-height: 380px; padding: 32px 16px; }
  .consent-placeholder-ghost { inset: 32px 16px 24px; grid-template-rows: 90px 1fr 44px; gap: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .consent-banner, .consent-btn, .consent-option input, .consent-option input::after { transition: none; }
}
