tweak tooltip so that overflowing content height is constrained by tooltip when hidden (TODO: also constrain this when visible, since max-height of child content does not always constrain to max-height of parent tooltip)
tweak tooltip placement algorithm to constrain to window viewport; refactor positioning to be more readable by delaying translation to relative coordinates