/* --------------------------------------------------------------------------
/* Lexxy editor overrides – visual-only, spacing untouched
/*
/* Keeps Lexxy's default paragraph/line spacing intact. Only adjusts color
/* to match the rendered tenant view and styles mention pills/links.
/* -------------------------------------------------------------------------- */

/* Mention pills render inline like text. */
action-text-attachment[content-type^="application/vnd.actiontext"] {
  --mention-bg-color: transparent;

  align-items: center;
  background: var(--mention-bg-color);
  border-radius: 99rem;
  box-shadow:
    -0.25ch 0 0 var(--mention-bg-color),
    0.5ch 0 0 var(--mention-bg-color);
  color: currentColor;
  display: inline-flex;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
  position: relative;
  vertical-align: baseline;
  white-space: normal;
}

lexxy-editor action-text-attachment[content-type^="application/vnd.actiontext"] {
  cursor: pointer;
}

action-text-attachment[content-type="application/vnd.actiontext.mention"].node--selected {
  --mention-bg-color: rgb(219 234 254);
}

/* Uploaded image/file attachments render side by side in the editor content
   area instead of stacking vertically. createDOM returns a <figure> directly,
   not an <action-text-attachment> wrapper, so target the figure class. */
lexxy-editor .lexxy-editor__content figure.editor-attachment {
  display: inline-block;
  margin: 0 0.375rem 0.5rem 0;
  vertical-align: top;
}

/* Match the rendered tenant body color. */
lexxy-editor,
lexxy-editor .lexxy-editor__content {
  color: var(--ink-2);
}

lexxy-editor .lexxy-editor__content > a {
  color: var(--color-primary-700, var(--lexxy-color-accent-dark));
  text-decoration: underline;
}

/* Keep the floating delete pill anchored to attachments. */
lexxy-editor action-text-attachment[data-lexxy-decorator] {
  position: relative;
}

lexxy-editor .lexxy-editor__content figure .lexxy-floating-controls,
lexxy-editor action-text-attachment[data-lexxy-decorator] .lexxy-floating-controls {
  inset-block-start: 0.375rem;
  inset-inline-end: 0.375rem;
  inset-inline-start: auto;
  transform: none;
}

lexxy-editor action-text-attachment[content-type^="application/vnd.actiontext"] .lexxy-floating-controls {
  display: none;
}
