.surfaceOverlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.5); display: flex; justify-content: center; align-items: center; z-index: 1000; padding: 2rem; box-sizing: border-box; } .surfaceFrame { display: flex; flex-direction: column; background-color: #FFFFFF; padding: 0; border-radius: 1.6rem; position: relative; z-index: 1001; font-size: 2.4rem; color: #000000; max-width: 80%; max-height: 80%; overflow: hidden; box-sizing: border-box; } .surfaceContent { padding: 3.2rem; /*max-height: 100%;*/ flex: 1 1 auto; overflow: auto; box-sizing: border-box; } .closeButton { position: absolute; top: 1rem; right: 1rem; background: none; border: none; font-size: 2.4rem; cursor: pointer; } .closeButton:hover { color: #666; }