@import url(https://fonts.googleapis.com/css?family=Roboto:500,700);

*, *::before, *::after {
  box-sizing: border-box;
}

.checklist_table{
    max-height: 300px;
    /*overflow: auto;*/
    max-width: 100%;
    /*border: 2px dashed #e5e5e5;*/
    padding: 4px;
}

.checklist_table .container {
  max-width: 450px;
  margin: 0 auto;
  border-top: 5px solid #435757;
  background-color: rgba(255, 255, 255, .2);
  box-shadow: 0 0 20px rgba(0, 0, 0, .1);
  user-select: none;
}

.checklist_table h1 {
  margin: 0;
  padding: 20px;
  background-color: rgba(255, 255, 255, .4);
  font-size: 1.8em;
  text-align: center;
}

.checklist_table .items {
  display: flex;
  flex-direction: column;
  /*padding: 20px;*/
  counter-reset: done-items undone-items;
}

.checklist_table h2 {
    position: relative;
    margin: 0;
    padding: 5px 5px;
    font-size: 1.2em;
    background: #6a7a8c;
    color: #fff;
}

.checklist_table h2::before {
  content: '';
  display: block;
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: -20px;
  width: 5px;
  background-color: #435757;
}

h2::after {
  display: block;
  float: right;
  font-weight: normal;
}

.checklist_table .done {
  order: 1;
  background-color: #6a7a8c;
  margin-bottom: 2px;
}

/*.done::after {*/
  /*content: ' (' counter(done-items) ')';*/
/*}*/

.checklist_table .undone {
  order: 3;
   background-color: #6a7a8c82;

}

/*.checklist_table .undone::after {*/
  /*content: ' (' counter(undone-items) ')';*/
/*}*/

/* hide inputs offscreen, but at the same vertical positions as the correpsonding labels, so that tabbing scrolls the viewport as expected */
.checklist_table input {
  display: block;
  height: 53px;
  margin: 0 0 -53px -9999px;
  order: 4;
  outline: none;
  counter-increment: undone-items;
}

.checklist_table input:checked {
  order: 2;
  counter-increment: done-items;
}

.checklist_table label {
    display: block;
    position: relative;
    padding: 0px 0 0px 35px;
    /*border-top: 1px dashed #fff;*/
    order: 4;
    cursor: pointer;
    animation: undone .5s;
    color: #ff000082;

}

.checklist_table label::before {
  content: '\f10c'; /* circle outline */
  display: block;
  position: absolute;
  top: -4px;
  left: 10px;
  font: 1.5em 'FontAwesome';
}

.checklist_table label:hover, input:focus + label {
  background-color: rgba(255, 255, 255, .2);
}

.checklist_table input:checked + label {
  order: 2;
  animation: done .5s;
  color: #259e0e;
}

.checklist_table input:checked + label::before {
  content: '\f058'; /* circle checkmark */


}

@keyframes done {
  0% {
    opacity: 0;
    background-color: rgba(255, 255, 255, .4);
    transform: translateY(20px);
  }
  50% {
    opacity: 1;
    background-color: rgba(255, 255, 255, .4);
  }
}

@keyframes undone {
  0% {
    opacity: 0;
    background-color: rgba(255, 255, 255, .4);
    transform: translateY(-20px);
  }
  50% {
    opacity: 1;
    background-color: rgba(255, 255, 255, .4);
  }
}


.items label:hover{
  background: #e0e0e0;
}