.modal-container {
    position: fixed;
    background-color: var(--milk);
    opacity: 0;
    margin: auto;
    outline: none;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
}

.modal-backdrop {
    position: fixed;
    z-index: 3;
    display: none;
}

.modal-active { display: block; }

.app-toolbar-modal {
    position: absolute;
    z-index: 2;
    top: 0;
    height: 50px;
    width: 100%;
    border: 0 solid var(--sardine);
    border-bottom-width: 1px;
    background-color: var(--milk);
    backface-visibility: hidden;
}

@media (--small-screen) {
    .modal-container {
        top: 0 !important; /* top is set for bigger screens, but always override on small screens. */
        right: 0;
        bottom: 0;
        left: 0;
        max-height: none !important; /* Same as for `top`. */
        transform: translate3d(0, 100%, 0);
    }

    .modal-active .modal-container {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@media not all and (--small-screen) {
    .modal-container {
        position: absolute;
        opacity: 1;
        top: 100px;
        left: 40px;
        width: 300px;
        height: 500px;
        box-shadow: 0 0 15px rgba(0, 0, 0, 0.25);
        border-radius: 2px;
    }

    .modal-backdrop {
        opacity: 0;
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
        background-color: rgba(0, 0, 0, 0.35);
        transform: translate3d(0, -100000px, 0);
    }

    .modal-active {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }

    .app-toolbar-modal { border-radius: 3px 3px 0 0; }

}
