@import '~styles/mixins';

.Stats {
  padding: 20px;
  position: relative;
  display: flex;
  flex-wrap: wrap;
  max-height: 100%;
  overflow-y: scroll;

  .section {
    padding: 10px;
  }

  .refresh {
    position: absolute;
    right: 10px;
    top: 10px;
    width: 40px;
    height: 40px;
    border-radius: $border_radius;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    background-color: $color-blue;
    cursor: pointer;

    &:hover {
      &::before {
        content: '';
        width: 100%;
        height: 100%;
        top: 0;
        right: 0;
        position: absolute;
        background: hsla(0, 0%, 100%, 0.1);
      }
    }
  }

  .card {
    display: inline-flex;
    flex-direction: column;
    border-radius: $border_radius;
    padding: 20px 20px 40px;
    box-shadow: 0 3px 8px 0 rgba(0, 0, 48, 0.18);
    margin-left: 20px;

    &:first-child {
      margin-left: 0;
    }

    .title {
      font-weight: 700;
      letter-spacing: 1.4px;
      padding-bottom: 5px;
      font-size: 18px;
      margin: 0 0 10px;
      border-bottom: 1px solid #e8e8e8;
    }

    .background {
      border: 1px solid rgba(255, 99, 132, 1);
      width: 80px;
      height: 80px;
      border-radius: 100%;
      display: flex;
      justify-content: center;
      text-align: center;
      margin: 0 auto;
      margin-top: 20px;
      transition: 0s;
      position: relative;
      overflow: hidden;

      &::before {
        content: '';
        position: absolute;
        height: 100%;
        width: 100%;
        background-color: rgba(255, 99, 132, 0.2);
        top: 0;
        left: 0;
        animation: backgroundEnter;
        animation-duration: 1s;
        animation-timing-function: ease-out;
        animation-fill-mode: forwards;
      }

      .result {
        text-align: center;
        font-size: 20px;
        font-weight: bold;
        display: flex;
        justify-content: center;
        align-items: center;
      }
    }
  }
}

@keyframes backgroundEnter {
  0% {
    top: 80px;
  }

  100% {
    top: 0px;
  }
}
