.modal { border-radius: 2px; text-align: center; position: fixed; width: 100%; height: 100%; z-index: 100; top: 50%; left: 50%; transform: translate(-50%, -50%); background-color: #f7f7f7; align-items: center; justify-content: center; max-width: 17em; max-height: 20em; font-family: sans-serif; font-size: 22px; flex-direction: column; padding: 1em; } .modal-background { position: fixed; top: 0; left: 0; width: 100%; height: calc(100% + 100px); background-color: rgba(0, 0, 0, 0.55); z-index: 50; cursor: pointer; } .modal > form > div { display: flex; flex-direction: column; margin-bottom: 1em; } .modal > form > div > label { display: flex; font-size: 16px; }