.ProseMirror {
  &.is-typing {
    .problem {
      @apply no-underline;
    }
  }

  .problem {
    @apply underline decoration-error-700 decoration-wavy decoration-1 [text-decoration-skip-ink:none] [text-underline-position:under];
  }

  .problem[data-suggestions] {
    @apply cursor-pointer;
  }
}

.ProseMirror-spellcheck-suggestions {
  @apply Dropdown min-w-[148px] [--Page-headerBottom:var(--page-header-h)];

  &.is-opening:not(.is-removing) {
    @apply Dropdown-is-open;
  }

  > li {
    @apply Dropdown-item;
  }
}

/* Highlight misspelled text in blue when suggestions are open */
.Page:has(> .ProseMirror-spellcheck-suggestions.is-opening) {
  .problem[data-suggestions]::selection {
    @apply bg-primary-50 text-primary-900;
  }
}
