@import url("/assets/lexxy-520c112e.css");
@import url("/assets/lexxy_extensions/collapsible-bf1c977d.css");

:where(.lexxy-editor__toolbar-dropdown) {
  user-select: none;
  -webkit-user-select: none;
}

:where(.lexxy-editor__toolbar-dropdown).lexxy-editor__toolbar-dropdown--chevron > summary {
  aspect-ratio: unset;
  gap: 0.5ch;
  grid-template-columns: 2fr 1fr;
  padding-inline: 0.75ch;
}

:where(.lexxy-editor__toolbar-dropdown).lexxy-editor__toolbar-dropdown--chevron > summary::after {
  block-size: 0.3ch;
  border-block-end: 2px solid currentcolor;
  border-inline-end: 2px solid currentcolor;
  content: "";
  display: inline-block;
  inline-size: 0.3ch;
  transform: rotate(45deg);
}

:where(.lexxy-editor__toolbar-dropdown) > summary ~ * {
  background-color: var(--lexxy-color-canvas);
  border: 2px solid var(--lexxy-color-selected-hover);
  border-radius: calc(var(--lexxy-radius) + var(--lexxy-toolbar-gap));
  box-sizing: border-box;
  box-shadow: var(--lexxy-shadow);
  color: var(--lexxy-color-ink);
  display: flex;
  gap: var(--lexxy-toolbar-gap);
  margin: 0;
  padding: var(--lexxy-toolbar-spacing);
  position: absolute;
  z-index: 3;
}

:where(.lexxy-editor__toolbar-dropdown[open]) > .lexxy-editor__toolbar-button {
  background-color: var(--lexxy-color-selected-hover);
  border-end-end-radius: 0;
  border-end-start-radius: 0;
}

:where(.lexxy-editor__toolbar-dropdown[open]) > .lexxy-editor__toolbar-button:hover {
  background-color: var(--lexxy-color-selected-hover);
}

:where(.lexxy-editor__toolbar-dropdown) button {
  color: var(--lexxy-color-text);
}

:where(.lexxy-editor__toolbar-dropdown) button:hover {
  opacity: 0.8;
}

:where(.lexxy-editor__toolbar-dropdown) .lexxy-editor__toolbar-dropdown-list {
  border-start-start-radius: 0;
  flex-direction: column;
  padding: 0.1ch;
}

:where(.lexxy-editor__toolbar-dropdown) .lexxy-editor__toolbar-dropdown-list button {
  align-items: center;
  display: flex;
  flex-direction: row;
  gap: 1ch;
  padding: 1ch;
  position: relative;
}

:where(.lexxy-editor__toolbar-dropdown) .lexxy-editor__toolbar-dropdown-list button[aria-pressed="true"] {
  background-color: var(--lexxy-color-selected);
}

:where(.lexxy-editor__toolbar-dropdown) .lexxy-editor__toolbar-dropdown-list button[aria-pressed="true"]:hover {
  background-color: var(--lexxy-color-selected-hover);
}

:where(.lexxy-editor__toolbar-dropdown) .lexxy-editor__toolbar-dropdown-list button span {
  font-size: var(--lexxy-text-small);
}

:where(.lexxy-editor__toolbar-dropdown) .lexxy-editor__toolbar-dropdown-list button svg {
  block-size: 1lh;
  inline-size: 1lh;
}

:where(.lexxy-editor__toolbar-dropdown) .lexxy-editor__toolbar-separator {
  background: var(--lexxy-color-ink-lighter);
  block-size: 1px;
  inline-size: 100%;
}

[overflowing] :where(.lexxy-editor__toolbar-dropdown) .lexxy-editor__toolbar-dropdown-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

[overflowing] :where(.lexxy-editor__toolbar-dropdown) .lexxy-editor__toolbar-dropdown-list button span {
  display: none;
}

[overflowing] :where(.lexxy-editor__toolbar-dropdown) .lexxy-editor__toolbar-separator {
  grid-column: 1 / -1;
}

:where(.lexxy-editor__toolbar-overflow) > summary ~ * {
  border-start-end-radius: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  inset-inline-end: var(--lexxy-toolbar-gap);
}

:where(.lexxy-editor__toolbar-dropdown) lexxy-link-dropdown {
  font-size: var(--lexxy-text-small);
  gap: var(--lexxy-toolbar-spacing);
  inset-inline-end: var(--lexxy-toolbar-spacing);
  inset-inline-start: var(--lexxy-toolbar-spacing);
}

[overflowing] :where(.lexxy-editor__toolbar-dropdown[open]) lexxy-link-dropdown {
  display: block;
}

