People don't learn such an important concept...
Akainu's magma failed to penetrate Shanks' sword which was being imbued with Shanks' CoA haki. Akainu wasn't using his best punch sure, but magma by itself does nothing to powerful CoA users, let alone fire.
Even if Kaido wasn't fire proof Sanji still would not have managed to do zilch.