.modal { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%) scale(0.8, 0.8); display: block; background-color: rgba(255, 255, 255, 0.9); min-width: 60vw; min-height: 100px; max-height: calc(100vh - 30px); border-radius: 7px; z-index: -1; color: var(--fontbase); padding: 20px; overflow: auto; opacity: 0; transition: all .15s ease; &.modal--open { opacity: 1; z-index: 200; transform: translate(-50%, -50%) scale(1, 1); } } @media (max-width: 999px) { .modal { min-width: 80vw; } } @media (max-width: 666px) { .modal { min-width: 90vw; } } @media (max-width: 444px) { .modal { min-width: calc(100vw - 20px); } } .modal__overlay { position: fixed; left: 0; top: 0; height: 100%; width: 100%; background-color: transparent; z-index: -1; opacity: 0; transition: all .2s ease; &.modal__overlay--open { z-index: 199; opacity: 1; background-color: rgba(0, 0, 0, 0.4); } } .modal__trigger { cursor: pointer; } .modal__closer { position: absolute; top: 20px; right: 20px; display: flex; align-items: center; justify-content: center; width: 30px; height: 30px; background-color: var(--darkerbase); border-radius: 2px; cursor: pointer; z-index: 20; &::before { content: '\e014'; font-family: 'Glyphicons Halflings'; color: white; } } .no-scroll { overflow: hidden; }