@import '@legends/styles/base';

.tooltip {
  font-family: $primaryFont !important;
}

.leaderboardError {
  margin-bottom: 1.5rem;
}

.wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;

  .heading {
    display: flex;
    flex-direction: column;
    text-align: center;
    align-items: center;
    margin-bottom: 3.75rem;
  }

  .title {
    font-size: 2.5rem;
    font-weight: 400;
    line-height: 2.6375rem;
    padding-bottom: 1rem;
  }

  .subtitle {
    color: $mainText;
    font-size: 1.125rem;
    font-weight: 300;
    line-height: 1.3931rem;
    max-width: 44.5rem;
  }

  .tabs {
    display: flex;
    justify-content: space-between;
    gap: .5rem;
    margin: 0 auto 2.75rem auto;
    color: $mainText;
    position: relative;
    .tab {
      position: relative;
      flex: 1;
      padding: .5rem 1rem;
      background: none;
      border: none;
      cursor: pointer;
      font-weight: 400;
      transition: all 0.2s ease;
      font-size: 1rem;
      width: 100%;
      min-width: 7.6875rem;
      height: 3.25rem;
      background-color: rgba($icons, 0.24);
      line-height: 2.25rem;
      border-radius: .5rem; 
    
    }
    
    .ribbon {
      position: absolute;
      top: -0.2rem;
      left: 50%;
      transform: translateX(-50%);
    }

    .current {
      position: absolute;
      bottom: 0.3rem;
      left: 50%;
      transform: translateX(-50%);
      color: #FFFFFFA3;
      font-size: .75rem;
      font-weight: 300;
      line-height: 100%;

    }
    
    .active {
      background-color: $purple-700;
    }
  
   
  }
  .table {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 43.75rem;
    width: 100%;
    background-color: $neutral-700;
    padding: 1rem;
    border-radius: 1rem;
  }

  .header,
  .row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
    font-weight: 300;
    line-height: 1.25rem;
    padding: 0.75rem 1rem;
    margin-bottom: .5rem;
    width: calc(100% - 2rem);

    .cell {
      display: flex;
      align-content: center;
      
      &:first-child {
        flex: 5;
      }
      
      &:nth-child(2),
      &:nth-child(3) {
        flex: 1.5;
      }
      &:last-child {
        text-align: right;
        flex: 1;
        justify-content: flex-end;
      }
      .weightText {
        margin-right: 0.25rem;
        color: rgba($neutral-600, 0.639);
      }
    }
  }
  .header {
    padding-bottom: 0;
    .cell {
      text-transform: uppercase;
      font-size: 0.875rem;
      font-weight: 600;
      color: rgba($tertiaryText, 0.64);
      h5 {
        font-weight: 600;
        color: rgba($tertiaryText, 0.64);
      }

      &:first-child {
        margin-left: .375rem;
        flex: 4.8;
      }
    }

    .playerCell {
      margin-left: 1.15rem;
    }
  }

  .row {
    color: $mainText;
    border-radius: $secondaryBorderRadius;

    .cell:first-child {
      display: flex;
      align-items: center;
    }

    .cell:last-child {
      justify-content: flex-end;
      font-weight: 400;
    }
    
  }

  .rankWrapper {
    display: flex;
    align-items: center;
    width: 1.25rem;
    height: 1.25rem;
    justify-content: center;
    margin-right: 1rem;
  }
  .rank {
    height: 1.25rem;
    width: 1.25rem;
    text-align: center;
  }
  
  .rankedRow1 {
    background-color: rgba($neutral-600, 0.051);
    .cell:last-child, .trophy {
      color: $goldDecorative;
    }
    
  }

  .currentUserRow {
    border-color: $accent;
    border-width: .0625rem;
    border-style: solid;
    background-color: rgba($tertiaryText, 0.1);
    z-index: 2;
    width: 100%;

    backdrop-filter: blur(10px); 
    -webkit-backdrop-filter: blur(10px);
   
    .addressSkeleton {
      background-color: $secondaryBackground;
    }

  }

  .rankedRow2 {
    background-color: rgba($neutral-600, 0.051);
    .cell:last-child, .trophy {
      color: $silverDecorative;
    }
  }

  .rankedRow3 {
    background-color: rgba($neutral-600, 0.051);
    .cell:last-child, .trophy {
      color: $bronzeDecorative;
    }
  }

  .highlightRow {
    background-color: #f0f8ff;
  }

  .trophy {
    align-items: center;
    width: 100%;
    height: 100%;
  }

  .firstPlaceThrophy {
    color: $goldDecorative;
  }

  .secondPlaceThrophy {
    color: $silverDecorative;
  }

  .thirdPlaceThrophy {
    color: $bronzeDecorative;
  }

  .avatar {
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 0.75rem;
    margin: 0 0.25rem 0 0;
    background-color: $secondaryBackground;
  }

  .addressSkeleton {
    width: 8.75rem;
    height: 1.125rem;
  }

  .address {
    font-weight: 400;
  }



  @include breakpoint-down-from(large-tablet) {
    .address {
      width: 6rem;
      display: -webkit-box;
      -webkit-line-clamp: 2;
      -webkit-box-orient: vertical;
      overflow: hidden;
      word-break: break-word;
      line-height: 1.2;
    }
  }
}
