Predicting climate-driven regime shifts versus rebound potential in coral reefs