/* Home Screen app and small screens (doc/pwa.md, "Home Screen app"). Loaded on every page by fragments :: head. */

/* viewport-fit=cover lets the page reach the screen edges, so keep content clear of the notch (landscape)
   and the home bar. env() is 0 on screens without them. */
body {
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}
footer.py-3 { padding-bottom: calc(1rem + env(safe-area-inset-bottom)) !important; }
#sidebar { padding-bottom: calc(1rem + env(safe-area-inset-bottom)); }

/* iPhone zooms the page when a text box under 16px gets focus, and does not zoom back. iOS only, so
   desktop keeps the compact boxes. */
@supports (-webkit-touch-callout: none) {
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="hidden"]),
  select,
  textarea {
    font-size: max(16px, 1em) !important;
  }
}

/* A table wider than the screen scrolls sideways inside this box (added by js/app-shell.js) instead of
   making the whole page scroll sideways. */
.vx-scroll-x {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Pull to refresh, Home Screen app only (there is no browser reload there). */
.vx-ptr {
  position: fixed;
  top: calc(env(safe-area-inset-top) + 8px);
  left: 50%;
  z-index: 2100;
  transform: translate(-50%, -60px);
  padding: 6px 14px;
  border-radius: 999px;
  background: #0f1e36;
  color: #fff;
  font-size: .85rem;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .25);
  pointer-events: none;
  opacity: 0;
  transition: opacity .15s ease;
}
.vx-ptr.is-ready { background: #1f6feb; }
