/*
 * Jodit overrides.
 *
 * Jodit keeps a white editing surface, so its text must stay dark — otherwise a
 * dark theme (e.g. the admin portal's dark mode, or a dark customer theme) is
 * inherited and the text becomes invisible on white. Applied directly to the
 * editing surface (NOT !important) so a colour a user deliberately applies in
 * the editor — which Jodit writes as an inline style — still wins.
 */
.jodit-wysiwyg,
.jodit-source__mirror,
.jodit-source textarea {
    color: #212529;
    background-color: #ffffff;
}

/*
 * Jodit's dialogs (e.g. "Paste as HTML" when HTML is pasted) and its popups
 * (link, image, colour, font and paragraph lists) are attached to <body>, outside
 * the editor. They paint their own white panel but set no text colour, so they
 * inherited the dark theme's near-white text and were unreadable. Give them dark
 * text to match the panel.
 *
 * The `.jodit-dialog` / `.jodit-popup` prefix is there for specificity: Jodit puts
 * its dialog messages in a <label>, and the admin theme's `body.admin-portal label`
 * would otherwise turn them light again.
 */
.jodit-dialog .jodit-dialog__panel,
.jodit-dialog .jodit-dialog__panel label,
.jodit-popup .jodit-popup__content,
.jodit-popup .jodit-popup__content label {
    color: #212529;
}
