#overlay{
    box-sizing: border-box;
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    background-color: rgba(0,0,0,0.35);
    z-index: 110;
    display: none;
    opacity: 0;
    align-items: center;
    justify-content: center;
    padding: 2rem 0;
    transition: opacity 0.3s;
}

#overlay > *{
    box-sizing: border-box;
    width: calc(100vw - 4rem);
    padding: 1rem;
    background-color: white;
    position: relative;
    z-index: 1;
    box-shadow: var(--bs);
    border-radius: 0.5rem;
    max-width: var(--mw);
}

#overlay > * > *{
    display: none;
}

#overlay h3{
    color: var(--accent);
    margin-bottom: .5rem;
}

#overlay p{
    text-align: justify;
}

#overlay p + p{
    margin-top: 0.5rem;
}

#overlay .functions{
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

#overlay .functions > *{
    font-weight: bold;
    margin-left: 1rem;
    margin-top: 1rem;
    cursor: pointer;
}

#overlay .functions > *:hover{
    color: var(--gray_dark2)
}

#overlay .functions > *:active{
    color: var(--gray_darkest);
}

#overlay .functions > *:last-child{
    color: var(--accent);
}

#overlay .functions > *:last-child:hover{
    color: var(--accent_light);
}

#overlay .functions > *:last-child:active{
    color: var(--accent_darker);
}

@media screen and (max-width: 400px) {
    #overlay > *{
        width: calc(100vw - 2rem);
        padding: 1rem;
    }
}