/* ============================================================
   legal.css — nora lucia
   Shared styles for all Legal/Compliance pages +
   Cookie Consent Banner & Manage Dialog
   ============================================================ */

/* ── Page Header ── */
.legal-page-header {
  background: var(--color-cream);
  padding-block: var(--space-12) var(--space-10);
  border-bottom: 1px solid var(--color-border);
}
.legal-page-header .container {
  max-width: var(--container-xl);
  margin-inline: auto;
  padding-inline: var(--space-6);
}
.legal-page-header__eyebrow {
  font-size: var(--text-xs);
  font-weight: var(--weight-semi);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--color-gold-dark);
  margin-bottom: var(--space-3);
}
.legal-page-title {
  font-family: var(--font-serif);
  font-size: var(--text-3xl);
  font-weight: var(--weight-regular);
  line-height: var(--leading-tight);
  color: var(--color-espresso);
  margin-bottom: var(--space-3);
}
.legal-last-updated {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

/* ── Two-Column Layout ── */
.legal-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: var(--space-12);
  align-items: start;
  max-width: var(--container-xl);
  margin-inline: auto;
  padding-inline: var(--space-6);
  padding-block: var(--space-12) var(--space-20);
}

/* ── TOC Sidebar ── */
.legal-toc {
  position: sticky;
  top: calc(var(--nav-height) + var(--space-6));
  max-height: calc(100vh - var(--nav-height) - var(--space-12));
  overflow-y: auto;
}
.legal-toc__title {
  font-size: var(--text-xs);
  font-weight: var(--weight-semi);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
}
.legal-toc__list { display: flex; flex-direction: column; gap: 2px; }
.legal-toc__link {
  display: block;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  text-decoration: none;
  line-height: var(--leading-snug);
  transition: background var(--duration-fast), color var(--duration-fast);
  border-left: 2px solid transparent;
}
.legal-toc__link:hover { color: var(--color-espresso); background: var(--color-cream); }
.legal-toc__link.is-active {
  color: var(--color-espresso);
  font-weight: var(--weight-medium);
  background: var(--color-cream);
  border-left-color: var(--color-gold);
}

/* ── Content area ── */
.legal-content { min-width: 0; }

/* ── Prose Typography ── */
.legal-prose {
  font-size: var(--text-base);
  line-height: var(--leading-loose);
  color: var(--color-text-secondary);
}
.legal-prose p { margin-bottom: var(--space-4); max-width: 72ch; }
.legal-prose strong { color: var(--color-text-primary); font-weight: var(--weight-semi); }
.legal-prose a { color: var(--color-gold-dark); text-decoration: underline; }
.legal-prose a:hover { color: var(--color-gold-dark); opacity: .8; }
.legal-prose ul,
.legal-prose ol {
  padding-left: var(--space-6);
  margin-bottom: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  max-width: 72ch;
}
.legal-prose ul { list-style: disc; }
.legal-prose ol { list-style: decimal; }
.legal-prose code {
  font-size: var(--text-sm);
  background: var(--color-cream-dark);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  color: var(--color-brown);
  font-family: 'Courier New', monospace;
}

/* ── Section ── */
.legal-section {
  padding-block: var(--space-8) var(--space-10);
  border-bottom: 1px solid var(--color-border);
  scroll-margin-top: calc(var(--nav-height) + var(--space-6));
}
.legal-section:last-child { border-bottom: none; }
.legal-section h2 {
  font-family: var(--font-serif);
  font-size: var(--text-xl);
  font-weight: var(--weight-regular);
  color: var(--color-espresso);
  margin-bottom: var(--space-5);
  line-height: var(--leading-snug);
}
.legal-section h3 {
  font-size: var(--text-base);
  font-weight: var(--weight-semi);
  color: var(--color-text-primary);
  margin-top: var(--space-6);
  margin-bottom: var(--space-3);
}

