/* ============================================================
 * Bona Vita® Portal — Welle 7.7
 * Consent-Gate (Privacy-by-Design)
 * Würdiger Modal-Dialog beim ersten Login.
 * ============================================================ */

.bv-consent-gate {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  animation: bvConsentFadeIn 320ms ease-out both;
}
.bv-consent-gate.is-closing {
  animation: bvConsentFadeOut 260ms ease-in both;
}

.bv-consent-gate__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 24, 38, 0.62);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.bv-consent-gate__panel {
  position: relative;
  z-index: 1;
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  overflow: auto;
  background: #fefcf6;
  border: 1px solid rgba(212, 184, 138, 0.55);
  border-radius: 16px;
  box-shadow: 0 24px 80px rgba(28, 37, 69, 0.30),
              0 6px 24px rgba(28, 37, 69, 0.18);
  animation: bvConsentSlideIn 380ms cubic-bezier(.21, 1.02, .73, 1) both;
}

@keyframes bvConsentFadeIn  { from { opacity: 0 } to { opacity: 1 } }
@keyframes bvConsentFadeOut { from { opacity: 1 } to { opacity: 0 } }
@keyframes bvConsentSlideIn {
  0%   { opacity: 0; transform: translateY(20px) scale(.97); }
  100% { opacity: 1; transform: translateY(0)    scale(1); }
}

/* ─── Header ───────────────────────────────────────────────── */
.bv-consent-gate__head {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 26px 28px 14px;
  border-bottom: 1px solid rgba(28, 37, 69, 0.08);
}
.bv-consent-gate__crest {
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1c2545 0%, #2c3a6e 100%);
  color: #f8f4ec;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 26px;
  font-weight: 600;
  box-shadow: 0 0 0 2px #fefcf6, 0 0 0 3px rgba(212, 184, 138, 0.55);
}
.bv-consent-gate__title {
  margin: 0;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 26px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #1c2545;
  line-height: 1.15;
}
.bv-consent-gate__sub {
  margin: 4px 0 0;
  font-size: 14px;
  line-height: 1.45;
  color: #4a5066;
}

/* ─── Body ─────────────────────────────────────────────────── */
.bv-consent-gate__body {
  padding: 18px 28px 8px;
}
.bv-consent-gate__intro {
  font-size: 14px;
  line-height: 1.55;
  color: #2a2f3d;
  margin-bottom: 18px;
}
.bv-consent-gate__intro p { margin: 0 0 8px; }
.bv-consent-gate__link {
  color: #1c2545;
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid rgba(212, 184, 138, 0.7);
  padding-bottom: 1px;
  transition: border-color 160ms;
}
.bv-consent-gate__link:hover {
  border-bottom-color: #c9a25b;
}

.bv-consent-gate__form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 8px 0 6px;
}
.bv-consent-gate__item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(28, 37, 69, 0.10);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  transition: border-color 160ms, background 160ms;
}
.bv-consent-gate__item:hover {
  border-color: rgba(212, 184, 138, 0.7);
  background: #fbf9f4;
}
.bv-consent-gate__item.is-required {
  border-color: rgba(201, 162, 91, 0.55);
  background: #fbf6ec;
}
.bv-consent-gate__item input[type="checkbox"] {
  flex: 0 0 auto;
  margin-top: 2px;
  width: 18px;
  height: 18px;
  accent-color: #1c2545;
}
.bv-consent-gate__item-body { flex: 1 1 auto; min-width: 0; }
.bv-consent-gate__item-label {
  font-size: 14.5px;
  font-weight: 500;
  color: #1c2545;
  line-height: 1.35;
}
.bv-consent-gate__item-hint {
  margin-top: 3px;
  font-size: 12.5px;
  line-height: 1.4;
  color: #5a6075;
}
.bv-consent-gate__pflicht {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 8px;
  background: #c9a25b;
  color: #1a1d24;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  vertical-align: 1px;
}

/* ─── Footer ───────────────────────────────────────────────── */
.bv-consent-gate__foot {
  padding: 18px 28px 26px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.bv-consent-gate__cta {
  width: 100%;
  padding: 12px 18px;
  background: #1c2545;
  color: #f8f4ec;
  border: none;
  border-radius: 999px;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: transform 160ms, box-shadow 160ms, opacity 160ms;
}
.bv-consent-gate__cta:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(28, 37, 69, 0.30);
}
.bv-consent-gate__cta:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.bv-consent-gate__legal {
  margin: 0;
  font-size: 12px;
  line-height: 1.4;
  color: #6a7080;
  text-align: center;
}

/* ─── Mobile ───────────────────────────────────────────────── */
@media (max-width: 640px) {
  .bv-consent-gate__panel { width: calc(100vw - 16px); border-radius: 12px; }
  .bv-consent-gate__head  { padding: 20px 18px 12px; }
  .bv-consent-gate__body  { padding: 14px 18px 6px; }
  .bv-consent-gate__foot  { padding: 14px 18px 20px; }
  .bv-consent-gate__title { font-size: 22px; }
  .bv-consent-gate__crest { width: 44px; height: 44px; font-size: 22px; }
}

/* ─── Reduced motion ───────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .bv-consent-gate,
  .bv-consent-gate__panel { animation: none; }
}

/* ============================================================
 * Datenschutzerklärung-Seite (legal/datenschutzerklaerung.html)
 * ============================================================ */
.bv-legal {
  max-width: 760px;
  margin: 40px auto;
  padding: 32px 28px;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.65;
  color: #1f2433;
  background: #fefcf6;
  border-radius: 12px;
}
.bv-legal__title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 32px;
  font-weight: 600;
  color: #1c2545;
  margin: 0 0 8px;
}
.bv-legal__sub  { font-size: 16px; color: #4a5066; margin: 0 0 8px; }
.bv-legal__meta { font-size: 12.5px; color: #6a7080; margin: 0 0 28px; }
.bv-legal h2 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 22px;
  color: #1c2545;
  margin: 28px 0 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(212, 184, 138, 0.5);
}
.bv-legal h3 { font-size: 16px; color: #2a2f3d; margin: 18px 0 6px; }
.bv-legal a { color: #1c2545; }
.bv-legal__table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
  font-size: 14px;
}
.bv-legal__table th,
.bv-legal__table td {
  padding: 10px 12px;
  border: 1px solid rgba(28, 37, 69, 0.10);
  text-align: left;
  vertical-align: top;
}
.bv-legal__table thead th {
  background: #fbf6ec;
  font-weight: 600;
  color: #1c2545;
}
.bv-legal__foot {
  margin-top: 36px;
  padding-top: 18px;
  border-top: 1px solid rgba(28, 37, 69, 0.10);
  font-size: 13px;
  color: #5a6075;
  text-align: center;
}

/* Re-Approval-Variante (neue Policy-Version) */
.bv-consent-gate.is-reapproval .bv-consent-gate__crest {
  background: #b88a2a;
  color: #fff;
}
.bv-consent-gate__diff {
  display: inline-block;
  padding: 8px 14px;
  background: rgba(184, 138, 42, 0.10);
  border: 1px solid rgba(184, 138, 42, 0.35);
  border-radius: 8px;
  font-size: 0.84rem;
  font-variant-numeric: tabular-nums;
  margin: 4px 0 8px;
  color: #6e4f12;
}
