:root {
  --fb-accent: #1976d2;
  --fb-accent-deep: #12508f;
  --fb-accent-tint: #eef4fc;
  --fb-accent-line: #b8d2f0;
  --fb-ink: #07102d;
  --fb-muted: #545763;
  --fb-line: #e2e6ec;
  --fb-panel: #f7fafd;
  --fb-paper: #ffffff;
  --fb-shadow: 0 8px 30px rgba(7, 16, 45, 0.08);
}

:is(.dark *) {
  --fb-accent: #5ea8f0;
  --fb-accent-deep: #9ccbf7;
  --fb-accent-tint: #202650;
  --fb-accent-line: #38407a;
  --fb-ink: #eef1f6;
  --fb-muted: #b3bac7;
  --fb-line: #343a6b;
  --fb-panel: #21254a;
  --fb-paper: #262b57;
  --fb-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}

.bdj-fb {
  color: var(--fb-ink);
}

.bdj-fb-card {
  background: var(--fb-paper);
  border: 1px solid var(--fb-line);
  border-radius: 20px;
  box-shadow: var(--fb-shadow);
  padding: 32px;
  margin-bottom: 28px;
}

.bdj-fb-card h2 {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--fb-ink);
  margin: 0 0 20px;
}

.bdj-fb-card h2:not(:first-child) {
  margin-top: 36px;
}

.bdj-fb [hidden] {
  display: none;
}

.bdj-fb-intro p {
  color: var(--fb-muted);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.65;
  margin: 0 0 18px;
}

.bdj-fb-intro p:last-child {
  margin-bottom: 0;
}

.bdj-fb a {
  color: var(--fb-accent-deep);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.bdj-fb a:hover {
  color: var(--fb-accent);
}

.bdj-fb-note {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: var(--fb-accent-tint);
  border: 1px solid var(--fb-accent-line);
  border-left: 4px solid var(--fb-accent);
  border-radius: 12px;
  padding: 16px 18px;
  color: var(--fb-muted);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.6;
  margin-top: 24px;
}

.bdj-fb-note strong {
  color: var(--fb-ink);
}

.bdj-fb-note svg {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  color: var(--fb-accent);
}

.bdj-fb-alert {
  background: #fdeceb;
  border: 1px solid #f2b8b5;
  border-left: 4px solid #c0392b;
  border-radius: 12px;
  padding: 16px 18px;
  margin-bottom: 28px;
  color: #7f231b;
  font-weight: 600;
}

:is(.dark *) .bdj-fb-alert {
  background: #3a1f1d;
  border-color: #6d3b36;
  color: #f6c9c4;
}

.bdj-fb-alert ul {
  margin: 0;
  padding-left: 20px;
  list-style: disc;
}

.bdj-fb-frage {
  border: 0;
  border-top: 1px solid var(--fb-line);
  padding: 36px 0 0;
  margin: 36px 0 0;
  min-width: 0;
}

.bdj-fb-frage:first-of-type {
  border-top: 0;
  padding-top: 0;
  margin-top: 0;
}

.bdj-fb-legend {
  display: flex;
  align-items: baseline;
  gap: 12px;
  width: 100%;
  padding: 0;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--fb-ink);
  margin-bottom: 8px;
}

.bdj-fb-nr {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--fb-accent);
  color: #ffffff;
  font-size: 0.875rem;
  font-weight: 700;
}

:is(.dark *) .bdj-fb-nr {
  color: #0f1226;
}

.bdj-fb-nr:empty {
  display: none;
}

.bdj-fb-hint {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--fb-muted);
  margin: 0 0 14px 40px;
  line-height: 1.55;
}

.bdj-fb-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin-left: 40px;
}

.bdj-fb-option {
  position: relative;
}

.bdj-fb-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  margin: 0;
}

.bdj-fb-option label {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 100%;
  margin: 0;
  padding: 13px 15px;
  border: 2px solid var(--fb-line);
  border-radius: 14px;
  background: var(--fb-paper);
  color: var(--fb-ink);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.35;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.bdj-fb-option label svg {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  color: var(--fb-muted);
}

.bdj-fb-option label:hover {
  border-color: var(--fb-accent-line);
  background: var(--fb-panel);
}

.bdj-fb-option input:checked + label {
  border-color: var(--fb-accent);
  background: var(--fb-accent-tint);
}

.bdj-fb-option input:checked + label svg {
  color: var(--fb-accent);
}

.bdj-fb-option input:focus-visible + label {
  outline: 2px solid var(--fb-accent);
  outline-offset: 2px;
}

.bdj-fb-matrix {
  margin-left: 40px;
  border: 1px solid var(--fb-line);
  border-radius: 14px;
  overflow: hidden;
}

.bdj-fb-matrix-zeile {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
  padding: 13px 16px;
  border-top: 1px solid var(--fb-line);
}

.bdj-fb-matrix-zeile:first-child {
  border-top: 0;
}

.bdj-fb-matrix-zeile:nth-child(odd) {
  background: var(--fb-panel);
}

.bdj-fb-matrix-name {
  flex: 1 1 220px;
  min-width: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--fb-ink);
}

.bdj-fb-matrix-zusatz {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--fb-muted);
}

.bdj-fb-matrix-optionen {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.bdj-fb-option-klein label {
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 0.8125rem;
  white-space: nowrap;
}

.bdj-fb-reset {
  display: none;
  margin: 10px 0 0 40px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--fb-accent-deep);
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}

