.avatar {
  border: 2px #FFF solid;
  display: inline-block;
  margin-right: 5px;
  position: relative;
  img {
    width: $avatar-mini-size;
  }
}

.avatar-small {
    width: $avatar-small-size;
}

.avatar-mini {
    width: $avatar-mini-size
}


.avatar-slide {
  color: #FFF;
  padding: 25px 0px 0;
  position: relative;
  .avatar-detail {
    margin: 5px auto 25px;
    padding: 5px 15px;
    text-align: center;
    p {
      @include text-overflow();
      margin-bottom: 5px;
      a {
        color: $nav-slide-link-color;
        display: block;
        margin-bottom: 5px;
      }
      &:first-child {
        font-size: 24px;
      }
    }
    span {
      background-color: rgba(255, 255, 255, 0.1);
      color: #FFF;
      display: inline-block;
      font-size: 10px;
      line-height: 25px;
      margin: 5px 5px 0 0;
      padding: 1px 7px;
    }
  }
  .avatar-link {
    margin-bottom: 1px;
    a {
      color: #FFF;
      font-size: 16px;
      line-height: 35px;
      position: relative!important;
      i {
        height: 20px;
        text-align: center;
        width: 20px;
        z-index: 3;
      }
      &.btn {
        border-left: 1px rgba(0,0,0, 0.2) solid;
        border-radius: 0;
        background:$avatar-link-color;
        &:first-child {
          border-left: 0;
        }
      }
      &.btn:hover {
        background: darken($avatar-link-color, 3.2%);
      }
      em {
        height: 14px;
        margin-left: 5px;
        margin-top: -4px;
        position: absolute;
        top: 50%;
        width: 14px;
        &:after {
          @extend .box-circle;
          background-color: #FFCC33;
          content: "";
          height: 8px;
          left: 0;
          position: absolute;
          width: 8px;
        }
        &.red:after {
          background-color: #E02222;
        }
        &.green:after {
          background-color: #A9D96C;
        }
        &:before {
          @extend .box-circle;
          background: transparent;
          border: 3px solid #FFF;
          content: "";
          height: 24px;
          left: -8px;
          @include opacity (0);
          position: absolute;
          top: -8px;
          width: 24px;
        }
        &.active:before {
          @include animation(sonar 2s ease-out infinite);
        }
      }
    }
  }
}

@include keyframes(sonar) {
  from {
    @include transform(scale(0));
    opacity: 1;
  }
  to {
    @include transform(scale(1));
    opacity: 0;
  }
}

.avatar-chart {
  display: inline-block;
  height: $avatar-chart-size;
  left: 50%;
  margin-left: -$avatar-chart-size/2;
  position: relative;
  text-align: center;
  width: $avatar-chart-size;
  canvas {
    left: 0;
    position: absolute;
    top: 0;
  }
  img {
    left: ($avatar-chart-size - $avatar-chart-image-size)/2;
    position: absolute;
    top: ($avatar-chart-size - $avatar-chart-image-size)/2;
    width: $avatar-chart-image-size;
  }
  .percent {
    background-color: $colors-theme;
    color: #FFF!important;
    display: inline-block!important;
    font-size: 10px!important;
    padding: 5px 10px;
    position: absolute!important;
    right: -40px;
    text-align: center;
    z-index: 2;
    width:auto!important;
    height:auto!important;
    line-height:15px!important;
    &:after {
      content: '%';
      font-size: .8em!important;
      margin-left: 0.1em;
    }
    &:before {
      @include triangle(10px, $colors-theme , left); // triangle($size, $color, $direction)
      content: "";
      left: -10px;
      position: absolute;
      top: 7px;
    }
  }
}