/* webShared/ls-autofill.css
 *
 * An input Chrome has autofilled keeps the dark theme. One copy for every
 * page: ls-form-controls.css @imports it (Admin console, Workspace shell),
 * and the two sign-in pages link it directly because they style their inputs
 * inline rather than through .ls-input.
 *
 * Chrome paints autofilled fields with an internal near-white background and
 * black text, and it does NOT honour `background-color` or `color` there, so
 * the field renders light-on-dark against every other control on the page.
 * The two properties it does honour are an inset box-shadow, used here to
 * repaint the fill, and -webkit-text-fill-color for the glyphs. The long
 * transition is the other half of the usual remedy: Chrome re-applies its own
 * colour on interaction, and delaying the transition keeps ours on screen.
 * Reported on the Data Explorer's "Looking for" field, 2026-08-24, and on the
 * Admin sign-in password field, 2026-08-30.
 *
 * Two selector groups because the fill must match the field's own unfilled
 * siblings: shell controls paint --lc-bg-admin-input, the sign-in pages paint
 * --lc-bg-input. The sign-in group is opted in by class (.lc-autofill-input)
 * so a bare input elsewhere is never touched. */

.ls-input:-webkit-autofill,
.ls-select:-webkit-autofill,
.lr-input:-webkit-autofill,
.lr-select:-webkit-autofill,
.ls-input:-webkit-autofill:hover,
.lr-input:-webkit-autofill:hover,
.ls-input:-webkit-autofill:focus,
.lr-input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px var(--lc-bg-admin-input) inset;
  box-shadow: 0 0 0 1000px var(--lc-bg-admin-input) inset;
  -webkit-text-fill-color: var(--lc-color-text-main);
  caret-color: var(--lc-color-text-main);
  transition: background-color 100000s ease-in-out 0s;
}

.lc-autofill-input:-webkit-autofill,
.lc-autofill-input:-webkit-autofill:hover,
.lc-autofill-input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px var(--lc-bg-input) inset;
  box-shadow: 0 0 0 1000px var(--lc-bg-input) inset;
  -webkit-text-fill-color: var(--lc-color-text-main);
  caret-color: var(--lc-color-text-main);
  transition: background-color 100000s ease-in-out 0s;
}
