body:has(.tc-comment-editor, .publication-editor) .tox .tox-dialog,
body:has(.tc-comment-editor, .publication-editor) .tox .tox-dialog__header,
body:has(.tc-comment-editor, .publication-editor) .tox .tox-dialog__footer { color: var(--text-color); background: var(--field-bg); border-color: var(--border-color); }
body:has(.tc-comment-editor, .publication-editor) .tox .tox-dialog__footer { box-shadow: none; }
body:has(.tc-comment-editor, .publication-editor) .tox .tox-dialog__body-content { color: var(--text-color); }
body:has(.tc-comment-editor, .publication-editor) .tox .tox-dialog__title, body:has(.tc-comment-editor, .publication-editor) .tox .tox-label { color: var(--text-color); }
body:has(.tc-comment-editor, .publication-editor) .tox .tox-button--icon svg, body:has(.tc-comment-editor, .publication-editor) .tox .tox-listbox__select-chevron svg { fill: var(--text-muted-color); }
body:has(.tc-comment-editor, .publication-editor) .tox .tox-dialog__header .tox-button--icon svg { fill: var(--text-color); }
body:has(.tc-comment-editor, .publication-editor) .tox .tox-dialog .tox-textfield,
body:has(.tc-comment-editor, .publication-editor) .tox .tox-dialog .tox-listbox--select {
    color: var(--field-text); background: var(--page-bg); border-color: var(--field-border);
}
body:has(.tc-comment-editor, .publication-editor) .tox .tox-dialog .tox-textfield:focus,
body:has(.tc-comment-editor, .publication-editor) .tox .tox-dialog .tox-listbox--select:focus {
    border-color: var(--primary-color); box-shadow: 0 0 0 1px var(--primary-color);
}
body:has(.tc-comment-editor, .publication-editor) .tox .tox-menu {
    color: var(--text-color); background: var(--field-bg); border-color: var(--border-color);
}
body:has(.tc-comment-editor, .publication-editor) .tox .tox-collection .tox-collection__group { border-color: var(--border-color); }
/* DLE's late-loaded plugin uses a seven-class selector for the active menu text. */
body:has(.tc-comment-editor, .publication-editor) .tox .tox-collection .tox-collection__item:not(.tox-collection__item--state-disabled) { color: var(--text-color) !important; }
body:has(.tc-comment-editor, .publication-editor) .tox .tox-collection .tox-collection__item--enabled:not(.tox-collection__item--state-disabled) { background: var(--field-bg); }
body:has(.tc-comment-editor, .publication-editor) .tox .tox-collection .tox-collection__item--active:not(.tox-collection__item--state-disabled) {
    color: var(--text-color); background: color-mix(in srgb, var(--text-color) 9%, var(--field-bg));
}
body:has(.tc-comment-editor, .publication-editor) .tox .tox-collection__item-icon svg, body:has(.tc-comment-editor, .publication-editor) .tox .tox-collection__item-checkmark svg { fill: currentColor; }
body:has(.tc-comment-editor, .publication-editor) .tox .tox-dialog .tox-notification--info {
    color: var(--text-color); background: color-mix(in srgb, var(--primary-color) 8%, var(--field-bg));
    border-color: color-mix(in srgb, var(--primary-color) 35%, var(--field-bg));
}
body:has(.tc-comment-editor, .publication-editor) .tox .tox-dialog .tox-notification__body { color: inherit; }
body:has(.tc-comment-editor, .publication-editor) .tox .tox-dialog .tox-checkbox__label { color: var(--text-color); }
body:has(.tc-comment-editor, .publication-editor) .tox .tox-button { background: var(--primary-color); border-color: var(--primary-color); }
body:has(.tc-comment-editor, .publication-editor) .tox .tox-dialog__footer .tox-button { background: var(--primary-color); border-color: var(--primary-color); }
body:has(.tc-comment-editor, .publication-editor) .tox .tox-dialog__footer .tox-button:not(.tox-button--secondary):not(:disabled):hover {
    color: var(--btn-primary-text); background: var(--btn-primary-h); border-color: var(--btn-primary-h);
}
body:has(.tc-comment-editor, .publication-editor) .tox .tox-dialog__footer .tox-button:not(.tox-button--secondary):not(:disabled):active {
    color: var(--btn-primary-text); background: var(--btn-primary-a); border-color: var(--btn-primary-a);
}
body:has(.tc-comment-editor, .publication-editor) .tox .tox-dialog__footer .tox-button:focus:not(:disabled) {
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary-color) 45%, transparent); border-color: var(--primary-color);
}
body:has(.tc-comment-editor, .publication-editor) .tox .tox-dialog .tox-button--secondary,
body:has(.tc-comment-editor, .publication-editor) .tox .tox-dialog .tox-button--secondary:hover:not(:disabled) {
    color: var(--text-color); background: var(--page-bg); border-color: var(--border-color); text-shadow: none;
}
body:has(.publication-editor) .tox-tinymce-aux .tox-toolbar__overflow { background: var(--field-bg); border-color: var(--field-border); }
body:has(.publication-editor) .tox-tinymce-aux .tox-toolbar__overflow .tox-tbtn { color: var(--text-muted-color) !important; background: transparent; border-radius: 6px; }
body:has(.publication-editor) .tox-tinymce-aux .tox-toolbar__overflow .tox-tbtn svg, body:has(.publication-editor) .tox-tinymce-aux .tox-toolbar__overflow .tox-tbtn svg path { fill: var(--text-muted-color) !important; }
body:has(.publication-editor) .tox-tinymce-aux .tox-toolbar__overflow .tox-tbtn:hover { background: color-mix(in srgb, var(--text-color) 9%, transparent); }
body:has(.publication-editor) .tox-tinymce-aux .tox-toolbar__overflow .tox-tbtn--disabled { opacity: .5; }
