/* Match browser-provided date, select and number controls to the active theme. */
body.theme-dark {
  color-scheme: dark;
  --control-icon-color: #cbd5e1;
}
body.theme-light {
  color-scheme: light;
  --control-icon-color: #475569;
}
body.theme-dark :is(input, select) { color-scheme: dark; }
body.theme-light :is(input, select) { color-scheme: light; }

/* Decorative input icons and the calendar button need the same contrast. */
:is(body.theme-dark, body.theme-light) :is(.input-with-icon, .search-input-wrapper) svg {
  color: var(--control-icon-color);
}
:is(body.theme-dark, body.theme-light) [data-calendar-button] svg {
  color: var(--control-icon-color);
}
body.theme-dark :is(.btn-icon, .btn-toggle-password, .btn-logout) {
  color: var(--control-icon-color);
}
input::-webkit-calendar-picker-indicator {
  opacity: 1;
  cursor: pointer;
}
[data-calendar-button]:focus-visible {
  outline: 2px solid var(--primary, #60a5fa);
  outline-offset: -2px;
}
