Resource allocation between reproductive phases: the importance of thermal conditions in determining the cost of incubation