/* Trix dark mode. actiontext.css's toolbar icons are black SVG data URIs, so they are inverted,
 * not recoloured. These rules win on source order: the :app bundle loads files alphabetically. */
@media (prefers-color-scheme: dark) {
  trix-editor {
    background-color: #111827;
    color: #f3f4f6;
    border-color: #374151;
  }

  trix-editor:empty:not(:focus)::before {
    color: #9ca3af;
  }

  trix-toolbar .trix-button {
    background-color: transparent;
    color: #e5e7eb;
    border-bottom-color: #374151;
  }

  trix-toolbar .trix-button:not(:first-child) {
    border-left-color: #374151;
  }

  trix-toolbar .trix-button.trix-active {
    background-color: #1f2937;
    color: #f9fafb;
  }

  trix-toolbar .trix-button--icon::before {
    filter: invert(1);
  }

  trix-toolbar .trix-dialog {
    background-color: #111827;
    color: #f3f4f6;
    border-color: #374151;
    box-shadow: none;
  }

  trix-toolbar .trix-input--dialog {
    background-color: #1f2937;
    color: #f3f4f6;
    border-color: #4b5563;
  }
}
