flex-box based modal with centered elements