/*
 * Lexxy editor overrides.
 * Tailwind preflight resets list-style to none — restore it for Lexxy.
 * These rules need enough specificity to beat Tailwind's base reset.
 */

lexxy-editor ul,
.lexxy-content ul {
  list-style-type: disc !important;
  margin-inline-start: 1.5em;
  padding: 0;
}

lexxy-editor ol,
.lexxy-content ol {
  list-style-type: decimal !important;
  margin-inline-start: 1.5em;
  padding: 0;
}

lexxy-editor li.lexxy-nested-listitem,
.lexxy-content li.lexxy-nested-listitem {
  list-style-type: none !important;
}

.lexxy-content p + p {
  margin-top: 0.75em;
}

.lexxy-content p:empty,
.lexxy-content p:has(> br:only-child) {
  margin-top: 0;
  line-height: 0.5;
}

/*
 * Tailwind preflight sets b/strong to `font-weight: bolder`, a relative value.
 * Lexxy nests <b><strong> for bold text, so `bolder` compounds — 400 → 700 → 900,
 * which renders as font-black. Pin to an absolute weight so nesting can't escalate.
 */
.lexxy-content b,
.lexxy-content strong {
  font-weight: 700;
}

/*
 * Public website rich-text blocks: inherit color from the wrapper so the
 * builder's Color field cascades into the rendered <p>/<h*> elements.
 * Lexxy sets `:where(.lexxy-content) { color: var(--lexxy-color-ink) }` —
 * 0-specificity but still a direct rule, which beats the wrapper's inherited
 * inline `color: …`. Forcing inherit on .lexxy-content (and on its <a>s,
 * which Lexxy paints blue) lets the wrapper's color through.
 * Admin contexts (event descriptions, broadcasts) keep Lexxy's defaults.
 */
[data-block-type="text"] .lexxy-content,
[data-block-type="text"] .lexxy-content a {
  color: inherit;
}
