.modal {
    align-items: center;
    bottom: 0;
    display: none;
    -ms-flex-align: center;
    -ms-flex-pack: center;
    justify-content: center;
    left: 0;
    opacity: 0;
    overflow: hidden;
    padding: .4rem;
    position: fixed;
    right: 0;
    top: 0;
}

.modal.active,
.modal:target {
    display: flex;
    display: -ms-flexbox;
    opacity: 1;
    z-index: 400;
}

.modal.active .modal-overlay,
.modal:target .modal-overlay {
    background: none;
    bottom: 0;
    cursor: default;
    display: block;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
}

.modal.active .modal-container,
.modal:target .modal-container {
    animation: slide-down .2s ease 1;
    z-index: 1;
}

.modal-container {
    background: #fff;
    border-radius: .1rem;
    box-shadow: 0 .2rem .5rem rgba(48,55,66,.3);
    display: flex;
    display: -ms-flexbox;
    -ms-flex-direction: column;
    flex-direction: column;
    max-height: 75vh;
    max-width: 640px;
    padding: 0 .8rem;
    width: 100%;
}

.modal-container .modal-header {
    padding: 2rem;
}

.modal-container .modal-body {
    overflow-y: auto;
    padding: 2rem;
    position: relative;
}

.modal-container .modal-footer {
    padding: 2rem;
    text-align: right;
}

.modal.modal-sm .modal-container {
    max-width: 320px;
    padding: 0 .4rem;
}

.modal.modal-lg .modal-overlay {
    background: #fff;
}

.modal.modal-lg .modal-container {
    box-shadow: none;
    max-width: 960px;
}

@keyframes slide-down {
  0% {
    opacity: 0;
    transform: translateY(-$unit-8);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}
