What are the rules around deducting search costs (office space, broken deal fees, email, CRM, etc) for tax purposes?

Does one need to have acquired a business to be considered "in business" or is the act of searching for a deal in pursuit of creating a holding company or alternative asset manager a business in and of itself?

Does it differ if you are self funding the deal vs intending to take investors? Do you have to intend to charge fees to investors vs having a pref / common economic arrangement?

Any good tax advisors around this topic folks can recommend?

Separately, is it common for search costs to be reimbursed in the funds flow at close for SBA deals with preferred equity raised from outside investors?