/* ============================================================
   Rechtstexte (Impressum, AGB, Datenschutz, Widerruf)
   Erzeugt aus content/legal/*.txt
   ============================================================ */

.legal-text {
  max-width: 760px;
  margin: 0 auto;
}

.legal-updated {
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
  padding-bottom: var(--space-md);
  margin-bottom: var(--space-lg);
  border-bottom: 1px solid var(--color-border);
}

.legal-text h2 {
  font-size: var(--fs-lg);
  margin: var(--space-xl) 0 var(--space-sm);
  scroll-margin-top: 120px;
}

/* Erste Überschrift ohne den großen Abstand nach oben. */
.legal-text > h2:first-of-type {
  margin-top: 0;
}

.legal-text h3 {
  font-size: var(--fs-base);
  margin: var(--space-lg) 0 0.5rem;
}

.legal-text p {
  color: var(--color-text-muted);
  font-size: var(--fs-sm);
  line-height: 1.75;
  margin-bottom: 0.9rem;
}

/* Schaltflächen ausnehmen: .legal-text a hat höhere Spezifität als
   .btn--primary und würde dessen helle Schrift überschreiben - der
   Button stünde dann schwarz auf schwarz. */
.legal-text a:not(.btn) {
  color: var(--color-text);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal-text a:not(.btn):hover {
  color: var(--color-accent-dark);
}

.legal-text ul {
  list-style: none;
  margin: 0 0 1.1rem;
  padding: 0;
}

.legal-text li {
  position: relative;
  padding-left: 1.15rem;
  margin-bottom: 0.4rem;
  color: var(--color-text-muted);
  font-size: var(--fs-sm);
  line-height: 1.7;
}

.legal-text li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.66em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--color-accent-dark);
}

.legal-missing {
  padding: var(--space-md);
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg-alt);
}

.legal-missing code {
  font-size: 0.9em;
  background: var(--color-surface);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
}

/* ------------------------------------------- Schaltfläche im Rechtstext */
.legal-action {
  margin: var(--space-md) 0 var(--space-lg);
}

/* ------------------------------------------- Anschriftenblock */
.legal-address {
  font-style: normal;
  font-size: var(--fs-sm);
  line-height: 1.7;
  color: var(--color-text);
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-sm) var(--space-md);
  margin: 0 0 1.1rem;
}

/* ------------------------------------------- Muster-Widerrufsformular
   Ausfüllzeilen zum Ausdrucken oder Abtippen. Kein <form>, weil es
   keine Route gibt, die es entgegennehmen würde - der elektronische
   Weg läuft über die Schaltfläche am Seitenanfang. */
.legal-form {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  margin: var(--space-sm) 0 1.2rem;
  background: var(--color-surface);
}

.legal-form__row {
  display: flex;
  align-items: baseline;
  gap: var(--space-sm);
  padding: 0.55rem 0;
}

.legal-form__row + .legal-form__row {
  border-top: 1px solid var(--color-border);
}

.legal-form__label {
  flex: 0 0 auto;
  min-width: 190px;
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
}

/* Die Linie zum Eintragen füllt den Rest der Zeile. */
.legal-form__line {
  flex: 1 1 auto;
  border-bottom: 1px dashed var(--color-border);
  min-height: 1.4rem;
}

@media (max-width: 560px) {
  .legal-form__row {
    flex-direction: column;
    gap: 0.3rem;
  }
  .legal-form__label {
    min-width: 0;
  }
  .legal-form__line {
    width: 100%;
  }
}

@media print {
  .legal-form {
    break-inside: avoid;
  }
}
