@import '../../../styles/main';

.FoundingMembersLeaderboards {
  padding-bottom: 120px;
  background-color: $c_catskill-white;

  &__header-wrapper {
    padding: 24px 0 84px 0;
    background-color: $c_black;
  }

  &__back {
    @extend %container;

    display: flex;
    align-items: center;

    &__arrow {
      color: $c_blue-ribbon;
      transform: rotate(90deg) scale(.79);
    }

    &__text {
      margin-left: 17px;
      font-family: $font-secondary;
      font-size: 18px;
      font-weight: 600;
      line-height: 22px;
      letter-spacing: -.4000000059604645px;
      color: $c_white;
      text-align: right;
    }
  }

  &__header {
    @extend %container;

    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 40px;

    &__title {
      font-family: $font-primary;
      font-size: 48px;
      line-height: 56px;
      letter-spacing: 0;
      color: white;
    }
  }

  &__score-toggle {
    display: grid;
    width: 454px;
    height: 52px;
    padding: 2px;
    cursor: pointer;
    background-color: $c_ebony-clay;
    grid-template-columns: 1fr 1fr;

    &__item {
      display: grid;
      place-items: center;

      &__text {
        font-family: $font-primary;
        font-size: 18px;
        line-height: 20px;
        letter-spacing: 0;
        color: $c_white;
      }
    }

    &__item--active {
      background-color: $c_blue-ribbon;
    }
  }

  &__scoring-cutoff-date {
    @extend %container;

    position: relative;
    display: flex;
    align-items: flex-end;
    flex-direction: row-reverse;
    height: 20px;

    &__text {
      position: absolute;
      bottom: -30px;
      font-family: $font-secondary;
      font-size: 14px;
      color: white;
    }
  }

  &__table {
    @extend %container;

    margin-top: -44px;

    &__header {
      height: 44px;
      padding: 0 0 0 30px;

      &--founding {
        grid-template-columns: 2.5fr 1fr 1fr 1fr 1fr;
      }

      &--nonfounding {
        grid-template-columns: 1.8fr 1fr 1fr 1fr;
      }

      &__item {
        font-family: $font-secondary;
        font-size: 14px;
        line-height: 20px;
        letter-spacing: -.4000000059604645px;
        text-align: center;
      }
    }

    &__row {
      height: 80px;
      padding: 0 0 0 30px;
      background-color: white;

      &--founding {
        grid-template-columns: 2.5fr 1fr 1fr 1fr 1fr;
      }

      &--nonfounding {
        grid-template-columns: 1.8fr 1fr 1fr 1fr;
      }
    }

    &__main {
      position: relative;
      display: flex;
      align-items: center;

      &__checkmark {
        position: absolute;
        top: 40px;
        left: 32px;
        display: grid;
        width: 20px;
        height: 20px;
        padding: 5px;
        color: white;
        background-color: $c_blue-ribbon;
        border-radius: 50%;
        place-items: center;
      }

      &__placeholder {
        width: 48px;
        height: 48px;
        background-color: #dfe4ea;
        border-radius: 50%;
      }

      &__data {
        display: flex;
        flex-direction: column;
        margin-left: 12px;
      }

      &__name {
        font-family: $font-secondary;
        font-size: 18px;
        line-height: 24px;
        letter-spacing: 0;
        color: #4038ff;
      }

      &__handle {
        font-family: $font-secondary;
        font-size: 14px;
        line-height: 20px;
        letter-spacing: -.4000000059604645px;
      }
    }

    &__referrer {
      display: flex;
      align-items: center;

      &__placeholder {
        width: 28px;
        height: 28px;
        background-color: #dfe4ea;
        border-radius: 50%;
      }

      &__data {
        display: flex;
        flex-direction: column;
        margin-left: 8px;
      }

      &__name {
        font-family: $font-secondary;
        font-size: 14px;
        line-height: 20px;
        letter-spacing: -.4000000059604645px;
      }

      &__handle {
        font-family: $font-secondary;
        font-size: 12px;
        line-height: 16px;
        letter-spacing: -.4000000059604645px;
      }
    }

    &__score {
      display: flex;
      align-items: center;
      justify-content: center;

      p {
        font-family: $font-primary;
        font-size: 20px;
        line-height: 28px;
        letter-spacing: 0;
        text-align: center;
      }
    }
  }

  @media #{$screen-max-lg} {
    &__back {
      display: none;
    }

    &__table {
      width: 100%;
      padding: 0 32px;
    }
  }

  @media #{$screen-max-md} {
    &__header {
      align-items: unset;
      flex-direction: column;
      margin-left: 32px;
      padding: 0;

      &__title {
        margin-bottom: 18px;
      }
    }

    &__scoring-cutoff-date {
      margin-right: 32px;
      padding: 0;

      &__text {
        font-size: 12px;
      }
    }

    &__table {
      &__header--founding {
        grid-template-columns: 1.6fr .8fr .8fr .8fr .8fr;

        p:nth-of-type(6) {
          display: none;
        }
      }

      &__row--founding {
        grid-template-columns: 1.6fr .8fr .8fr .8fr .8fr;

        div:nth-of-type(6) {
          display: none;
        }
      }
    }
  }

  @media #{$screen-max-sm} {
    &__header {
      margin-left: 20px;

      &__title {
        font-size: 32px;
        line-height: 40px;
      }
    }

    &__score-toggle {
      width: 355px;
      height: 42px;

      &__item__text {
        font-size: 14px;
        line-height: 20px;
      }
    }

    &__table {
      padding: 0 20px;

      &__score p {
        font-size: 14px;
        line-height: 20px;
      }

      &__header {
        padding: 0 16px;

        &__item {
          font-size: 12px;
          line-height: 16px;
        }
      }

      &__header--founding {
        grid-template-columns: 1.5fr 1fr 1fr;

        p:nth-of-type(3),
        p:nth-of-type(4),
        p:nth-of-type(6) {
          display: none;
        }
      }

      &__header--nonfounding {
        grid-template-columns: 1.5fr 1fr 1fr;

        p:nth-of-type(3) {
          display: none;
        }
      }

      &__row {
        padding: 0 16px;
      }

      &__row--founding {
        grid-template-columns: 1.5fr 1fr 1fr;

        div:nth-of-type(3),
        div:nth-of-type(4),
        div:nth-of-type(6) {
          display: none;
        }
      }

      &__row--nonfounding {
        grid-template-columns: 1.5fr 1fr 1fr;

        div:nth-of-type(3) {
          display: none;
        }
      }

      &__main {
        &__checkmark {
          left: 27px;
          width: 18px;
          height: 18px;
          padding: 4px;
        }

        &__placeholder {
          width: 40px;
          height: 40px;
        }

        &__name {
          font-size: 14px;
          line-height: 20px;
        }

        &__handle {
          font-size: 11px;
          line-height: 16px;
        }
      }
    }
  }
}
