/* ==========================================================================
   Close Call — Legal area (Impressum, AGB, Datenschutz, Widerrufsbelehrung,
   Vertrag widerrufen, Cookie-Richtlinie).

   Every legal page's own text lives in an existing Elementor "HTML widget"
   authored with page-specific BEM classes (e.g. .ccc-agb__section on AGB,
   .ccc-dse__section on Datenschutz, .ccc-wr__section on Widerrufsbelehrung,
   .ccc-impressum__card on Impressum). The prefix differs per page but the
   suffixes are shared, so this file styles by suffix ([class$="__x"]) —
   restyling every page in one pass without touching a single character of
   the supplied text, and without depending on exact nesting depth.

   "Vertrag widerrufen" has no such widget (its content is only the
   WooCommerce Germanized shortcode) — templates/legal.php supplies a
   matching .cc-legal-title heading for it directly.
   ========================================================================== */

body.cc-legal-active {
  margin: 0;
  overflow-x: clip;
  background: var(--cc-paper);
}

.cc-legal-main {
  padding-block: clamp(48px, 6vw, 88px) clamp(80px, 9vw, 140px);
}

.cc-legal-content {
  max-width: 800px;
  margin-inline: auto;
  color: var(--cc-ink);
  font: 400 16px/1.65 var(--cc-sans);
}

.cc-legal-content--form .cc-legal-lede {
  margin: 0 0 clamp(28px, 3vw, 40px);
  max-width: 62ch;
  color: var(--cc-ink-2);
  font-size: clamp(16px, 1.3vw, 18px);
  line-height: 1.55;
}

/* Page title — the template's own heading on "Vertrag widerrufen", and the
   supplied content's own header widget everywhere else. */
.cc-legal-title,
.cc-legal-content [class$="__hero"] {
  display: block;
  margin-bottom: clamp(32px, 4vw, 56px);
  padding-bottom: clamp(24px, 3vw, 36px);
  border-bottom: 1px solid var(--cc-line-strong);
}

