#vx-alert::after {
    content: '';
    width: 100%;
    height: 100%;
    display: block;
    background-color: rgba(0,0,0,.8);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 999999;

    /* hidden state */
    opacity: 0;
    visibility: hidden;
    pointer-events: none;      /* so it can't block clicks while invisible */
    transition: opacity .3s ease, visibility .3s ease;
}

#vx-alert:not(:empty)::after {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}