.avatar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100px;
  min-width: 100px;
  height: 100px;
  overflow: hidden;
  background-color: $gray-darker;
  box-shadow: inset 0 0 0 3px rgba($gray-dark, 0.8);

  img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .no-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: $gray-lighter;
    font-size: 30px;
  }

  .edit {
    position: absolute;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 20%;
    padding-bottom: 5px;
    background-color: rgba($gray-dark, 0.8);
    transition: color 0.5s ease;

    i,
    svg {
      margin-right: 10px;
    }
  }

  &.avatar-small {
    width: 40px;
    min-width: 40px;
    height: 40px;

    .no-avatar {
      font-size: 15px;
    }
  }

  &.avatar-large {
    width: 160px;
    min-width: 160px;
    height: 160px;

    .no-avatar {
      font-size: 60px;
    }
  }

  &.avatar-editable {
    .edit {
      cursor: pointer;

      &:hover {
        color: white;
      }
    }
  }

  &.avatar-transparent {
    background-color: transparent;
    box-shadow: none;
  }

  &.avatar-round {
    border-radius: 50%;

    img {
      border-radius: 50%;
    }
  }
}
