Idalia weakens to tropical storm after lashing Florida