/*
 * Search hits: where a list's search term matches a shown value (search_highlight() in
 * backend/helper_functions/functions/search_highlight.php, window.aceSearchHighlight in assets/js/search-highlight.js).
 * Loaded by the shared header on every page.
 *
 * Light mode keeps the text's own colour on a pale yellow. Bootstrap's dark warning-subtle is a dark brown that
 * hardly differs from the dark page, so dark mode uses a highlighter yellow with dark text (about 12:1).
 */
mark.search-hit {
    padding: 0 .15em;
    border-radius: .2rem;
    background-color: var(--bs-warning-bg-subtle);
    color: inherit;
}

[data-bs-theme="dark"] mark.search-hit {
    background-color: #ffd65c;
    color: #1a1d20;
}

/* Inside a light element on a dark page (an e-mail's own HTML) the light colours apply again */
[data-bs-theme="dark"] [data-bs-theme="light"] mark.search-hit {
    background-color: var(--bs-warning-bg-subtle);
    color: inherit;
}
