/* Malai public — responsive overrides (keep desktop look; fix mobile overflow) */

html {
  -webkit-text-size-adjust: 100%;
}

img {
  max-width: 100%;
  height: auto;
}

.table-scroll {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

@media screen and (max-width: 1200px) {
  #boxmain {
    width: 100% !important;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0 8px 10px !important;
  }

  #box_contentPublic {
    width: auto !important;
    max-width: 100%;
    float: none !important;
    padding-left: 0 !important;
    box-sizing: border-box;
  }

  #boxmenu,
  #box_menucontentPublic,
  #box_menucontainerPublic {
    width: 100% !important;
    max-width: 100%;
  }

  #box_menucontentPublic li {
    width: auto !important;
  }

  .tblwidth,
  .tblwidth1,
  .tblwidth2 {
    width: 100% !important;
    max-width: 100%;
  }
}

@media screen and (max-width: 900px) {
  /* Header banner: allow shrink */
  body > table[width="100%"],
  body > table[width="100%"] td {
    width: auto !important;
  }

  body > table[width="100%"] > tbody > tr {
    display: flex;
    flex-wrap: wrap;
  }

  body > table[width="100%"] > tbody > tr > td {
    display: block;
    flex: 1 1 100%;
    background-size: cover !important;
  }

  /* Clock absolute position breaks on narrow screens */
  body > table[width="100%"] div[style*="position: absolute"] {
    position: static !important;
    margin: 4px 0 !important;
  }

  .form_container table.tblwidth tr {
    display: block;
  }

  .form_container table.tblwidth tr td {
    display: block;
    width: 100% !important;
    box-sizing: border-box;
  }

  .form_container input[type="text"],
  .form_container input[type="submit"],
  .form_container input[type="reset"] {
    max-width: 100%;
    box-sizing: border-box;
  }

  .labelM_3 {
    width: auto !important;
    display: block;
    margin-top: 8px;
  }

  #VIEW_IMG {
    position: static !important;
    margin-top: 6px;
  }

  /* Results: horizontal scroll instead of crushed columns */
  .results-wrap {
    width: 100%;
    overflow-x: auto;
  }

  .results-wrap table.tblwidth {
    min-width: 720px;
  }

  .PAGING td {
    text-align: left !important;
  }

  .PAGING form {
    display: flex !important;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    justify-content: flex-start;
  }
}

@media screen and (max-width: 480px) {
  body {
    font-size: 12px;
  }

  input[type="submit"],
  input[type="reset"],
  button {
    min-height: 36px;
  }
}
