html.modal-active,
body.modal-active {
    overflow: hidden !important;
}

#modal-container {
    position: fixed;
    display: block;
    height: 100vh;
    width: 100vw;
    margin: 0;
    padding: 0;
    top: 0;
    left: 0;
    transform: scale(0);
    z-index: 100;
}

#modal-container .modal-background {
    display: flex;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10 !important;
    align-content: center;
    justify-content: center;
    height: 100%;
}

#modal-container .modal-background .modal {
    border: 1px solid #2c2c2c;
    background: #000000;
    padding: 2em;
    display: inline-block;
    border-radius: 1em;
    position: relative;
    width: 80%;
    min-width: 300px;
    max-width: 30em;
    z-index: 11 !important;
}

#modal-container .b-text {
    color: #FFF;
    width: fit-content;
}

#modal-container.button-modjs {
    transform: scale(1);
}

#modal-container.button-modjs .modal-background {
    background: rgba(0, 0, 0, 0);
    animation: fadeIn 0.5s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}

#modal-container.button-modjs .modal-background .modal {
    overflow-y: scroll;
    max-height: 28em;
    opacity: 0;
    animation: scaleUp 0.5s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}

#modal-container.button-modjs+.content {
    animation: scaleBack 0.5s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}

#modal-container.button-modjs.out {
    animation: quickScaleDown 0s 0.5s linear forwards;
}

#modal-container.button-modjs.out .modal-background {
    animation: fadeOut 0.5s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}

#modal-container.button-modjs.out .modal-background .modal {
    animation: scaleDown 0.5s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}

#modal-container.button-modjs.out+.content {
    animation: scaleForward 0.5s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}

@keyframes fadeIn {
    0% {
        background: rgba(0, 0, 0, 0);
    }

    100% {
        background: #000000cc;
    }
}

@keyframes fadeOut {
    0% {
        background: rgba(0, 0, 0, 0.7);
    }

    100% {
        background: rgba(0, 0, 0, 0);
    }
}

@keyframes scaleUp {
    0% {
        transform: scale(0.8) translateY(1000px);
        opacity: 0;
    }

    100% {
        transform: scale(1) translateY(0px);
        opacity: 1;
    }
}

@keyframes scaleDown {
    0% {
        transform: scale(1) translateY(0px);
        opacity: 1;
    }

    100% {
        transform: scale(0.8) translateY(1000px);
        opacity: 0;
    }
}

@keyframes scaleBack {
    0% {
        transform: scale(1);
    }

    100% {
        transform: scale(0.85);
    }
}

@keyframes scaleForward {
    0% {
        transform: scale(0.85);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes quickScaleDown {
    0% {
        transform: scale(1);
    }

    99.9% {
        transform: scale(1);
    }

    100% {
        transform: scale(0);
    }
}

.modal #form-2 {
    margin: 1em;
}