/* 用户头像抽取 */
.riten-avatar {
  position: relative;
  display: inline-block;
  border-radius: 50%;
  overflow: hidden;
  background: fade(@riten-nice-blue, 15%);
  font-weight: 600;
  color: @riten-nice-blue;
  text-align: center;
  cursor: pointer;

  // 默认大小
  &, &.default {
    width: 40px;
    height: 40px;
    line-height: 40px;
    font-size: @riten-font-size-13;
  }
  // 小号头像
  &.small {
    width: 16px;
    height: 16px;
    line-height: 16px;
    font-size: @riten-font-size-12;
  }
  // 大号头像
  &.large {
    width: 60px;
    height: 60px;
    line-height: 60px;
    font-size: 20px;
  }

  // 默认头像
  &.tenant,
  &.department {
    &:after {
      content: '';
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      width: 100%;
      height: 100%;
      z-index: 1;
    }
    &.tenant:after {
      background: url(../assets/riten_avatar_tenant_default.png) no-repeat;
      background-size: cover;
    }
    &.department:after {
      background: url(../assets/riten_avatar_department_default.png) no-repeat;
      background-size: cover;
    }
  }

  // 如果有图片，覆盖默认图片
  img {
    position: relative;
    width: 100%;
    height: 100%;
    object-fit: cover;
    vertical-align: baseline;
    z-index: 2;
  }
}
