/*
 * Native dropdown contrast guard for the whole iWrite UI.
 * On Chromium/Windows the opened popup can otherwise use a light OS surface
 * while inheriting our light text, making most options practically invisible.
 * This stylesheet is loaded after the page-specific themes, so every native
 * select gets a coherent dark popup without changing its layout.
 */
select {
    color-scheme: dark !important;
}

select option,
select optgroup {
    background-color: #090e14 !important;
    color: #e8e8e5 !important;
}

select option:checked {
    background-color: #315f8d !important;
    color: #ffffff !important;
}

select option:disabled,
select optgroup:disabled {
    color: #7f8995 !important;
}

select:disabled {
    color: #7f8995 !important;
    opacity: .72;
}

@media (forced-colors: active) {
    select,
    select option,
    select optgroup {
        forced-color-adjust: auto;
    }
}
