added css animation for hiding and showing buttons