/* Keep form controls visually stable when focused, including Select2 widgets. */
:is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="button"]):not([type="submit"]):not([type="reset"]), textarea, select, .form-control, .form-select, .select2-selection, .emojionearea):not(.is-invalid):not(.is-valid):not(.error):not(.valid):not([aria-invalid="true"]):not(.has-error *):not(.has-success *) {
    border-color: var(--form-control-border-color, #e5e6e6) !important;
}
:is(input, textarea, select, .form-control, .form-select, .select2-selection, .select2-search__field, [contenteditable="true"]):focus,
.select2-container--focus .select2-selection,
.select2-container--open .select2-selection,
.emojionearea.focused {
    box-shadow: none !important;
    outline: none !important;
}
/* A small keyboard-only marker replaces the large focus ring. */
html.keyboard-navigation :is(input, textarea, select, .form-control, .form-select, .select2-selection, [contenteditable="true"]):focus,
html.keyboard-navigation .select2-container--focus .select2-selection {
    outline: 1px dotted currentColor !important;
    outline-offset: 2px !important;
}
