/* No text field on a phone is smaller than 16px.
 *
 * iOS Safari zooms the whole page when a focused input's computed font-size is
 * below 16px, and it does not zoom back out — the operator hit this on the
 * signup fields: the page zoomed in and the field ended up behind the
 * keyboard. The fix is the font size. It is NOT `user-scalable=no` or
 * `maximum-scale=1`, which would stop the zoom by taking pinch-zoom away from
 * everyone who needs it; no viewport meta in this repo carries either, and
 * tests/test_input_zoom_floor.py keeps it that way.
 *
 * Applied as a class, not per field: every focusable text input, everywhere.
 * A field that genuinely wants to be larger still can — this is a floor, and
 * it is only in force where the zoom rule exists.
 *
 * TWO discriminators, deliberately. `html[data-phone-surface="true"]` is the
 * standardised one, but it is stamped by phoneHeaderSync (session-dock-chrome)
 * and so only exists once a dock column does — measured absent on the app at
 * 390px with no column open, and never set at all on the hosted signup pages,
 * which is where the 15px fields that caused this live. The width query is
 * what actually covers them; the attribute covers a projection iframe, whose
 * own width is a dock column's, not the device's.
 */

@media (max-width: 820px) {
  input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="file"]):not([type="submit"]):not([type="button"]):not([type="reset"]),
  textarea,
  select,
  [contenteditable=""],
  [contenteditable="true"] {
    font-size: max(16px, 1em);
  }
}

html[data-phone-surface="true"] :is(
  input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="file"]):not([type="submit"]):not([type="button"]):not([type="reset"]),
  textarea,
  select,
  [contenteditable=""],
  [contenteditable="true"]
) {
  font-size: max(16px, 1em);
}