.bdj-fb-reset:focus-visible {
  outline: 2px solid var(--fb-accent);
  outline-offset: 2px;
}

.bdj-fb-plus {
  border-left: 5px solid var(--fb-accent);
  background: var(--fb-panel);
}

.bdj-fb-mehr-kopf {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  border: 1px solid var(--fb-accent-line);
  border-radius: 14px;
  background: var(--fb-paper);
  cursor: pointer;
  list-style: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.bdj-fb-mehr-kopf::-webkit-details-marker {
  display: none;
}

.bdj-fb-mehr-kopf:hover {
  border-color: var(--fb-accent);
  box-shadow: 0 2px 12px rgba(25, 118, 210, 0.18);
}

.bdj-fb-mehr-kopf:focus-visible {
  outline: 2px solid var(--fb-accent);
  outline-offset: 3px;
}

.bdj-fb-mehr-icon {
  flex: 0 0 auto;
  color: var(--fb-accent);
}

.bdj-fb-mehr-icon svg {
  width: 32px;
  height: 32px;
}

.bdj-fb-mehr-text {
  flex: 1 1 240px;
  min-width: 0;
}

.bdj-fb-mehr-titel {
  display: block;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--fb-ink);
  margin-bottom: 4px;
}

.bdj-fb-mehr-zusatz {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.55;
  color: var(--fb-muted);
}

.bdj-fb-mehr-aktion {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  border-radius: 10px;
  background: var(--fb-accent);
  color: #ffffff;
  font-size: 0.875rem;
  font-weight: 700;
  white-space: nowrap;
}

:is(.dark *) .bdj-fb-mehr-aktion {
  color: #0f1226;
}

.bdj-fb-mehr-aktion svg {
  width: 14px;
  height: 14px;
  transition: transform 0.2s ease;
}

.bdj-fb-mehr[open] .bdj-fb-mehr-aktion svg {
  transform: rotate(180deg);
}

.bdj-fb-mehr-auf {
  display: none;
}

.bdj-fb-mehr[open] .bdj-fb-mehr-zu {
  display: none;
}

.bdj-fb-mehr[open] .bdj-fb-mehr-auf {
  display: inline;
}

.bdj-fb-mehr-inhalt {
  padding-top: 32px;
}

.bdj-fb-feld {
  margin-bottom: 22px;
}

.bdj-fb-feld label {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--fb-ink);
  margin-bottom: 8px;
}

.bdj-fb-feld input,
.bdj-fb-feld textarea {
  display: block;
  width: 100%;
  padding: 12px 14px;
  border: 2px solid var(--fb-line);
  border-radius: 12px;
  background: var(--fb-paper);
  color: var(--fb-ink);
  font-family: inherit;
  font-size: 0.95rem;
  line-height: 1.5;
}

.bdj-fb-feld input:focus,
.bdj-fb-feld textarea:focus {
  outline: none;
  border-color: var(--fb-accent);
}

.bdj-fb-feld textarea {
  resize: vertical;
  min-height: 140px;
}

.bdj-fb-feld small {
  display: block;
  margin-top: 6px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--fb-muted);
}

.bdj-fb-wunschtext {
  max-width: 560px;
  margin: 16px 0 0 40px;
}

.bdj-fb-zaehler {
  display: block;
  margin-top: 6px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--fb-muted);
}

.bdj-fb-submit {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border: 0;
  border-radius: 12px;
  background: var(--fb-accent);
  color: #ffffff;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

:is(.dark *) .bdj-fb-submit {
  color: #0f1226;
}

.bdj-fb-submit:hover {
  background: var(--fb-accent-deep);
}

.bdj-fb-submit:focus-visible {
  outline: 2px solid var(--fb-ink);
  outline-offset: 3px;
}

.bdj-fb-submit svg {
  width: 20px;
  height: 20px;
}

.bdj-fb-danke {
  text-align: center;
  padding: 20px 0;
}

.bdj-fb-danke svg {
  display: block;
  width: 56px;
  height: 56px;
  color: var(--fb-accent);
  margin: 0 auto 16px;
}

.bdj-fb-danke p {
  color: var(--fb-muted);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.65;
  margin: 0 0 16px;
}

.bdj-fb-danke p:last-child {
  margin-bottom: 0;
}

.bdj-fb-liste {
  margin: 0;
  padding-left: 22px;
  list-style: disc;
}

.bdj-fb-liste li {
  color: var(--fb-muted);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.65;
  margin-bottom: 12px;
}

.bdj-fb-liste li:last-child {
  margin-bottom: 0;
}

.bdj-fb-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

@media (max-width: 640px) {
  .bdj-fb-card {
    padding: 24px 20px;
  }

  .bdj-fb-hint,
  .bdj-fb-options,
  .bdj-fb-matrix,
  .bdj-fb-reset,
  .bdj-fb-wunschtext {
    margin-left: 0;
  }

  .bdj-fb-matrix-optionen {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  .bdj-fb-option-klein label {
    justify-content: center;
    white-space: normal;
    text-align: center;
  }

  .bdj-fb-frage {
    padding-top: 28px;
    margin-top: 28px;
  }

  .bdj-fb-mehr-inhalt {
    padding-top: 28px;
  }

  .bdj-fb-mehr-aktion {
    width: 100%;
    justify-content: center;
  }

  .bdj-fb-submit {
    width: 100%;
    justify-content: center;
  }
}
