/* JFS responsive overrides.
   Injected by nginx sub_filter in /etc/nginx/sites-available/jfs.co.ke because the site is a
   CI-deployed Astro build. Port these rules into the repo, then remove the injection. */

/* Grid/flex children must be allowed to shrink below their content width. */
.container-x .grid > *, .container-x .flex > * { min-width: 0; }
img, svg, video, iframe { max-width: 100%; }

@media (max-width: 639.98px) {
  /* Price tables: fit the screen instead of forcing a 448/576px minimum. */
  table.min-w-\[36rem\], table.min-w-\[28rem\] { min-width: 0 !important; width: 100%; table-layout: fixed; }
  table.min-w-\[36rem\] :is(th, td), table.min-w-\[28rem\] :is(th, td) {
    padding: .65rem .35rem !important; font-size: .8125rem; line-height: 1.3; overflow-wrap: break-word;
  }
  table.min-w-\[36rem\] :is(th, td):first-child, table.min-w-\[28rem\] :is(th, td):first-child { padding-left: .75rem !important; }
  table.min-w-\[36rem\] tr > :first-child { width: 36%; }
  table.min-w-\[28rem\] tr > :first-child { width: 40%; }
  table.min-w-\[36rem\] svg { width: 1rem; height: 1rem; }

  /* Timetable day filter: wrap onto two rows instead of scrolling sideways. */
  [aria-label="Filter timetable by day"] { flex-wrap: wrap !important; overflow-x: visible !important; margin-inline: 0 !important; padding-inline: 0 !important; }
  .tt-btn { padding: .45rem .85rem !important; min-height: 2.5rem !important; }
}
