That is a question we cannot answer as there is no max distance. We even know of enhancers that act on different chromosomes - but those are naturally rare events.
From a more practical orientation a possible cold be features within the same TAD (topological associated domain) or features within +/-2e5 nucleotides. Generally I would not suggest going larger than that.
Hope this helps.