[overflowing] :where(.lexxy-editor__toolbar-dropdown[open]) lexxy-link-dropdown .lexxy-editor__toolbar-dropdown-actions {
  margin-block-start: var(--lexxy-toolbar-spacing);
}

:where(.lexxy-editor__toolbar-dropdown) lexxy-link-dropdown .lexxy-editor__toolbar-dropdown-actions {
  display: flex;
  flex: 1;
  gap: var(--lexxy-toolbar-spacing);
}

:where(.lexxy-editor__toolbar-dropdown) lexxy-link-dropdown input[type="url"] {
  background-color: var(--lexxy-color-canvas);
  border: 1px solid var(--lexxy-color-ink-lighter);
  border-radius: var(--lexxy-radius);
  block-size: var(--lexxy-toolbar-button-size);
  box-sizing: border-box;
  color: var(--lexxy-color-text);
  flex: 2;
  font-size: var(--lexxy-text-small);
  inline-size: 100%;
  line-height: normal;
  padding-block: 0;
  padding-inline: 1ch;
}

:where(.lexxy-editor__toolbar-dropdown) lexxy-link-dropdown button {
  background-color: var(--lexxy-color-ink-lightest);
  inline-size: 100%;
  padding-inline: 2ch;
}

:where(.lexxy-editor__toolbar-dropdown) lexxy-link-dropdown button[value="link"] {
  background-color: var(--lexxy-color-accent-dark);
  color: var(--lexxy-color-ink-inverted);
}

:where(.lexxy-editor__toolbar-dropdown) lexxy-link-dropdown button[value="link"]:hover {
  background-color: var(--lexxy-color-accent-medium);
}

:where(.lexxy-editor__toolbar-dropdown:has(lexxy-highlight-dropdown)) {
  position: relative;
}

[overflowing] :where(.lexxy-editor__toolbar-dropdown:has(lexxy-highlight-dropdown)) {
  position: static;
}

:where(.lexxy-editor__toolbar-dropdown) lexxy-highlight-dropdown {
  --max-inline-size: calc(var(--max-colors) * (var(--lexxy-toolbar-button-size) + var(--lexxy-toolbar-spacing)));
  border-start-start-radius: 0;
  display: flex;
  flex-direction: column;
  font-size: var(--lexxy-text-small);
  gap: var(--lexxy-toolbar-spacing);
  inset-inline-start: 0;
  max-inline-size: var(--max-inline-size);
}

[overflowing] :where(.lexxy-editor__toolbar-dropdown) lexxy-highlight-dropdown {
  inset-inline-end: var(--lexxy-toolbar-spacing);
  inset-inline-start: var(--lexxy-toolbar-spacing);
}

:where(.lexxy-editor__toolbar-dropdown) lexxy-highlight-dropdown button {
  position: relative;
}

:where(.lexxy-editor__toolbar-dropdown) .lexxy-highlight-colors {
  display: grid;
  gap: var(--lexxy-toolbar-gap);
  grid-template-columns: repeat(auto-fill, minmax(var(--lexxy-toolbar-button-size), 1fr));
  max-inline-size: var(--max-inline-size);
}

:where(.lexxy-editor__toolbar-dropdown) .lexxy-highlight-colors button {
  block-size: unset;
  inline-size: 100%;
}

:where(.lexxy-editor__toolbar-dropdown) .lexxy-highlight-colors button::after {
  align-self: center;
  content: "Aa";
  display: inline-block;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  inset-block-end: 0;
  inset-block-start: 0;
  inset-inline-end: 0;
  inset-inline-start: 0;
  position: absolute;
}

:where(.lexxy-editor__toolbar-dropdown) .lexxy-highlight-colors button[aria-pressed="true"] {
  background-color: transparent;
  box-shadow: 0 0 0 2px currentColor inset;
}

:where(.lexxy-editor__toolbar-dropdown) .lexxy-highlight-colors button[aria-pressed="true"]::after {
  content: "✓";
}

:where(.lexxy-editor__toolbar-dropdown) .lexxy-editor__toolbar-dropdown-reset {
  background-color: var(--lexxy-color-ink-lightest);
}

:where(.lexxy-editor__toolbar-dropdown) .lexxy-editor__toolbar-dropdown-reset:disabled {
  display: none;
}

lexxy-editor action-text-attachment[content-type^="application/vnd.actiontext"]:hover lexxy-node-delete-button {
  opacity: 1;
  pointer-events: auto;
}

li.lexxy-nested-listitem {
  counter-increment: list-item 0;
}

.form-field-mention {
  background-color: #dbeafe;
  color: #1e40af;
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 500;
  font-size: 0.925em;
  white-space: nowrap;
}
