/* Lexxy editor styles (centralized) */

/* 1) Theme variables (override Lexxy defaults) */
:root {
  --lexxy-color-text: var(--color-body, #e5e7eb);
  --lexxy-color-border: #1f2832;
  --lexxy-color-text-subtle: #a3a3a3;
  --lexxy-color-canvas: transparent;
  --lexxy-color-selected: rgba(99, 102, 241, 0.15);
  --lexxy-focus-ring-color: #6366f1;
}

/* 2) Editor surface */
lexxy-editor {
  background: transparent;
  color: var(--lexxy-color-text);
  border: 1px solid var(--lexxy-color-border);
  border-radius: .375rem;
}

/* 3) Toolbar theming */
lexxy-toolbar {
  background: transparent;
  border: 1px solid color-mix(in oklab, var(--lexxy-color-text) 12%, transparent);
  border-radius: .375rem;
  padding: 6px;
  border-block-end: 1px solid var(--lexxy-color-border);
}
lexxy-toolbar button {
  color: var(--lexxy-color-text-subtle);
}
lexxy-toolbar button[aria-pressed="true"],
lexxy-toolbar button:hover {
  color: var(--lexxy-focus-ring-color);
}
lexxy-toolbar button[name="upload"] {
  display: none;
}

/* 4) Content (rendered) */
.lexxy-content {
  background: transparent;
  color: var(--lexxy-color-text);;
  border-radius: .375rem;
}
.lexxy-content a { color: #7c3aed; }
.lexxy-content p { margin-block: 0 .25rem; }
.lexxy-content h2 { margin-block: 0 .8rem; }
.lexxy-content h3 { margin-block: 0 .8rem; }
.lexxy-content h4 { margin-block: 0 .8rem; }

/* 5) Tailwind preflight resets (scoped undo using :where => zero specificity) */
lexxy-editor :where(ol, ul, menu),
.lexxy-content :where(ol, ul, menu) {
  list-style: revert;
  margin: revert;
  padding: revert;
}
lexxy-editor :where(h1,h2,h3,h4,h5,h6),
.lexxy-content :where(h1,h2,h3,h4,h5,h6) {
  font-size: revert;
  font-weight: revert;
  margin: revert;
}
lexxy-editor :where(blockquote),
.lexxy-content :where(blockquote) {
  margin: revert;
  padding: revert;
}

/* 6) Dialog tweaks */
.lexxy-link-dialog #link-dialog { background-color: #0b0f14; color: unset; }
.lexxy-link-dialog #link-dialog .lexxy-dialog-actions [type="button"] { background-color: gray; }

/* 7) Editor internal content tweaks (kept minimal) */
.lexxy-editor__content a { color: #7c3aed; }
.lexxy-editor__content p { margin-block: 0 .25rem; }
.lexxy-editor__content h2 { margin-block: 0 .8rem; }
.lexxy-editor__content h3 { margin-block: 0 .8rem; }
.lexxy-editor__content h4 { margin-block: 0 .8rem; }
