/* Payminati mobile layer (21 Nov 2026). Loaded on every console, portal and sign-in page, after the page's own CSS
   where possible; phone-width rules only, so desktop is unchanged. Rollback: remove the two link/script lines. */
@media (max-width:767.98px){
  /* Tab and pill rows: one line that scrolls sideways inside itself; every tab keeps its full label. */
  html body .nav-tabs:not(.flex-column), html body .nav-pills:not(.flex-column){
    flex-wrap:nowrap !important; max-width:100%; overflow-x:auto; overflow-y:hidden;
    -webkit-overflow-scrolling:touch; scrollbar-width:none; overscroll-behavior-x:contain; }
  html body .nav-tabs:not(.flex-column)::-webkit-scrollbar, html body .nav-pills:not(.flex-column)::-webkit-scrollbar{ display:none; }
  html body .nav-tabs:not(.flex-column) > *, html body .nav-pills:not(.flex-column) > *{ flex:0 0 auto !important; min-width:auto !important; }
  html body .nav-tabs .nav-link, html body .nav-pills .nav-link{ flex:0 0 auto !important; white-space:nowrap !important; min-width:auto !important; }
  /* a dropdown inside a tab row would be cut off by the scroll, so those rows keep wrapping */
  html body .nav-tabs:has(.dropdown-menu), html body .nav-pills:has(.dropdown-menu){ flex-wrap:wrap !important; overflow:visible; }
  /* reconciliation: the wrapper scrolls, the track sizes to its tabs */
  html body .rc-tabs-wrap .rc-tabs{ overflow:visible !important; width:max-content; max-width:none; }

  /* Wide tables scroll inside their card instead of pushing the page sideways (pm-mobile.js adds .pm-x-scroll). */
  html body .pm-x-scroll, html body .table-responsive, html body .dataTables_wrapper{ max-width:100%; overflow-x:auto; -webkit-overflow-scrolling:touch; }
  html body .pm-x-scroll > table{ margin-bottom:0; }

  /* Media and long values never widen the page. */
  html body img, html body video, html body canvas, html body iframe{ max-width:100%; }
  html body .card, html body .alert, html body .modal-body, html body .dropdown-menu{ overflow-wrap:break-word; }
  html body pre, html body code{ white-space:pre-wrap; overflow-wrap:anywhere; }

  /* Button rows wrap instead of overlapping. */
  html body .btn-toolbar, html body .d-flex:has(> .btn + .btn){ flex-wrap:wrap; gap:8px; }
  html body .btn{ max-width:100%; }

  /* Modals fit the screen. */
  html body .modal-dialog{ margin:12px auto; max-width:calc(100vw - 24px); }
}
/* iOS zooms into any field under 16px when it is tapped: keep fields at 16px on touch phones. */
@media (max-width:767.98px) and (pointer:coarse){
  html body input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]), html body select, html body textarea{ font-size:16px !important; }
}
