/* Styles that preserve editor formatting inside .rich-text blocks
   Keep UIkit from overriding common rich text elements while maintaining readable defaults. */

.rich-text {
  /* Ensure the content uses normal body typography and not UIkit article variants */
  font-size: 1rem;
  line-height: 1.5;
  color: #222;
  background: #f8f8f8;
  border-radius: 6px;
  overflow-x: auto;
}

.rich-text .note-content {
  /* Provide some spacing inside the content itself */
  padding: 2px;
}

/* Headings */
.rich-text h1,
.rich-text h2,
.rich-text h3,
.rich-text h4,
.rich-text h5,
.rich-text h6 {
  margin: 0.5em 0 0.3em;
  line-height: 1.2;
}

/* Paragraph spacing */
.rich-text p { margin: 0.4em 0; }

/* Emphasis and strong should use browser defaults (uncolored) */
.rich-text em { font-style: italic; color: inherit; }
.rich-text i { font-style: italic; color: inherit; }
.rich-text strong { font-weight: 700; color: inherit; }

/* Lists */
.rich-text ul,
.rich-text ol { margin: 0.4em 1.2em; }
.rich-text li { margin: 0.2em 0; }

/* Links: inherit color unless explicitly set in content */
.rich-text a { color: inherit; text-decoration: underline; }

/* Code blocks */
.rich-text pre,
.rich-text code,
.rich-text kbd,
.rich-text samp {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}
.rich-text pre { background: #fff; border: 1px solid #e5e5e5; padding: 8px; border-radius: 4px; overflow: auto; }
.rich-text code { background: #fff; border: 1px solid #eee; padding: 2px 4px; border-radius: 3px; }

/* Tables */
.rich-text table { border-collapse: collapse; width: 100%; margin: 0.6em 0; }
.rich-text th, .rich-text td { border: 1px solid #e5e5e5; padding: 6px 8px; text-align: left; }
.rich-text th { background: #fafafa; font-weight: 600; }

/* Blockquotes */
.rich-text blockquote { border-left: 4px solid #ddd; margin: 0.6em 0; padding: 0.2em 0.8em; color: #555; }

/* Images */
.rich-text img { max-width: 100%; height: auto; }

/* Prevent UIkit utility classes inside content from leaking styles unintentionally */
.rich-text [class^="uk-"] { all: unset; }
.rich-text [class*=" uk-"] { all: unset; }

/* Allow explicit inline styles from the editor to win */
.rich-text * { color: inherit; }
