.backdrop { align-items: center; background: rgb(20 20 20 / 70%); display: flex; justify-content: center; height: 100%; left: 0; overflow: auto; pointer-events: all; position: fixed; top: 0; width: 100%; z-index: 100; } .modal { background: #fff; max-width: 1000px; position: relative; width: 80%; .close { position: absolute; top: 1em; cursor: pointer; height: 18px; width: 16px; opacity: 1; padding: 0; right: 0; transition: opacity 0.3s; z-index: 1; svg { display: block; pointer-events: none; } &:hover { opacity: 0.5; } .icon { height: 100%; width: 100%; } @media (min-width: 800px) and (max-width: 991px) { // top: 11em; } } &.narrow { max-width: 460px; width: 50%; @media (min-width: 800px) and (max-width: 991px) { width: 80%; } .close { right: 12px; top: 12px; } } }