/* Session 25 — Public legal page + cookie preference center styling.
 * Cream-tinted, generous typography, calm and respectful — never legalistic.
 */

:root {
  --cream: #FAF8F5;
  --cream-shade: #E8E2D5;
  --ink: #1F3050;
  --ink-soft: #8A8783;
  --gold: #C4A052;
  --rule: #E8E2D5;
}

html, body { margin: 0; padding: 0; }

.legal-page {
  background: var(--cream);
  color: var(--ink);
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  line-height: 1.65;
  min-height: 100vh;
}

.legal-page main { max-width: 760px; margin: 0 auto; padding: 0 24px 80px; }

.legal-header {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px 24px 24px;
  border-bottom: 1px solid var(--rule);
}

.legal-back {
  font-family: 'Jost', sans-serif;
  font-weight: 300;
  font-size: 14px;
  color: var(--ink-soft);
  text-decoration: none;
  letter-spacing: 0.04em;
}
.legal-back:hover { color: var(--gold); }

.legal-title {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 500;
  font-size: 44px;
  margin: 18px 0 8px;
  letter-spacing: -0.01em;
  line-height: 1.1;
}

.legal-meta {
  font-family: 'Jost', sans-serif;
  font-weight: 300;
  font-size: 13px;
  color: var(--ink-soft);
  letter-spacing: 0.04em;
  margin: 0;
}

.legal-body { font-size: 17px; padding-top: 32px; }
.legal-body h2, .legal-body h3 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 500;
  margin-top: 2.4em;
  letter-spacing: -0.005em;
}
.legal-body h2 { font-size: 28px; }
.legal-body h3 { font-size: 22px; }
.legal-body p { margin: 1em 0; }
.legal-body a { color: var(--gold); text-decoration: underline; text-underline-offset: 3px; }
.legal-body ul { padding-left: 1.4em; }

.legal-empty {
  font-style: italic;
  color: var(--ink-soft);
}

.legal-footer {
  max-width: 760px;
  margin: 0 auto;
  padding: 24px;
  border-top: 1px solid var(--rule);
  text-align: center;
  font-family: 'Jost', sans-serif;
  font-size: 13px;
  color: var(--ink-soft);
}
.legal-footer a {
  color: var(--ink-soft);
  text-decoration: none;
  margin: 0 8px;
}
.legal-footer a:hover { color: var(--gold); }

/* Cookie preference center */
.cookie-pref { padding-top: 24px; }
.cookie-cat {
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 18px 22px 12px;
  margin: 16px 0;
  background: rgba(255,255,255,0.4);
}
.cookie-cat legend {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 500;
  font-size: 22px;
  padding: 0 6px;
}
.cookie-toggle { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.cookie-toggle input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--gold); }
.cookie-cat p { font-size: 15px; color: var(--ink-soft); margin: 8px 0 0; }
.legal-cta {
  font-family: 'Jost', sans-serif;
  font-weight: 400;
  letter-spacing: 0.06em;
  background: var(--ink);
  color: var(--cream);
  border: 0;
  padding: 14px 28px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  margin-top: 18px;
}
.legal-cta:hover { background: var(--gold); }
.cookie-pref-status { font-size: 14px; color: var(--ink-soft); margin-top: 12px; min-height: 1.4em; }

/* Cookie banner (rendered by /js/cookieConsent.js) */
.cookie-banner {
  position: fixed;
  bottom: 16px;
  left: 16px;
  right: 16px;
  background: var(--cream-shade);
  color: var(--ink);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 18px 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  z-index: 9999;
  box-shadow: 0 6px 24px rgba(43, 38, 32, 0.08);
}
.cookie-banner p { margin: 0; flex: 1 1 280px; }
.cookie-banner-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.cookie-btn {
  font-family: 'Jost', sans-serif;
  font-weight: 400;
  letter-spacing: 0.04em;
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  padding: 9px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
}
.cookie-btn-primary { background: var(--ink); color: var(--cream); }
.cookie-btn:hover { background: var(--gold); border-color: var(--gold); color: var(--cream); }
.cookie-banner.eu-default .cookie-btn-reject { background: var(--ink); color: var(--cream); }
.cookie-banner.eu-default .cookie-btn-accept { background: transparent; color: var(--ink); }

/* Re-acceptance modal */
.legal-modal-backdrop {
  position: fixed; inset: 0; background: rgba(43, 38, 32, 0.5); z-index: 10000;
  display: flex; align-items: center; justify-content: center;
}
.legal-modal {
  background: var(--cream);
  max-width: 640px;
  width: calc(100% - 32px);
  max-height: calc(100vh - 64px);
  overflow: auto;
  border-radius: 8px;
  padding: 36px 36px 32px;
  font-family: 'DM Sans', sans-serif;
  box-shadow: 0 16px 60px rgba(43, 38, 32, 0.25);
}
.legal-modal h2 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 500;
  font-size: 28px;
  margin: 0 0 4px;
}
.legal-modal .legal-modal-subtitle {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 18px;
  color: var(--ink-soft);
  margin: 0 0 18px;
}
.legal-modal .legal-modal-summary {
  background: rgba(255,255,255,0.6);
  border-left: 3px solid var(--gold);
  padding: 12px 16px;
  margin: 0 0 18px;
}
.legal-modal .legal-modal-preview {
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 16px 20px;
  max-height: 280px;
  overflow: auto;
  background: rgba(255,255,255,0.4);
  font-size: 15px;
}
.legal-modal-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 22px; }
.legal-modal-actions .delete-link { color: var(--ink-soft); font-size: 13px; text-decoration: underline; }
.legal-modal-actions .delete-link:hover { color: var(--gold); }
.legal-modal-actions button[disabled] { opacity: 0.4; cursor: not-allowed; }

.visually-hidden {
  position: absolute !important;
  height: 1px; width: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
}

@media (max-width: 768px) {
  .legal-title { font-size: 36px; }
  .legal-body { font-size: 16px; }
  .cookie-banner { flex-direction: column; align-items: flex-start; }
  .cookie-banner-actions { width: 100%; }
  .cookie-btn { flex: 1; min-width: 0; }
}
