@import "../lib/rankLabel.less";
@import "./alternateLayout.less";
@import "./VotesBox.less";

@media (min-width: 768px) {
  .DiscussionListItem-info .item-discussion-votes + .item-tags {
    right: 122px !important;
  }
}

.item-discussion-votes {
  margin-left: 5px;
  position: absolute;
  right: 80px;
  top: 15px;
  max-width: 150px;
  white-space: nowrap;
  overflow: hidden;
  transition: max-width 0.2s ease-in-out, -webkit-mask-image 0.2s;
  -webkit-mask-image: linear-gradient(
    to right,
    #000 140px,
    rgba(0, 0, 0, 0) 150px
  );
  font-size: 14px;
  line-height: 1;
  color: @muted-color;

  .icon {
    margin-right: 8px;
  }

  @media @phone {
    right: 50px;
  }
}

@media @phone {
  .DiscussionListItem--withVotes .DiscussionListItem-title {
    padding-right: 48px;
  }
}

.VotesModal-list {
  list-style: none;
  padding: 0;
  margin: 0;

  a {
    color: @text-color;
    font-size: 15px;
    font-weight: bold;
    display: block;
    margin-bottom: 10px;
    text-decoration: none;

    &:hover .username {
      text-decoration: underline;
    }
  }

  .Avatar {
    .Avatar--size(32px);
    vertical-align: middle;
    margin-right: 5px;
  }
}

@media only screen and (max-width: 529px) {
  .rankings-mobile {
    display: none !important;
  }
}

.CommentPost-votes {
  .Post-points {
    background-color: transparent;
    border: none;
    margin-right: 0.5em;
  }

  .Post-vote {
    background-color: transparent;
    border: none;
    margin: 8px 0 0;
    color: @text-color;
    cursor: pointer;

    &--active {
      color: @primary-color;
    }

    &.loading {
      margin-left: 3.25px;
      margin-right: 3.25px;
    }

    &:focus {
      outline: 0;
    }

    &.disabled {
      cursor: not-allowed;
    }
  }
}

.Post-Rank {
  color: gray;
  font-size: 10px;
  margin-left: 10px;
}

.User-Rank {
  color: gray;
  font-size: 11px;
  margin-left: 11px;
}

.ranking-1,
.ranking-2,
.ranking-3 {
  span.username {
    margin-top: 15px;
  }

  span.username:hover {
    text-decoration: underline;
  }
}

.rankings {
  width: 100%;

  td,
  th {
    text-align: center;
    padding: 5px;
  }

  &-1 {
    font-size: 8em;
    color: gold;
  }

  &-1-avatar {
    width: 80px;
    height: 80px;
    font-size: 40px;
    line-height: 80px;
  }

  a:hover {
    text-decoration: none;
  }

  &-2 {
    font-size: 6em;
    color: silver;
  }

  &-2-avatar {
    width: 60px;
    height: 60px;
    font-size: 30px;
    line-height: 60px;
  }

  &-3 {
    font-size: 4em;
    color: #cd7f32;
  }

  &-3-avatar {
    width: 40px;
    height: 40px;
    font-size: 20px;
    line-height: 40px;
  }

  &-image {
    display: block;
    margin: 10% auto;
  }

  &-info {
    padding-left: 38.6%;
  }

  &-points {
    font-size: 50px;
  }

  span.username {
    display: block;
  }

  .info-avatar {
    display: block;
    margin: 0 auto 15px;
    position: inherit;
  }
}

.UserCard {
  .item-points {
    .icon {
      margin-right: 5px;
    }
  }
}

.rankings-loadmore {
  text-align: center;
  margin-top: 10px;
}