$admin-bg-color: $dark-1 !default;
$admin-text-color: $light-2 !default;


#admin_area {
  background-color: #ffffff;

  & .content {
    padding: 4rem 2rem;
    max-width: 1400px;
    margin: auto;
    position: relative;
  }

  & h1 {
    font-size: 3.2em !important;
    font-weight: 700;
    font-family: "Rubik", sans-serif;
    color: $admin-text-color;
    text-align: left;
    text-transform: none;
    margin: 0.85rem 0 1.7rem 0;
    text-rendering: optimizeLegibility;
    line-height: 1.6;
  }

  & h5 {
    font-weight: 700;
    color: $admin-bg-color;
    padding: 0 0 0 0;
    text-transform: uppercase;
    margin: 20px 0px 0px 0px;
    display: block;
  }

  & b.no_value {
    color: #acacac;
    width: 100%;
    text-align: center;
    display: block;
    font-size: 160%;
    line-height: 0;
  }

  & table {
    border-collapse: collapse;
    width: 100%;

    & td:nth-child(1) {
      width: 30px !important;
    }

    & td:nth-child(2) {
      width: 100px !important;
    }

    & th,
    td {
      text-align: left;
      padding: 8px;
      transition: all 250ms ease-in-out;
    }

    & th {
      font-size: 0.8em;
      max-width: 100px;
      vertical-align: bottom;
      border-bottom: 2px solid $admin-bg-color;
    }

    & tr:nth-child(odd):not(:first-child) {
      background-color: #f6f6f6;
    }

    & tr.marked td,
    th.marked,
    td.marked {
      background-color: #ececec !important;
    }

    & td:hover,
    td.marked:hover {
      background-color: #dadada !important;
      cursor: pointer;
    }
  }

  .details_container {

    display: flex;
    flex-direction: column;
    flex-wrap: wrap;

    & a {
      font-size: 100%;
    }

    & hr {
      border: 2px solid $admin-bg-color;
      opacity: 1;
    }

    & label {
      color: $admin-bg-color;
      padding: 5px 10px 0px 5px;
      font-size: 0.9em;
      // font-weight: 700;
      width: auto;
    }

    & label.long {
      width: 100%;
      display: block;
      margin-bottom: 10px;
    }

    & .detail {
      font-size: 1em;
      padding: 7px 10px;
      background-color: #ececec;
      color: $admin-bg-color;
      border-radius: 4px;
      display: block;
      margin-left: 4px;
    }

    & .detail.true {
      background-color: #b7dbc6;
    }

    & .detail.false {
      background-color: #d9949d;
    }

    & ul:first-child {
      list-style: none;
      margin-top: 0px;
      padding-left: 0px;
    }

    & ul {
      list-style: none;
      margin-top: 0px;
      padding-left: 0; // 3%;
    }

    & li.mapping {
      padding-left: 3%;
    }

    & ul li {
      margin-top: 10px;
    }

  }

  & a {
    text-align: left;
    font-weight: 400;
    font-size: 12px;
  }

  & select {
    padding: 10px;
    min-width: 200px;
    width: 25%;
    min-height: 42px;
    background-color: #f6f6f6;
    color: $admin-bg-color;
    border-color: #f6f6f6;
    font-size: 0.8em;
    cursor: pointer;
  }

  & .filter-container {
    display: block;
    padding: 50px 0px 20px 0px;
  }

  & label {
    font-size: 0.8em;
    color: $admin-bg-color;
    width: 8%;
    min-width: 100px;
  }

  & h3 {
    padding-bottom: 5px;
  }

  & h4 {
    color: $admin-bg-color;
    font-size: 1em;
    padding-bottom: 5px;
  }
}

.stat_indicator {
  width: auto;
  margin: 2px 8px 0 8px;
}

.stat_icon {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: block;
  stroke-width: 4;
  stroke: #fff;
  stroke-miterlimit: 10;
  position: relative;
  margin: auto;
  top: 15%;
}

.loading_stat_circle {
  stroke-dasharray: 0;
  stroke-dashoffset: 0;
  stroke-width: 5px;
  stroke-miterlimit: 10;
  stroke: #3a3a3a7c;
  fill: none;
}

.loading_stat_circle_rot {
  stroke-dasharray: 166;
  stroke-dashoffset: 0;
  stroke-width: 10px;
  stroke-miterlimit: 10;
  stroke: #3a3a3a7c;
  fill: none;
  animation:
    rot_circle 4s cubic-bezier(0.65, 0, 0.45, 1) forwards,
    rot_circle 4s cubic-bezier(0, 0, 1, 1) infinite,
}

