/* Keep native scrolling and text selection while disabling browser page zoom. */
html.sobol-mobile-app,
html.sobol-mobile-app body {
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}

/* Keep the document stable when Safari scrolls the focused textarea into view.
   Only the app frame follows the visible area above the software keyboard. */
html.sobol-mobile-app body {
  position: fixed;
  inset: 0;
  width: 100%;
}

html.sobol-mobile-app #root {
  position: fixed;
  top: var(--sobol-app-top, 0px);
  right: 0;
  bottom: auto;
  left: 0;
  height: var(--sobol-app-height, 100%);
  max-height: var(--sobol-app-height, 100%);
  overflow: hidden;
  overscroll-behavior: none;
}

html.sobol-mobile-app {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

html.sobol-mobile-app :where(body, #root, #root *) {
  touch-action: pan-x pan-y;
}

/* iOS zooms into small editable fields; cover login, chat and settings. */
html.sobol-mobile-app input:not([type='checkbox']):not([type='radio']):not([type='range']):not([type='button']):not([type='submit']):not([type='reset']):not([type='hidden']):not([type='color']):not([type='file']),
html.sobol-mobile-app textarea,
html.sobol-mobile-app select,
html.sobol-mobile-app [contenteditable='true'] {
  font-size: max(16px, 1em) !important;
}

html.sobol-mobile-app :where(button, a, [role='button']) {
  -webkit-tap-highlight-color: transparent;
}
