/* ============================================================================
   Settings → Legal Documents (Terms & Conditions / Privacy Policy) editor.
   Additive to app.css — CKEditor 5 chrome re-skinned onto this theme's own
   tokens, plus the shared "read like a real document" prose styles used by
   both the in-page Preview modal and the public /legal/{doc} page.
   ========================================================================== */

.legal-meta { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-muted); margin-bottom: 16px; }
.legal-meta .bi { font-size: 14px; color: var(--text-faint); }

/* CKEditor 5 chrome */
.ck.ck-editor__main > .ck-editor__editable {
  min-height: 420px;
  background: var(--bg-surface);
  color: var(--text-default);
  padding: 20px 22px;
}
.ck.ck-editor__editable_inline { border-color: var(--border-strong) !important; border-radius: 0 0 var(--radius-md) var(--radius-md) !important; }
.ck.ck-toolbar {
  background: var(--bg-surface-2) !important;
  border-color: var(--border-strong) !important;
  border-radius: var(--radius-md) var(--radius-md) 0 0 !important;
}
.ck.ck-editor__editable.ck-focused {
  border-color: var(--brand-400) !important;
  box-shadow: var(--ring) !important;
}
.ck.ck-button.ck-on, .ck.ck-button:not(.ck-disabled):hover {
  background: var(--bg-hover) !important;
}
[data-theme="dark"] .ck.ck-content { color-scheme: dark; }

/* Shared prose styling — the Preview modal (.legal-preview) and the public
   standalone page (.legal-doc-body, see legal-document.init.css) both use
   this same "readable document" typography so what an admin previews here
   matches what a visitor actually sees. */
.legal-preview, .legal-doc-body {
  font-size: 14.5px; line-height: 1.75; color: var(--text-default);
}
.legal-preview h1, .legal-doc-body h1 { font-size: 22px; font-weight: 700; margin: 0 0 14px; color: var(--text-strong); }
.legal-preview h2, .legal-doc-body h2 { font-size: 18px; font-weight: 700; margin: 22px 0 10px; color: var(--text-strong); }
.legal-preview h3, .legal-doc-body h3 { font-size: 15.5px; font-weight: 700; margin: 18px 0 8px; color: var(--text-strong); }
.legal-preview p, .legal-doc-body p { margin: 0 0 14px; }
.legal-preview ul, .legal-preview ol, .legal-doc-body ul, .legal-doc-body ol { margin: 0 0 14px; padding-left: 22px; }
.legal-preview li, .legal-doc-body li { margin-bottom: 6px; }
.legal-preview blockquote, .legal-doc-body blockquote {
  margin: 0 0 14px; padding: 10px 16px; border-left: 3px solid var(--brand-400);
  background: var(--bg-surface-2); color: var(--text-muted); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.legal-preview a, .legal-doc-body a { color: var(--brand-600); font-weight: 600; }
.legal-preview a:hover, .legal-doc-body a:hover { color: var(--brand-700); text-decoration: underline; }
.legal-preview table, .legal-doc-body table { width: 100%; border-collapse: collapse; margin: 0 0 14px; }
.legal-preview table td, .legal-preview table th, .legal-doc-body table td, .legal-doc-body table th {
  border: 1px solid var(--border); padding: 8px 10px;
}