/* ── Callout Box (Placeholder hints) ── */
.legal-callout {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
  background: #fef9ec;
  border: 1px solid #e8c84a;
  border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-5);
  margin-bottom: var(--space-5);
  font-size: var(--text-sm);
  color: #7a5c00;
  line-height: var(--leading-normal);
}
.legal-callout svg { flex-shrink: 0; margin-top: 2px; color: #c49a00; }
.legal-callout strong { color: #5a4000; }
.legal-callout code {
  background: rgba(0,0,0,0.07);
  padding: 1px 4px;
  border-radius: 3px;
  font-size: var(--text-xs);
}

/* ── Legal Table (Cookie Policy) ── */
.legal-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  margin-block: var(--space-6);
}
.legal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
  min-width: 540px;
}
.legal-table th {
  background: var(--color-espresso);
  color: var(--color-text-inverse);
  font-weight: var(--weight-medium);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  padding: var(--space-4) var(--space-5);
  text-align: left;
  white-space: nowrap;
}
.legal-table td {
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text-secondary);
  vertical-align: top;
}
.legal-table tr:last-child td { border-bottom: none; }
.legal-table tr:hover td { background: var(--color-cream); }
.legal-table td:first-child { font-family: 'Courier New', monospace; font-size: var(--text-xs); color: var(--color-text-primary); }

/* Cookie category badge */
.cookie-cat-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
}
.cookie-cat-badge--essential  { background: #f0faf4; color: #2d5a3d; border: 1px solid #4a7c59; }
.cookie-cat-badge--functional { background: #eff6ff; color: #1e40af; border: 1px solid #3b82f6; }
.cookie-cat-badge--analytics  { background: #fdf4ff; color: #6b21a8; border: 1px solid #9333ea; }
.cookie-cat-badge--marketing  { background: #fff7ed; color: #9a3412; border: 1px solid #ea580c; }

/* ── Opt-out Form (Do Not Sell) ── */
.dns-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  max-width: 540px;
  padding: var(--space-8);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-cream);
  margin-block: var(--space-6);
}
.dns-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-5);
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}
.dns-toggle-label { font-size: var(--text-sm); font-weight: var(--weight-medium); color: var(--color-text-primary); }
.dns-toggle-sub { font-size: var(--text-xs); color: var(--color-text-muted); margin-top: 2px; }
/* Toggle switch */
.toggle-switch { position: relative; display: inline-block; width: 44px; height: 24px; flex-shrink: 0; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; cursor: pointer; inset: 0;
  background: var(--color-sand-dark);
  border-radius: var(--radius-full);
  transition: background var(--duration-normal);
}
.toggle-slider::before {
  content: '';
  position: absolute;
  left: 3px; top: 3px;
  width: 18px; height: 18px;
  background: var(--color-white);
  border-radius: var(--radius-full);
  transition: transform var(--duration-normal);
  box-shadow: var(--shadow-xs);
}
.toggle-switch input:checked + .toggle-slider { background: var(--color-espresso); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(20px); }
.toggle-switch input:focus-visible + .toggle-slider { outline: 2px solid var(--color-gold); outline-offset: 2px; }

/* DNS success */
.dns-success {
  display: none;
  text-align: center;
  padding: var(--space-10);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-cream);
  max-width: 540px;
  margin-block: var(--space-6);
}
.dns-success.is-visible { display: block; }
.dns-success__icon {
  width: 56px; height: 56px;
  background: #f0faf4;
  border-radius: var(--radius-full);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto var(--space-5);
  color: var(--color-success);
}
.dns-success__title { font-family: var(--font-serif); font-size: var(--text-xl); color: var(--color-espresso); margin-bottom: var(--space-3); }
.dns-success__text { font-size: var(--text-sm); color: var(--color-text-secondary); line-height: var(--leading-loose); }

/* Cookie-Consent-Styles wurden nach css/cookie.css ausgelagert
   (global geladen, damit das Banner auf allen Seiten erscheint). */

/* ── Responsive ── */
@media (max-width: 1024px) {
  .legal-layout {
    grid-template-columns: 1fr;
    padding-inline: var(--space-6);
  }
  .legal-toc { display: none; }
}
@media (max-width: 768px) {
  .legal-page-title { font-size: var(--text-2xl); }
  .legal-layout { padding-block: var(--space-8) var(--space-12); padding-inline: var(--space-4); }
  .dns-form { padding: var(--space-5); }
  .legal-section h2 { font-size: var(--text-lg); }
}

