.opaque {
    position: fixed;
    background-color: rgba(0,0,0,0.7);
    z-index: 100;
    padding-left: $nav-item-width;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    overflow: scroll;

    .modal-wrapper {
        margin: 0 auto;
        width: 85%;
        max-width: 50rem;
        margin-top: 5rem;
        position: relative;

        .modal {
            background-color: $white;
            padding: 1rem;
            h2 {
                font-size: 1.3rem;
            }

        }
        .close-modal {
            position: absolute;
            right: -2.5rem;
            width: 2.5rem;
            height: 2.5rem;
            color: $white;
            background-color: $blue;
            text-align: center;

            i {
                line-height: 2.5rem;
            }
        }
    }
}

body.modal-open {
    overflow: hidden;
}


@media screen and (max-width: $phone-max) {
    .opaque {
        padding: 3rem 0.5rem 0.5rem 0.5rem;
        .modal-wrapper {
            width: 100%;
            margin: 0;
        }
    }

    .close-modal {
        right: 0 !important;
        top: -2.5rem;
    }
}

@media screen and (min-width: $xl-desktop-min) {
    .opaque {
        padding-left: $nav-wide;
    }
}