.cc-legal-title p,
.cc-legal-content [class$="__eyebrow"] {
  display: block;
  margin: 0 0 12px;
  color: var(--cc-ink-soft);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.cc-legal-title h1,
.cc-legal-content [class$="__hero"] h1 {
  display: block;
  margin: 0;
  color: var(--cc-ink);
  font-family: var(--cc-serif);
  font-size: clamp(38px, 4.6vw, 56px);
  font-weight: 400;
  letter-spacing: -.03em;
  line-height: .98;
  text-transform: uppercase;
}

.cc-legal-content [class$="__date"] {
  display: block;
  margin-top: 10px;
  color: var(--cc-ink-soft);
  font-size: 13px;
}

/* Table of contents ("Inhalt"): a restrained, wrapping list of small links
   rather than a sidebar. */
.cc-legal-content [class$="__toc"] {
  display: block;
  margin: 0 0 clamp(40px, 4.5vw, 64px);
  padding: 20px clamp(20px, 2.5vw, 28px);
  border: 1px solid var(--cc-line);
  background: var(--cc-paper-light);
}

.cc-legal-content [class$="__toc-label"] {
  display: block;
  color: var(--cc-ink-soft);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.cc-legal-content [class$="__toc"] ol {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.cc-legal-content [class$="__toc"] li {
  font-size: 13px;
  color: var(--cc-ink-2);
}

.cc-legal-content [class$="__toc"] li a {
  color: var(--cc-ink);
  border-bottom: 1px solid var(--cc-line-strong);
  text-decoration: none;
}

.cc-legal-content [class$="__toc"] li a:hover,
.cc-legal-content [class$="__toc"] li a:focus-visible {
  border-color: currentColor;
}

/* Section rhythm — a hairline rule between sections is the only separator;
   no decorative cards. Each supplied "§ N …" / topic label is a small
   eyebrow above the section's own heading. */
.cc-legal-content [class$="__section"],
.cc-legal-content [class$="__card"],
.cc-legal-content [class$="__block"] {
  padding-block: clamp(28px, 3.5vw, 44px);
  border-top: 1px solid var(--cc-line);
}

.cc-legal-content [class$="__sections"] > [class$="__section"]:first-child,
.cc-legal-content [class$="__sections"] > [class$="__card"]:first-child,
.cc-legal-content [class$="__sections"] > [class$="__block"]:first-child,
.cc-legal-content [class$="__grid"] > [class$="__card"]:first-child {
  border-top: 0;
  padding-top: 0;
}

.cc-legal-content [class$="__label"] {
  display: block;
  margin-bottom: 6px;
  color: var(--cc-ink-soft);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.cc-legal-content h1 {
  font-family: var(--cc-serif);
}

.cc-legal-content h2 {
  margin: 0 0 18px;
  color: var(--cc-ink);
  font-family: var(--cc-sans);
  font-size: clamp(20px, 1.9vw, 23px);
  font-weight: 650;
  letter-spacing: -.01em;
  line-height: 1.25;
}

.cc-legal-content h3 {
  margin: 28px 0 12px;
  color: var(--cc-ink);
  font-family: var(--cc-sans);
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -.005em;
}

.cc-legal-content p {
  margin: 0 0 14px;
  color: var(--cc-ink-2);
  font-size: 15px;
  line-height: 1.7;
}

.cc-legal-content ul,
.cc-legal-content ol:not([class$="__toc"] ol) {
  margin: 0 0 16px;
  padding-left: 22px;
  color: var(--cc-ink-2);
  font-size: 15px;
  line-height: 1.7;
}

.cc-legal-content li + li {
  margin-top: 6px;
}

.cc-legal-content a {
  color: var(--cc-ink);
  text-decoration: underline;
  text-decoration-color: var(--cc-line-strong);
  text-underline-offset: 3px;
}

.cc-legal-content a:hover,
.cc-legal-content a:focus-visible {
  text-decoration-color: currentColor;
}

.cc-legal-content address {
  margin: 0 0 16px;
  padding: 16px 20px;
  border: 1px solid var(--cc-line);
  background: var(--cc-paper-light);
  font-style: normal;
  font-size: 15px;
  line-height: 1.7;
  color: var(--cc-ink-2);
}

/* Widerrufsbelehrung's embedded electronic withdrawal shortcode sits at the
   bottom of the Muster-Widerrufsformular section — give it a little air
   from the address block above it, styling is shared with the dedicated
   Vertrag-widerrufen flow below. */
.cc-legal-content [class$="__shortcode"] {
  margin-top: clamp(24px, 3vw, 36px);
}

/* ------------------------------------------------------------------------
   Cookie-Richtlinie — Complianz's generated policy document. Structure,
   ids, data attributes and JS-bound classes (cmplz-*) are untouched; only
   typography, color and spacing are aligned with Close Call.
   ------------------------------------------------------------------------ */

.cc-legal-content [class$="__document"] {
  font: 400 15px/1.7 var(--cc-sans);
  color: var(--cc-ink-2);
}

.cc-legal-content [class$="__document"] h2,
.cc-legal-content [class$="__document"] h3,
.cc-legal-content [class$="__document"] h4 {
  font-family: var(--cc-serif);
  font-weight: 400;
  color: var(--cc-ink);
}

.cc-legal-content [class$="__document"] .cmplz-category {
  padding-block: 16px;
  border-top: 1px solid var(--cc-line);
}

.cc-legal-content [class$="__document"] .cmplz-category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
}

.cc-legal-content [class$="__document"] .cmplz-category-title {
  font-size: 15px;
  font-weight: 650;
  color: var(--cc-ink);
}

.cc-legal-content [class$="__document"] table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0 20px;
  font-size: 13px;
}

.cc-legal-content [class$="__document"] table,
.cc-legal-content table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
}

.cc-legal-content [class$="__document"] th,
.cc-legal-content [class$="__document"] td,
.cc-legal-content th,
.cc-legal-content td {
  padding: 10px 12px;
  border: 1px solid var(--cc-line);
  text-align: left;
  vertical-align: top;
}

.cc-legal-content [class$="__document"] th,
.cc-legal-content th {
  background: var(--cc-paper-light);
  font-weight: 650;
}

/* ------------------------------------------------------------------------
   "Vertrag widerrufen" — WooCommerce Germanized's electronic withdrawal
   form, styled with the site's form/button language. Markup, field names,
   nonces and JS behaviour are untouched.
   ------------------------------------------------------------------------ */

.cc-legal-content form.order-withdrawal-request {
  display: block;
}

.cc-legal-content .woocommerce-info.notice {
  margin: 0;
  padding: 16px 20px;
  border: 1px solid var(--cc-line);
  background: var(--cc-paper-light);
  color: var(--cc-ink-2);
  font-size: 15px;
  line-height: 1.6;
}

.cc-legal-content .form-row {
  margin: 0 0 18px;
}

.cc-legal-content .form-row-first,
.cc-legal-content .form-row-last {
  display: inline-block;
  width: calc(50% - 10px);
  vertical-align: top;
}

.cc-legal-content .form-row-first {
  margin-right: 20px;
}

.cc-legal-content label {
  display: block;
  margin-bottom: 6px;
  color: var(--cc-ink-soft);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.cc-legal-content .required {
  color: var(--cc-ink-soft);
  text-decoration: none;
}

.cc-legal-content input[type="text"],
.cc-legal-content input[type="email"],
.cc-legal-content input[type="tel"],
.cc-legal-content select,
.cc-legal-content textarea {
  box-sizing: border-box;
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--cc-line-strong);
  border-radius: 2px;
  background: var(--cc-paper-light);
  color: var(--cc-ink);
  font: 400 15px/1.4 var(--cc-sans);
}

.cc-legal-content textarea {
  min-height: 120px;
}

.cc-legal-content input:focus-visible,
.cc-legal-content select:focus-visible,
.cc-legal-content textarea:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

.cc-legal-content input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-right: 10px;
  vertical-align: middle;
  accent-color: var(--cc-ink);
}

