/* SUcure web-client UI overrides (Element Web v1.12.21).
 *
 * Element Web's theme picker always lists its hardcoded built-in themes
 * (Light, Dark) alongside our custom themes, and v1.12.21 has no config
 * key to suppress them. We want only the two SUcure themes offered, so we
 * hide the built-in theme cards in Settings -> Appearance.
 *
 * Loaded via a <link> injected into index.html (see element-web/index.html).
 * Selectors target the stable markup in ThemeChoicePanel.tsx; the radio
 * <input value="..."> carries the internal theme id (custom themes use the
 * "custom-" prefix, so exact-match attribute selectors never catch them).
 */

/* Hide the built-in Light / Dark (and their high-contrast) theme cards. */
.mx_ThemeChoicePanel_themeSelector:has(input[name="themeSelector"][value="light"]),
.mx_ThemeChoicePanel_themeSelector:has(input[name="themeSelector"][value="dark"]),
.mx_ThemeChoicePanel_themeSelector:has(input[name="themeSelector"][value="light-high-contrast"]),
.mx_ThemeChoicePanel_themeSelector:has(input[name="themeSelector"][value="dark-high-contrast"]) {
    display: none !important;
}

/* Hide the "Match system theme" toggle: with it on, Element maps to the
 * (now-hidden) built-in light/dark themes instead of the SUcure ones. */
[data-testid="themePanel"] form:has(input[name="systemTheme"]) {
    display: none !important;
}

/* Quick settings (left-rail gear) theme dropdown is a separate picker
 * (QuickThemeSwitcher -> Dropdown). Its options are <li> with id
 * "<dropdownId>__<themeId>"; hide the built-in light/dark entries. */
#mx_QuickSettingsButton_themePickerDropdown__light,
#mx_QuickSettingsButton_themePickerDropdown__dark,
#mx_QuickSettingsButton_themePickerDropdown__light-high-contrast,
#mx_QuickSettingsButton_themePickerDropdown__dark-high-contrast {
    display: none !important;
}
