@import "./variables.less";

.modal.active {
  .modal__header {
    visibility: visible;
  }
}

.modal__header {
  width: 90%;
  max-width: 960px;
  height: 45px;
  border-radius: 5px 5px 0 0;
  position: fixed;
  top: 10%;
  left: 50%;
  transform: translateX(-50%);
  background: @themeBlue;
  visibility: hidden;
  backface-visibility: hidden;
  transition: all @speed @easing 0.3s;
  z-index: 2;

  .modal__header__inner {
    width: 20em;
    padding-left: 3.33%;
  }

  .github-logo {
    height: 45px;
    width: 2em;
    // text-align: center;
  }

  .header-text {
    height: 45px;
    line-height: 45px;
    width: 18em;
    margin-left: 3em;
  }
}

.list {
  height: 100%;
  padding-top: 45px;
  overflow-y: auto;
}

.list__content {
  display: flex;
  flex-flow: row wrap;
  padding-bottom: 10px;
  z-index: 1;
}

.list__legend {
  // display: flex;
  width: 90%;
  height: 36px;
  line-height: 36px;
  // padding: 55px 0 10px;
  margin: 10px 3.33%;
  color: #555;

  .contribution-degree {
    float: none;
    display: inline-block;
    margin: 0 1em;

    .dot {
      margin: 0 3px;
    }
  }
}

.list__item {
  width: 45%;
  height: 36px;
  min-width: 300px;
  margin-bottom: 10px;
  margin-left: 3.33%;

  .github-avatar {
    height: 36px;
    width: 36px;
    float: left;
  }
}

.contributor-info {
  height: 36px;
  margin-left: 3em;
  background: #f5f5f5;

  &::after {
    visibility: hidden;
    display: block;
    font-size: 0;
    content: " ";
    clear: both;
    height: 0;
  }
}

.contributor-name {
  float: left;
  height: 36px;
  line-height: 36px;
  margin-left: 24px;

  a {
    text-decoration: none;
    color: #555;

    &:hover {
      color: #4a60b2;
    }
  }
}

.contribution-degree {
  float: right;
  height: 36px;
  line-height: 36px;
  margin-right: 24px;
  color: black;

  .dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #8d8d8d;
  }

  &[data-degree="1"],
  &[data-degree="2"],
  &[data-degree="3"],
  &[data-degree="4"] {
    .dot-1 {
      background: #d6e588;
    }
  }

  &[data-degree="2"],
  &[data-degree="3"],
  &[data-degree="4"] {
    .dot-2 {
      background: #8bc669;
    }
  }

  &[data-degree="3"],
  &[data-degree="4"] {
    .dot-3 {
      background: #3ea541;
    }
  }

  &[data-degree="4"] {
    .dot-4 {
      background: #1c6825;
    }
  }
}

.modal-contributors {
  width: 90%;
  height: 80%;

  .close-modal {
    z-index: 11111;
    top: 0;
    right: 1em;

    svg {
      height: 28px;
      width: 28px;
    }
  }
}

@media (max-width: 767px) {
  .list__content {
    // display: flex;
    // flex-flow: row wrap;
    justify-content: center;
  }

  .list__item {
    margin-left: 0;
  }

  .list__legend {
    width: 100%;
    margin: 0 auto;
    text-align: center;
  }

  .modal__header {
    .modal__header__inner {
      // width: 20em;
      margin: 0 auto;
      padding-left: 0;
    }

    .header-text {
      margin-left: 2.5em;
    }
  }

  .modal-contributors {
    .close-modal {
      right: 0.5em;

      svg {
        height: 24px;
        width: 24px;
      }
    }
  }
}

@media (max-width: 360px) {
  .list__item {
    margin-left: 0;
    min-width: 270px;
  }
}
