/*
==========================================================
CSS module: Mobile specific CSS 

Date written: 24-10-2026 10:26 
CSS version: 1 

Please do not edit this file by hand!
==========================================================
*/

/*
==========================================================
System Manager - mobile overrides
Load AFTER style.css:
  <link href="include/mobile.css?version=1" rel="stylesheet">
Requires the viewport meta tag in the page <head>:
  <meta name="viewport" content="width=device-width, initial-scale=1">
==========================================================
*/

/* ---------- Safe at every screen size ---------- */

html {
  -webkit-text-size-adjust: 100%;
}

img {
  max-width: 100%;
  height: auto;
}

/* Lets the content column shrink instead of being pushed wider by tables */
article {
  min-width: 0;
}

/* Fixed-width pop-up dialogs never wider than the screen */
div.dialog {
  max-width: calc(100vw - 32px);
}

/* Collapsible menu: on desktop the "Menu" bar is hidden and the menu stays open */
@media (min-width: 601px) {
  .navmenu > summary {
    display: none;
  }
}

/* Visible keyboard focus */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid #1F6FB2;
  outline-offset: 2px;
}


/* ---------- Phones (matches the existing 600px breakpoint) ---------- */

@media (max-width: 600px) {

  /* Readable base text (was 11px) */
  body {
    margin: 0;
    font-size: 14px;
  }

  /* --- Header --- */
  header {
    padding: 8px 12px;
    font-size: 16px;
  }

  header .spacer {
    display: none;
  }

  header div.row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-top: 0;
  }

  header div.row span.topleft {
    float: none;
    width: auto;
  }

  header div.row span.topleft img {
    height: 40px;
    width: auto;
  }

  header div.row span.topheading {
    width: auto;
    text-align: left;
    font-size: 16px;
  }

  /* --- Navigation: collapsible "Menu" bar, opens to a two-column grid --- */
  nav {
    max-width: none;
    padding: 0;
  }

  .navmenu > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 48px;
    padding: 0 16px;
    font-family: 'Maven Pro', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: #34282C;
    cursor: pointer;
    list-style: none;
  }

  .navmenu > summary::-webkit-details-marker {
    display: none;
  }

  /* Plus/minus indicator */
  .navmenu > summary::after {
    content: "+";
    font-size: 22px;
    font-weight: 400;
  }

  .navmenu[open] > summary::after {
    content: "\2212";
  }

  .navmenu-items {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    padding: 0 12px 12px;
  }

  nav div.spacer {
    display: none;
  }

  nav div.row {
    padding-top: 0;
  }

  /* The "Menu" bar replaces the "Main Menu" heading on phones */
  .navmenu-items > div.row:first-child {
    display: none;
  }

  /* Version lines span both columns */
  nav div.row:has(.menuversion) {
    grid-column: 1 / -1;
  }

  nav span.menuitem a {
    float: none;
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 0 10px;
    font-size: 14px;
    background: #FFFFFF;
    border: 1px solid #D5D5D5;
    border-radius: 6px;
  }

  nav div.row span.menuversion {
    float: none;
    display: block;
  }

  /* --- Content area --- */
  article {
    padding: 12px;
  }

  /* Undo fixed widths and floats so things stack */
  div.row span.label,
  div.row span.docleft,
  div.row span.docright,
  div.row span.docbody,
  div.row span.docbody_left,
  div.row span.docbody_center,
  div.row span.formw,
  div.row span.dialogformw,
  div.row span.dialogheading,
  div.row span.dialog_gentext,
  div.row span.dialogmessage,
  div.row span.dialogimage {
    float: none;
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    text-align: left;
  }

  div.row span.h1,
  div.row span.h2 {
    font-size: 16px;
  }

  /* Messages use the full width (was 80%) */
  span.errormsg,
  span.informationmsg,
  span.successmsg {
    width: 100%;
  }

  div.row_message {
    padding: 8px 0;
  }

  /* --- Label / field tables: stack label above field --- */
  table.formdata,
  table.formdata tbody,
  table.formdata tr,
  table.formdata td {
    display: block;
    width: auto !important;
  }

  table.formdata td.label,
  table.formdata td.slabel,
  table.formdata td.top_label,
  table.formdata td.label_std,
  table.formdata td.label_ctr {
    text-align: left;
    padding: 10px 0 4px;
  }

  /* --- Form controls: full width, no iOS zoom, finger-sized --- */
  input[type="text"],
  input[type="number"],
  input[type="password"],
  input[type="email"],
  input[type="date"],
  select,
  textarea {
    font-size: 16px;
    max-width: 100%;
  }

  table.formdata input[type="text"],
  table.formdata input[type="number"],
  table.formdata input[type="password"],
  table.formdata input[type="email"],
  table.formdata input[type="date"],
  table.formdata select,
  table.formdata textarea {
    width: 100%;
    min-height: 44px;
  }

  input[type="checkbox"],
  td.coldata input[type="checkbox"],
  td.colheading input[type="checkbox"] {
    width: 22px;
    height: 22px;
  }

  .btn,
  .widebtn,
  .smlbtn,
  button.form-control {
    min-height: 44px;
    font-size: 15px;
  }

  /* --- Results tables: scroll sideways inside their box, not the whole page --- */
  table.results {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    font-size: 13px;
  }

  td.colheading,
  td.coldata {
    padding: 8px 6px;
    white-space: nowrap;
  }

  /* Keep the first column (e.g. Member Type) visible while scrolling */
  table.results tr > td:first-child:not(.banner) {
    position: sticky;
    left: 0;
    z-index: 1;
  }

  table.results td.banner {
    text-align: left;
    position: sticky;
    left: 0;
  }

  /* --- Calendar: tighter cells --- */
  .calendar .days .day_name {
    padding: 8px 2px;
    font-size: 11px;
    text-align: center;
  }

  .calendar .days .day_num {
    padding: 4px;
    min-height: 56px;
  }

  .calendar .days .day_num .event {
    font-size: 11px;
    padding: 2px 3px;
    margin-top: 4px;
  }

  /* --- Upload areas --- */
  #dropzone,
  .bulk-dropzone {
    padding: 20px 12px;
  }
}