@keyframes rot_circle {
  0% {
    stroke-dashoffset: 0;
    stroke-dasharray: 83;
  }

  100% {
    stroke-dashoffset: -332;
    stroke-dasharray: 83;
  }
}


.success .stat_icon {
  box-shadow: inset 0px 0px 0px $green-mid;
  animation: fill_green 0.8s ease-in-out 0.4s forwards,
    scale 0.3s ease-in-out 0.9s both;
}

.failed .stat_icon {
  box-shadow: inset 0px 0px 0px $red-light;
  animation: fill_red 0.8s ease-in-out 0.4s forwards,
    scale 0.3s ease-in-out 0.9s both;
}

.stat_check,
.stat_cross {
  transform-origin: 50% 50%;
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards;
}

.failed .stat_check {
  display: none;
}

.success .stat_cross {
  display: none;
}

@keyframes stroke {
  100% {
    stroke-dashoffset: 0;
  }
}

@keyframes scale {

  0%,
  100% {
    transform: none;
  }

  50% {
    transform: scale3d(1.1, 1.1, 1);
  }
}

@keyframes fill_green {
  100% {
    box-shadow: inset 0px 0px 0px 30px $green-mid;
  }
}

@keyframes fill_red {
  100% {
    box-shadow: inset 0px 0px 0px 30px $red-light;
  }
}

.results-container {

  .section {
    margin: 2rem 0;
    position: relative;
    border-radius: 4px;
    background: #f6f6f6;
    color: $dark-2;
    padding: 20px 30px;
    display: block;
    border-radius: 4px;
  }

  hr {
    color: black;
  }

  p {
    max-width: 100% !important;
    color: $dark-2;
  }

  & h1, h2, h3, h4, h5 {
    font-weight: 700;
    color: $primary;
    line-height: 1.2 !important;
    max-width: 100%;
  }

  & h1 {
    font-size: 1.6em !important;
  }

  & h2 {
    font-size: 1.4em !important;
  }

  & h3 {
    font-size: 1.2em !important;
    color: $dark-2;
  }

  & h4 {
    font-size: 1.0em !important;
    color: $dark-2;
    font-weight: 400;
  }

  & h5 {
    font-size: 1.0em !important;
    color: $dark-2;
    font-weight: 400;
  }

  ul {
    padding-left: 0;
  }

  li {
    margin-left: 1.2rem;
    padding-left: 0.5rem;
  }

  .percentage {
    float: right;
  }

  h2 .percentage {
    font-weight: 400;
    color: $dark-2;
    font-size: 1rem;
  }

  a {
    font-size: 1.0em !important;
    border: 1px solid #f6f6f6;
    transition: background-color 500ms ease-in-out;
    transition: border 200ms ease-in-out;
    display: block;
    padding: 0.5rem 0.8rem;
    border-radius: 4px;
    color: $dark-2;

    & h4 {
      padding: 0;
      margin: 0;
    }

    &:hover {
      background-color: #ececec;
      border: 1px solid $dark-1;
    }
  }

}

#admin_area table.single-result-table {
  border-collapse: collapse;
  width: 100%;

  & td:nth-child(1) {
    width: 80px !important;
  }

  & td:nth-child(2) {
    // width: 100px !important;
    width: auto !important;
  }

  & tr > td:last-of-type, tr > th:last-of-type {
    text-align: right;
  }

  & tr td.completed-col, tr th.completed-col {
    width: 30px;
  }

}

.inline-indicator {
  display: inline-block;
  width: 20px;
}

.results-form-title {
  font-weight: 700 !important;
  display: block;
  width: 100%;
  padding-bottom: 0px;
}

.results-form-label {
  font-weight: 400;
  display: block;
  width: 100%;
}

.results-form-answer {
  font-weight: 400;
  display: block;
  width: 100%;background-color: #efefef;
  border-left: 4px solid #dbdbdb;
  padding: 5px 10px;
  border-bottom-left-radius: 0;
  border-top-left-radius: 0;
  border-bottom-right-radius: 4px;
  border-top-right-radius: 4px;
  margin-bottom: 24px;
}

.chart-wrapper {
  height: 40vw;
  min-height: 200px;
  max-height: 400px;
  width: 100%;
  margin-bottom: 10vh;
}

ul.legend {
  list-style: none;
}

ul.legend li {
  margin-left: 0;
  padding-left: 0;
}

.legend-color {
  display: inline-block;
  height: 20px;
  width: 20px;
  margin-bottom: -3px;
  margin-right: 10px;
}
