html {
  box-sizing: border-box;
}
*,
*:before,
*:after {
  box-sizing: inherit;
}
.no-border tr td,
.no-border tr th {
  border-width: 0;
  padding: 1px;
  background: none;
}
.table-scroll {
  position: relative;
  width:100%;
  z-index: 1;
  margin: auto;
  overflow: auto;
  margin-bottom: 21px;
  height: 780px;
}
.table-scroll table {
  width: 100%;
  margin: auto;
  border-collapse: separate;
  border-spacing: 0;
}
.table-wrap {
  position: relative;
}
.table-scroll th {
  background:#fff;
  padding: 5px 10px;
  vertical-align: top;
  width: 18%;
  border-bottom: 1px solid #dddddd;
}
.table-scroll td {
  background:#fff;
  padding: 5px 10px;
  vertical-align: top;
  width: 18%;
  border-bottom: 1px solid #dddddd;
}
.table-scroll thead th {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
}
/* safari and ios need the tfoot itself to be position:sticky also */
.table-scroll tfoot,
.table-scroll tfoot th,
.table-scroll tfoot td {
  position: -webkit-sticky;
  position: sticky;
  bottom: 0;
  background: #666;
  color: #fff;
  z-index:4;
}
a:focus {
/*  background: red;*/
  background: none;
} /* testing links*/

th:first-child {
  position: -webkit-sticky;
  position: sticky;
  left: 0;
  z-index: 2;
  width: 22%;
  background-color:#ffffff;
  word-wrap: break-word;
  white-space: normal;
}
thead th:first-child,
tfoot th:first-child {
  z-index: 5;
}
@media screen and (max-width: 48em) {
.table-scroll {
  position: relative;
  width:100%;
  z-index: 1;
  margin: auto;
  overflow: auto;
  margin-bottom: 21px;
  height: 580px;
}
.table-scroll table {
  width: 100%;
  max-width: 560px;  
  margin: auto;
  border-collapse: separate;
  border-spacing: 0;
}
.table-wrap {
  position: relative;
}
.table-scroll th {
  padding: 5px 10px;
  background-color:#fff;
  vertical-align: top;
  width: 100px;
}
.table-scroll td {
  padding: 5px 10px;
  vertical-align: top;
  width: 100px;
}
.table-scroll thead th {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
}
/* safari and ios need the tfoot itself to be position:sticky also */
.table-scroll tfoot,
.table-scroll tfoot th,
.table-scroll tfoot td {
  position: -webkit-sticky;
  position: sticky;
  bottom: 0;
  background: #666;
  color: #fff;
  z-index:4;
}
a:focus {
  background: red;
} /* testing links*/

th:first-child {
  position: -webkit-sticky;
  position: sticky;
  left: 0;
  z-index: 2;
  width: 160px;
  min-width: 160PX;
  max-width: 160px;
  background-color:#ffffff;
  word-wrap: break-word;
  white-space: normal;
}
thead th:first-child,
tfoot th:first-child {
  z-index: 5;
}
}
@media (max-width: 768px){
.table-responsive>.table>thead>tr>th, .table-responsive>.table>tbody>tr>th, .table-responsive>.table>tfoot>tr>th, .table-responsive>.table>thead>tr>td, .table-responsive>.table>tbody>tr>td, .table-responsive>.table>tfoot>tr>td {
  white-space: normal;
}
}
