/* Preserve existing form controls and links in the LAW mobile templates. */
/* Match the existing mobile category rules even when theme JS selects html.pc. */
body.mobile_device .bukken-container {
  margin: 0 0 30px;
  padding: 20px 10px;
  min-width: 0;
}
body.mobile_device .bukken-cat {
  width: 100%;
  max-width: 100%;
}
body.mobile_device .tbl-bukken-cat {
  max-width: 100%;
  font-size: 14px;
}
body.mobile_device .tbl-bukken-cat tr {
  margin: 0;
  padding: 0;
}
body.mobile_device .tbl-bukken-cat th {
  margin: 0;
  padding: 0;
  width: 100%;
}
body.mobile_device .tbl-bukken-cat th a {
  padding: 15px 0;
}
body.mobile_device .tbl-bukken-cat th a i {
  margin-right: 10px;
  margin-left: 10px;
}
body.mobile_device .tbl-bukken-cat td a {
  margin-bottom: 5px;
  padding: 15px 20px;
  background: #246bb6;
}

@media screen and (max-width: 767px) {
  body.mobile_device .mw_wp_form table.rps_table,
  body.mobile_device .mw_wp_form .rps_table caption,
  body.mobile_device .mw_wp_form .rps_table tbody,
  body.mobile_device .mw_wp_form .rps_table tr,
  body.mobile_device .mw_wp_form .rps_table th,
  body.mobile_device .mw_wp_form .rps_table td {
    display: block;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
  }

  body.mobile_device .mw_wp_form .rps_table th {
    /* The saved form markup sets a 160/180px inline minimum. */
    min-width: 0 !important;
    text-align: left;
  }

  body.mobile_device .mw_wp_form .rps_table td {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  body.mobile_device .mw_wp_form .rps_table input[type="text"],
  body.mobile_device .mw_wp_form .rps_table input[type="email"],
  body.mobile_device .mw_wp_form .rps_table textarea,
  body.mobile_device .mw_wp_form .rps_table select {
    box-sizing: border-box;
    max-width: 100%;
    min-width: 0;
  }

  body.mobile_device .mw_wp_form .rps_table .mwform-tel-field {
    display: flex;
    align-items: center;
    gap: 0.25em;
    max-width: 100%;
  }

  body.mobile_device .mw_wp_form .rps_table .mwform-tel-field input[type="text"] {
    flex: 1 1 0;
    width: 0;
  }

  body.mobile_device .mw_wp_form .rps_table .horizontal-item {
    display: block;
    margin-left: 0;
  }
}

/* This theme positions body relatively; preserve the core toolbar's page origin. */
@media screen and (max-width: 600px) {
  body.mobile_device.admin-bar #wpadminbar {
    top: calc(0px - var(--wp-admin--admin-bar--height, 46px));
  }
}

/* The retained mobile script uses btnFIn; keep PAGE TOP above the fixed footer. */
body.mobile_device #return_top2.btnFIn {
  bottom: 75px;
  -webkit-transform: translate3d(0,0,0);
  transform: translate3d(0,0,0);
}
