Buying a leasehold property is not a problem, but there are matters to consider so that you are aware of the costs and the differences over a freehold property.
A 99 year remaining lease term is absolutely fine. Anything 80 years or below you will need to extend the lease term, as mortgage lenders may not lend. The seller can start the process (providing they have lived in the property for two years) with a statutory lease extension (you may have to pay the costs). Don't expect a seller to extend the lease if there are 85+ years remaining.
You will need to be aware of how much the ground rent per annum is and whether it increases every 10/25 years and by what percentage.
You will need to be aware of how much the service charges are per month.
You will need to be aware of any Section 20 Notices for major works in the pipeline, whether any works have been completed recently but not yet paid for. Is there a sinking fund and how much is in it?
You will need to be aware that on completion there will be notices served on the management company/freeholder about the change of owner and whether you will need to enter into a Deed of Covenant. These come with costs which you will be expected to pay for.
Although service charges are quite high in some cases, bear in mind that all works in the communal areas and to the building are the reason you pay service charges. If you own a freehold property, you won't have service charges, but you will have to pay out for any maintenance costs yourself.
You can order the lease from Land Registry which will set out the length of the lease, what the ground rent is and any stipulations over what you can and can't do. It will also detail how ground rent can rise (some don't).
The seller has to pay for a management pack which is sent to your solicitor. You need to ask your solicitor to outline the important points regarding service charges, if there are any major works planned etc, which the solicitor generally will do when they report to you. But, bear in mind, by the time the solicitor has got this far, you are already a fair way in to the conveyancing process, but this is exactly why you instruct a solicitor.
Once you have owned the property for two years you have the right to apply for a statutory lease extension, so absolutely no need to forfeit the lease by letting the lease term reduce to nil years, when the freeholder could take possession.
Please do not rely on the Estate Agent for information. He is representing the seller and will only pass on information the seller has told him. EAs do not see the legal documentation and have no legal knowledge so anything they do say is not based on facts.