/* biteme.digital v3 . Rechtstexte (Impressum, Datenschutz, AGB).
   Nur Huelle: das <main> jeder Seite ist byte-gleich zum Stand vor dem Redesign
   (Klassen legal__*, kicker, link bleiben, weil der AGB-PDF-Generator sich darauf stuetzt).
   Nuechtern, keine Engine, gut lesbar: eine Textspalte, Georgs Typo, Glas fuer Tabellen. */

.legal { position: relative; }
.legal__inner {
  max-width: calc(780px + 2 * var(--site-margin)); margin: 0 auto;
  /* oben: Hoehe der festen Kopfleiste plus Luft (vorher 64 px am Handy, der Kicker lag unter der Kopfleiste; Feedback Rais 13.11.) */
  padding: calc(var(--header-h) + clamp(2rem, 5vw, 4rem)) var(--site-margin) clamp(5rem, 9vw, 8rem);
}
.legal .kicker {
  display: block; font-family: var(--font-display); font-weight: 500; font-size: var(--fs-kicker);
  line-height: 16px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent-caribbean);
}
.legal__inner > .kicker { margin-bottom: 20px; }
.legal h1 {
  margin: 0; font-family: var(--font-display); font-weight: 700;
  font-size: clamp(2.5rem, 1.6rem + 3.4vw, 4.5rem); line-height: 1; letter-spacing: -0.03em; text-wrap: balance;
}
.legal__lead { margin: 24px 0 0; font-size: var(--fs-lead); line-height: 1.5; color: var(--text-muted); max-width: 40em; }
.legal .link { color: var(--accent-caribbean); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; overflow-wrap: anywhere; }
.legal .link:hover { color: var(--text-primary); }

/* PDF-Download (AGB) */
.legal__download {
  display: flex; flex-direction: column; gap: 6px; margin: 32px 0 0; padding: 20px 24px;
  border-radius: var(--radius-md); border: 1px solid var(--border-accent); background: rgba(16, 24, 46, 0.6);
  font-size: 0.9375rem; color: var(--text-muted);
}
.legal__download > .link:first-child { font-family: var(--font-display); font-weight: 600; font-size: 1.0625rem; }

/* Inhaltsverzeichnis als Glas-Karte */
.legal__toc {
  margin: 40px 0 0; padding: 24px 28px; border-radius: var(--radius-md); border: 1px solid var(--border-accent);
  background: rgba(16, 24, 46, 0.78); -webkit-backdrop-filter: blur(var(--glass-blur)); backdrop-filter: blur(var(--glass-blur));
}
.legal__toc .kicker { margin-bottom: 14px; }
.legal__toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.legal__toc li { font-size: 0.9375rem; line-height: 1.5; }
.legal__toc .link { display: inline-block; padding: 4px 0; text-decoration: none; color: var(--text-primary); }
.legal__toc .link:hover { color: var(--accent-caribbean); }

/* Fliesstext */
.legal__body { margin-top: clamp(2.5rem, 5vw, 4rem); color: var(--text-muted); font-size: var(--fs-body); line-height: 1.75; }
.legal__body > section { padding: 28px 0; border-top: 1px solid var(--border-subtle); }
.legal__body > section:first-child { border-top: 0; padding-top: 0; }
.legal__body h2 { margin: 0 0 16px; font-family: var(--font-display); font-weight: 600; font-size: var(--fs-h4); line-height: 1.25; letter-spacing: -0.01em; color: var(--text-primary); }
.legal__body h3 { margin: 24px 0 8px; font-family: var(--font-display); font-weight: 600; font-size: 1.0625rem; line-height: 1.3; color: var(--text-primary); }
.legal__body p { margin: 0 0 14px; }
.legal__body p:last-child { margin-bottom: 0; }
.legal__body strong { color: var(--text-primary); font-weight: 600; }
.legal__body address { font-style: normal; margin: 0 0 14px; color: var(--text-primary); }

