Few tweaks to make it work without Prototype.js on page (or es6) (Function.bind() specifically).
A visual adjustment as well as it looked broken (different box-sizing).