/* Theme-safe settings controls. Legacy rules predate dark mode and hard-code a white
   search field; the default is now theme-aware, with light mode as the explicit exception. */
html:not([data-orbyte-client="mobile"]) #settingsOverlay :is(.r195-settings-search input, #obxSettingsSearch) {
  border: 1px solid var(--obx-border, var(--line)) !important;
  background: var(--obx-panel, var(--bg-2)) !important;
  color: var(--obx-text, var(--text)) !important;
  box-shadow: none !important;
  color-scheme: dark;
}

html:not([data-orbyte-client="mobile"])[data-theme="light"] #settingsOverlay :is(.r195-settings-search input, #obxSettingsSearch) {
  border: 1px solid #cfd5dd !important;
  background: #fff !important;
  color: #1f2328 !important;
  box-shadow: none !important;
  color-scheme: light;
}

html:not([data-orbyte-client="mobile"])[data-theme="light"] #settingsOverlay :is(.r195-settings-search input, #obxSettingsSearch)::placeholder {
  color: #7a828b !important;
}

html:not([data-orbyte-client="mobile"]) #settingsOverlay :is(.r195-settings-search input, #obxSettingsSearch)::placeholder {
  color: var(--obx-faint, var(--faint)) !important;
}

html:not([data-orbyte-client="mobile"]) #settingsOverlay :is(.r195-settings-search input, #obxSettingsSearch):focus {
  outline: none !important;
  border-color: var(--brand) !important;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 16%, transparent) !important;
}

html:not([data-orbyte-client="mobile"])[data-theme="dark"] #settingsOverlay .r195-settings-group-title,
html:not([data-orbyte-client="mobile"])[data-theme="oled"] #settingsOverlay .r195-settings-group-title,
html:not([data-orbyte-client="mobile"])[data-theme="midnight"] #settingsOverlay .r195-settings-group-title {
  background: transparent !important;
  color: var(--obx-faint, var(--faint)) !important;
}

@media (prefers-reduced-transparency: reduce) {
  html:not([data-orbyte-client="mobile"]) #settingsOverlay :is(.r195-settings-search input, #obxSettingsSearch) {
    backdrop-filter: none !important;
  }
}