.cc-legal-content .order-withdrawal-delete-original-request-checkbox label {
  display: inline;
  margin: 0;
  text-transform: none;
  font-weight: 400;
  font-size: 14px;
  letter-spacing: normal;
  color: var(--cc-ink-2);
}

.cc-legal-content .form-row-submit {
  margin-top: 8px;
}

.cc-legal-content button[type="submit"] {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 12px 26px;
  border: 1px solid var(--cc-ink);
  border-radius: 2px;
  background: var(--cc-ink);
  color: var(--cc-paper-light);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: .075em;
  line-height: 1;
  text-transform: uppercase;
  cursor: pointer;
  transition: color .25s var(--cc-ease), background .25s var(--cc-ease), transform .25s var(--cc-ease);
}

.cc-legal-content button[type="submit"]:hover,
.cc-legal-content button[type="submit"]:focus-visible {
  background: transparent;
  color: var(--cc-ink);
  transform: translateY(-2px);
}

.cc-legal-content .clear {
  clear: both;
}

.cc-legal-content .eu-owb-notice-wrapper:not(:empty) {
  margin-bottom: 18px;
}

.cc-legal-content .eu-owb-notice-wrapper .woocommerce-error,
.cc-legal-content .eu-owb-notice-wrapper .woocommerce-message {
  margin: 0 0 12px;
  padding: 14px 18px;
  border: 1px solid var(--cc-line-strong);
  background: var(--cc-paper-light);
  list-style: none;
  font-size: 14px;
}

/* ------------------------------------------------------------------------
   Responsive — verified at 1440 / 1024 / 768 / 390.
   ------------------------------------------------------------------------ */

@media (max-width: 1100px) {
  .cc-legal-content {
    max-width: 720px;
  }
}

@media (max-width: 859px) {
  .cc-legal-content {
    max-width: 100%;
  }

  .cc-legal-content [class$="__toc"] ol {
    gap: 8px 16px;
  }
}

@media (max-width: 719px) {
  .cc-legal-title h1,
  .cc-legal-content [class$="__hero"] h1 {
    font-size: clamp(32px, 9vw, 40px);
  }

  .cc-legal-content h2 {
    font-size: 22px;
  }

  .cc-legal-content .form-row-first,
  .cc-legal-content .form-row-last {
    display: block;
    width: 100%;
  }

  .cc-legal-content .form-row-first {
    margin-right: 0;
  }

  .cc-legal-content address {
    padding: 14px 16px;
  }
}
