You definitely calculate sample size before collecting the sample. The problem with calculating the sample size afterward is that you would be using the same preliminary data to test an effect size as to find the power to detect that effect. If the null were indeed true, this could lead to a dog-chasing-its-own-tail scenario where you need an N of 100 to have 80% power to detect an OR of 0.5, N of 200 to have 80% power to detect an OR of 0.75, and so on and so forth...
Sometimes a post-hoc power calculation is presented after a main analysis. This is mostly to convince the readers that even a very statistically significant result is less than incidental.
It is of course impossible to know the exact power of a proposed analysis without any preliminary data on the subject. When we don't know prevalence(s), associations, effect size and such, we make reasonable guesses based on a range of possibilities that must be both 1) plausible and 2) scientifically interesting. For instance, if I find a new drug and claim it cures cancer completely, 100% survival, I would only need a sample of like 10 people, but it would be unethical to conduct that study unless there were other scientific reasons to actually believe the drug did as much.
Lastly (in my experience) we do power for multivariate models the same way we do them in univariate models. We use for power calculation the (log) odds ratio and its SE that would be obtained in a multivariate model and adjust the degrees of freedom of the test.