/* CKEditor 5 in-editor preview styles for MJ Legal */
/* Load fonts to approximate frontend rendering */
@import url("https://fonts.googleapis.com/css2?family=Figtree:wght@300;400;600;700;800;900&family=Atkinson+Hyperlegible:wght@400;700&display=swap");

/* Base content wrapper inside CKEditor */
.ck-content {
  line-height: 1.6;
}

/* Font utilities (match frontend intent) */
.ck-content .mj-font-sans {
  font-family: "Figtree", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.ck-content .mj-font-serif {
  font-family: "Atkinson Hyperlegible", ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
}

.ck-content .mj-font-display {
  font-family: "Figtree", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 700;
}

.ck-content .mj-text-uppercase {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-weight: 600;
}

/* Highlight effect similar to frontend */
.ck-content .mj-text-highlight {
  background-image: linear-gradient(transparent 55%, rgba(255, 212, 0, 0.55) 0%);
  box-decoration-break: clone;
  padding-inline: 0.15em;
  font-weight: 600;
}

.ck-content .mj-text-muted {
  color: #6b7280; /* Tailwind gray-500 approximation */
}

.ck-content .mj-text-lead {
  font-size: 1.25rem; /* ~20px */
  line-height: 1.75;
  font-weight: 400;
}

/* Typography & elements to approximate frontend prose */
.ck-content h1 { font-size: 2.5rem; line-height: 1.1; letter-spacing: -0.01em; }
.ck-content h2 { font-size: 2rem; line-height: 1.15; letter-spacing: -0.01em; }
.ck-content h3 { font-size: 1.75rem; line-height: 1.2; }
.ck-content h4 { font-size: 1.5rem; }
.ck-content p { margin: 0 0 0.75rem 0; }
.ck-content ul, .ck-content ol { margin: 0.5rem 0 0.75rem 1.25rem; }
.ck-content blockquote { border-left: 4px solid #111111; padding-left: 1rem; color: #444444; }
.ck-content a { color: #111111; text-underline-offset: 2px; }
.ck-content code { font-family: ui-monospace, "Cascadia Code", Menlo, Consolas, monospace; background: #f4f4f4; padding: 0.1em 0.3em; border-radius: 4px; }

/* Ensure styles also apply when authors use P elements with style classes */
.ck-content p.mj-text-uppercase { text-transform: uppercase; letter-spacing: 0.18em; font-weight: 600; }
.ck-content p.mj-text-lead { font-size: 1.25rem; line-height: 1.75; }