/* Current PMS legal pages, independent of the retired shop theme. */
.public-page .legal-page{color:#24324a;font-size:16px;line-height:1.75}
.public-page .legal-page-header{background:#f6f8ff;padding:36px 24px;border:1px solid #e3e8f2;border-radius:22px;margin:20px auto 36px}
.public-page .legal-page-header .container{max-width:1080px;margin:auto;padding:0}
.public-page .help-breadcrumb{display:flex;flex-wrap:wrap;gap:8px;font-size:13px;color:#62718a;margin-bottom:22px}
.public-page .legal-page-header__eyebrow{font-size:11px;font-weight:700;letter-spacing:2px;color:#355bdb;margin:0 0 8px}
.public-page .legal-page-title{font:700 clamp(27px,4vw,40px)/1.2 Manrope,Arial,sans-serif;letter-spacing:-1px;color:#16233b;margin:0 0 12px;overflow-wrap:anywhere}
.public-page .legal-last-updated{font-size:13px;color:#62718a;margin:0}
.public-page .legal-layout{display:grid;grid-template-columns:210px minmax(0,1fr);gap:38px;padding:0 0 48px;max-width:1080px;margin:auto}
.public-page .legal-toc{top:24px;max-height:80vh}
.public-page .legal-toc__title{font-size:11px;font-weight:700;letter-spacing:1.5px;color:#62718a;margin:0 0 12px}
.public-page .legal-toc__list{padding:0;margin:0;list-style:none;gap:4px}
.public-page .legal-toc__link{padding:8px 10px;border-radius:8px;font-size:13px;line-height:1.45;color:#465776}
.public-page .legal-toc__link:hover{background:#eef2ff;color:#264bc9}
.public-page .legal-content{max-width:80ch;padding-bottom:32px}
.public-page .legal-prose{font-size:16px;line-height:1.75;color:#35445d}
.public-page .legal-prose p{margin:0 0 17px;max-width:75ch;overflow-wrap:anywhere}
.public-page .legal-prose strong{color:#1c2b45;font-weight:700}
.public-page .legal-prose a{color:#284fc4;text-decoration:underline;text-underline-offset:3px}
.public-page .legal-section{padding:0 0 26px;margin:0 0 30px;border-bottom:1px solid #e3e8f2;scroll-margin-top:24px}
.public-page .legal-section h2{font-size:22px;line-height:1.35;font-weight:700;color:#1c2b45;margin:0 0 15px}
.public-page .legal-section h3{font-size:18px;font-weight:650;margin:24px 0 12px}
.public-page .legal-table-wrap{width:100%;overflow:auto;border:1px solid #dde4f0;border-radius:14px;margin:18px 0}
.public-page .legal-table{width:100%;border-collapse:collapse;font-size:14px;line-height:1.6}
.public-page .legal-table th{background:#eef2fc;color:#35445d;font-weight:700;font-size:12px;text-align:left;padding:14px}
.public-page .legal-table td{padding:16px 14px;vertical-align:top;border-bottom:1px solid #e3e8f2}
.public-page .legal-table td:first-child{font-family:inherit;font-size:14px;font-weight:650}
.public-page .legal-table code{overflow-wrap:anywhere;font-size:12px}
@media(max-width:720px){
.public-page .legal-page-header{padding:26px 20px;margin-top:16px}
.public-page .legal-layout{display:block;padding:0}.public-page .legal-toc{display:none}
.public-page .legal-section h2{font-size:21px}
.public-page .legal-table thead{display:none}
.public-page .legal-table,.public-page .legal-table tbody,.public-page .legal-table tr,.public-page .legal-table td{display:block;width:100%}
.public-page .legal-table tr{padding:10px 16px;border-bottom:1px solid #dde4f0}
.public-page .legal-table tr:last-child{border-bottom:0}.public-page .legal-table td{padding:8px 0;border:0}
.public-page .legal-table td::before{content:attr(data-label);display:block;color:#62718a;font:700 10px/1.5 Manrope,Arial,sans-serif;letter-spacing:.8px;text-transform:uppercase;margin-bottom:5px}
}
