.container { position: fixed; top: 0; right: 0; z-index: 99999; } .backdrop { width: 100vw; height: 100vh; background-color: black; opacity: 0.7; } .modal { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); background-color: white; width: 500px; header { background: #fcfcfc; padding: 1em 1.5em; border-bottom: 1px solid #ddd; h1 { margin: 0; font-size: 18px; font-weight: 700; line-height: 1.5em; } div { position: absolute; top: 0; right: 0; width: 54px; height: 54px; display: flex; align-items: center; justify-content: center; cursor: pointer; border-left: 1px solid #ddd; color: #666; &:hover { background: #ddd; border-color: #ccc; } } img { height: 32px; width: 32px; } } footer { padding: 1em 1.5em; background: #fcfcfc; border-top: 1px solid #dfdfdf; box-shadow: 0 -4px 4px -4px rgba(0, 0, 0, 0.1); display: flex; justify-content: flex-end; } }