After searching through many sites for fireplace mantels and surrounds it looks like there are no definite distances. Some wood surrounds sold are as close as 4 inches from the opening. The fact that your brick fireplace is painted means there was little worry there about fire burning the paint. But that is still something to worry about. the construction of the fireplace should contain all the fire and smoke produced. If your fireplace can not do that then large distances are still unsafe. Ben Franklin built his stove with doors to reduce the number of fires.