.legal__list { margin: 0 0 14px; padding-left: 1.2em; }
.legal__list li + li { margin-top: 6px; }
.legal__list--lettered { list-style: lower-alpha; }

.legal__group { display: grid; gap: 4px; }
.legal__group > div { padding: 4px 0 0; }
.legal__group h3 { margin-top: 16px; }

.legal__callout {
  margin: 20px 0 0; padding: 20px 24px; border-radius: var(--radius-md);
  border: 1px solid var(--border-accent-strong); background: rgba(160, 239, 255, 0.06);
}

/* Tabellen im Glasrahmen */
.legal__tablecard {
  margin: 20px 0; border-radius: var(--radius-md); border: 1px solid var(--border-accent);
  background: rgba(16, 24, 46, 0.78); -webkit-backdrop-filter: blur(var(--glass-blur)); backdrop-filter: blur(var(--glass-blur));
}
.legal__tablecard > .kicker { padding: 18px 20px 0; }
.legal__table-scroll { overflow-x: auto; }
.legal__table { width: 100%; min-width: 520px; border-collapse: collapse; font-size: 0.875rem; line-height: 1.55; }
.legal__table th, .legal__table td { padding: 14px 20px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border-subtle); }
.legal__table thead th { font-family: var(--font-display); font-weight: 600; color: var(--text-primary); }
.legal__table tbody tr:last-child th, .legal__table tbody tr:last-child td { border-bottom: 0; }
.legal__table td { color: var(--text-muted); }
.legal__table .is-local {
  display: inline-flex; align-items: center; min-height: 24px; padding: 0 10px; border-radius: var(--radius-pill);
  border: 1px solid var(--border-accent); color: var(--accent-caribbean); font-size: 0.75rem; white-space: nowrap;
}

/* Querverweise */
.legal__crosslinks { display: flex; flex-wrap: wrap; gap: 12px 28px; margin-top: clamp(2.5rem, 5vw, 4rem); padding-top: 24px; border-top: 1px solid var(--border-subtle); }
.legal__crosslinks .link { font-family: var(--font-display); font-weight: 500; }

@media (max-width: 699px) {
  .legal h1 { font-size: clamp(2rem, 1.2rem + 4vw, 2.5rem); hyphens: auto; overflow-wrap: anywhere; }
  .legal__body h2 { hyphens: auto; overflow-wrap: anywhere; }
  .legal__toc, .legal__download, .legal__callout { padding: 18px 18px; }
  .legal__table th, .legal__table td { padding: 12px 14px; }
}

/* Abnahme 14.11.: seitlich scrollende Tabellen zeigen am Rand einen Schatten, solange es dort weitergeht
   (Deckflaechen wandern mit dem Inhalt, Schatten bleiben am Rahmen; reines CSS) */
@media (max-width: 1023px) {
  .legal__table-scroll {
    background:
      linear-gradient(90deg, rgb(15, 23, 43) 30%, rgba(15, 23, 43, 0)) left center / 48px 100% no-repeat local,
      linear-gradient(270deg, rgb(15, 23, 43) 30%, rgba(15, 23, 43, 0)) right center / 48px 100% no-repeat local,
      radial-gradient(farthest-side at 0 50%, rgba(160, 239, 255, 0.30), rgba(160, 239, 255, 0)) left center / 16px 100% no-repeat scroll,
      radial-gradient(farthest-side at 100% 50%, rgba(160, 239, 255, 0.30), rgba(160, 239, 255, 0)) right center / 16px 100% no-repeat scroll;
  }
}
/* Impressum: "E-Commerce-Gesetz" nur am vorhandenen Bindestrich trennen, nicht als "E-Com-merce"; ausgeglichene Zeilen */
@media (max-width: 699px) {
  .legal__body h2 { hyphens: manual; -webkit-hyphens: manual; text-wrap: balance; }
}

@media print {
  .site-header, .site-footer, #bjoern-chat, #bmd-cust { display: none !important; }
  .page-depth { background: #fff; }
  .legal__body, .legal__lead, .legal h1, .legal__body h2, .legal__body h3 { color: #000; }
}
