/* ===== IMPRESSUM & DATENSCHUTZ (Legal Text) ===== */

/* Page title: visible on desktop as a heading above the legal text */
.page-legal .page-title {
  display: block;
  color: var(--red);
  font-size: calc(var(--fs-base) * 1.2);
  font-weight: var(--fw-page-title);
  letter-spacing: var(--ls-body);
  line-height: var(--lh-body);
  margin: 0 0 var(--pad-md);
  text-align: left;
}

/* Legal pages need scrolling - content overflows the 65vh container */
/* Flutter: SingleChildScrollView inside SkneTempSeiten content area */
.legal-text {
  text-align: left;
  padding: var(--pad-md) 0;  /* Desktop: aligned with menu (0px left/right) */
  /* Override base content-wrapper centering - legal text starts at top */
  justify-content: flex-start;
  /* Fixed height so overflow works */
  height: 100%;
  min-height: 0;  /* reset base content-wrapper min-height */
  /* Enable scroll within the content area */
  overflow-y: auto;
  scrollbar-width: none;  /* Hide native — custom JS scrollbar at viewport edge */
  -ms-overflow-style: none;
}

.legal-text::-webkit-scrollbar {
  width: 0;
  height: 0;
}

/* ===== LEGAL PAGE CUSTOM SCROLLBAR (screen edge) ===== */
.page-legal .custom-scrollbar {
  position: fixed;
  top: var(--appbar-h);
  right: 0;
  height: calc(100vh - var(--appbar-h));
  width: 16px;
  z-index: 900;
  display: block !important;
  pointer-events: auto !important;
}

.page-legal .custom-scrollbar.is-hidden {
  display: block !important;
  pointer-events: auto !important;
}

.page-legal .custom-scrollbar__track {
  height: 100%;
  width: 100%;
  position: relative;
  pointer-events: auto;
  background: rgba(0, 0, 0, 0.08);
}

.page-legal .custom-scrollbar__thumb {
  position: absolute;
  left: 2px;
  right: 2px;
  top: 0;
  border-radius: 0;
  background: var(--grey);
  opacity: 1;
  cursor: grab;
  touch-action: none;
}

.page-legal .custom-scrollbar.is-dragging .custom-scrollbar__thumb {
  cursor: grabbing;
  opacity: 0.85;
}

.page-legal .custom-scrollbar__thumb:hover,
.page-legal .custom-scrollbar__thumb:focus-visible {
  opacity: 0.85;
}

.legal-text h1 {
  color: var(--red);
  font-weight: var(--fw-regular);
  font-size: 1.3em;
  margin: 0 0 24px;
}

.legal-text h2 {
  color: var(--red);
  font-weight: var(--fw-regular);
  font-size: 1.1em;
  margin: 24px 0 12px;
}

.legal-text h3 {
  color: var(--text-color);
  font-weight: var(--fw-regular);
  font-size: 0.95em;
  margin: 16px 0 8px;
}

.legal-text p {
  margin: var(--pad-md) 0;  /* Flutter: blockPadding: 15 */
  font-size: var(--fs-base);
  line-height: var(--lh-body);
}

.legal-text address {
  font-style: normal;
  margin: var(--pad-md) 0;
  font-size: var(--fs-base);
  line-height: var(--lh-body);
}

.legal-text ul {
  margin: var(--pad-md) 0 var(--pad-md) var(--pad-lg);
  font-size: var(--fs-base);
  line-height: var(--lh-body);
}

.legal-text li {
  margin: 6px 0;
}

.legal-text a {
  color: var(--text-color);
  text-decoration: none;
}

.legal-text a:hover {
  text-decoration: underline;
}

/* No bold anywhere in legal text — site uses normal font weight only */
.legal-text strong,
.legal-text b {
  font-weight: var(--fw-regular);
}

.legal-text section {
  margin-bottom: var(--space-block);
}

/* ===== LEGAL MOBILE OVERRIDES ===== */
/* Flutter mobile: ALL text is 15px w400 #000 — no distinct heading styles */
@media (max-width: 799px) {
  .page-legal .page-title {
    display: block;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--mid);
    color: var(--red);
    text-align: center;
    padding: var(--mobile-title-padding);
    /* pull the title to the full container width (counteract parent side padding) */
    margin: 0 calc(-1 * var(--pad-md));
    font-size: calc(var(--fs-base) * 1.2);
    font-weight: var(--fw-page-title);
    letter-spacing: var(--ls-body);
    line-height: var(--lh-body);
    -webkit-tap-highlight-color: transparent;
  }

  .legal-text {
    padding: 0 var(--pad-md) var(--pad-md);  /* no top — title sits flush at top edge */
  }

  .legal-text h1,
  .legal-text h2,
  .legal-text h3 {
    color: var(--text-color);
    font-weight: var(--fw-regular);
    font-size: var(--fs-base);
    line-height: var(--lh-body);
    letter-spacing: var(--ls-body);
    margin: var(--pad-sm) 0;
  }

  .legal-text p {
    margin: var(--pad-sm) 0;
    letter-spacing: var(--ls-body);
  }

  .legal-text address {
    margin: var(--pad-sm) 0;
    letter-spacing: var(--ls-body);
  }

  /* Flutter: bullet lists use • character + 8px gap + 15px bullet column */
  .legal-text ul {
    list-style: none;
    margin: var(--pad-sm) 0;
    padding: 0;
    letter-spacing: var(--ls-body);
  }

  .legal-text li {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin: 0;
    line-height: var(--lh-body);
  }

  .legal-text li::before {
    content: '•';  /* Flutter: '•' Text widget */
    flex-shrink: 0;
    width: 15px;  /* Flutter: SizedBox(width: 15) bullet column */
    text-align: left;
  }
}
