An ecomorphological analysis of the determinants of mating success