Pop up window layout (auto size with scrollview) help

Hello,
I am trying to set up a layout for a pop up window, that contains a title, body text and an “OK” button in a vertical layout. I have it set up fine, just the way I want it. The content size dictates window height with fixed width, this is fine. But as you could imagine, at some point, the text content could be so large, that the window height would escape the screen height. The solution that I am looking at right now, is having my text inside a scrollview, but unfortunately, the behavior I am getting doesn’t suit me, as the viewport now has fixed size, which does not affect my pop up window size at all.

I would still like it (window) to expand and shrink based on content size, but in cases where the text is too large, just set the desired max height of the window and rely on the scrollview. I drew some images for a more visual assistance.

The screen on the left has some body text which expands the window as needed. The screen on the middle, contains little text and the screen on the right has a lot of text that overflows beyond the screen size.

The orange bar on the right represents a scrollbar, when the text is too large. In this configuration, the size of the window should no longer be affected. Is it even possible to set up a layout like this? If possible, could you help me out setting up this layout with basic steps, for how to set up the layout in unity editor’s inspector

Did you ever figure this out? I’m trying to do the same thing.