/* path: /home/vlbiofar/d.vltechlabs.com/app/static/css/phone.css */
/* Phone layout: readable text, touch-sized controls, one column.
   Loaded after app.css and mobile.css. Applies only on narrow screens.
   Inline font sizes written for desktop (11px to 13.5px) are lifted here. */

/* Scrolling fix: mobile.css sets overflow-x hidden on both html and body,
   which stops long pages scrolling in the installed app. Clip sideways only. */
@media (max-width: 900px) {
  html { overflow-x: hidden; overflow-y: auto; height: auto; }
  body { overflow-x: clip; overflow-y: visible; height: auto; min-height: 100%; }
  body.nav-open { overflow: hidden; }
  .page { overflow: visible; }
}

@media (max-width: 700px) {
  html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
  body { font-size: 16px; line-height: 1.5; }

  /* small inline captions and labels written for desktop */
  [style*="font-size:11"], [style*="font-size: 11"],
  [style*="font-size:12"], [style*="font-size: 12"],
  [style*="font-size:13"], [style*="font-size: 13"] {
    font-size: 15px !important;
  }
  [style*="font-size:14"], [style*="font-size: 14"] { font-size: 16px !important; }
  .muted, .small, small { font-size: 14px; }

  /* spacing and headings */
  .page { padding: 12px 12px 110px; }
  .card { padding: 16px 14px; margin-bottom: 12px; border-radius: 12px; }
  h1 { font-size: 22px; line-height: 1.25; }
  h2 { font-size: 18px; line-height: 1.3; }
  h3 { font-size: 16px; }

  /* buttons: finger-sized */
  .btn { font-size: 15px; min-height: 44px; padding: 10px 14px; }
  .btn-sm { font-size: 14px; min-height: 40px; padding: 8px 12px; }
  .row { gap: 10px; }
  .page .row > .btn { flex: 1 1 auto; text-align: center; }

  /* form fields: full width, 16px so iPhone does not zoom in */
  .page input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
  .page select,
  .page textarea {
    width: 100% !important;
    max-width: 100%;
    min-height: 44px;
    font-size: 16px !important;
    box-sizing: border-box;
  }
  .page textarea { min-height: 96px; }
  .page input[type="checkbox"], .page input[type="radio"] {
    width: 20px; height: 20px; min-width: 20px;
  }

  /* tables keep their columns and scroll sideways inside the card */
  table.data { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  table.data td, table.data th { padding: 10px 8px; font-size: 14px; }

  /* nothing wider than the screen */
  .page img, .page video, .page iframe { max-width: 100%; height: auto; }
  .page [style*="min-width"] { min-width: 0 !important; }
  .page [style*="max-width:"] { max-width: 100% !important; }

  /* rows of cards and details stack in one column */
  .grid-2, .grid-3, .grid-4, .tpl-layout, .docs-layout, .pay-layout,
  .policy-read, .doc-layout { grid-template-columns: 1fr !important; }

  /* bottom app bar (phone app) labels readable */
  .app-bottom-nav a { font-size: 13px !important; }
  .app-bottom-nav a span { font-size: 22px !important; }
}

/* very small phones */
@media (max-width: 380px) {
  body { font-size: 15px; }
  .page { padding: 10px 8px 110px; }
  .btn { font-size: 14px; }
}