it could be extended as well.

The reward is halved every four years and current transaction value precision is 8 decimals, so the reward will not be exactly zero for more than a hundred years, and 21 million bitcoins will never be mined completely.
If the precision is increased during that time, say the year 2112, then this period will be extended, but the total number will still be a bit lower than 21 million.