Mechanisms of recovery and resilience of different components of mosaics of habitats on shallow rocky reefs