.DialogBackground {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;

    padding: 2rem 0 10vh;

    display: flex;
    align-items: center;
    justify-content: center;

    z-index: 999;
    background-color: rgba(0, 0, 0, 0.5);
}

.BackgroundUnclickable {
    pointer-events: none;
}

.BackgroundClickable {
    backdrop-filter: grayscale(100%) blur(5px);
}

.Dialog {
    pointer-events: auto;
    max-height: 90vh;

    .DialogDocument {
        display: flex;
        flex-direction: column;
        background: $color-bg-white;
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
        word-break: break-word;
    }
}

@media (max-width: 500px) {
    $width: 95vw;

    .Dialog {
        max-width: $width;
    }

    .Dialog.FixedWidth {
        width: $width;
    }
}

@media (min-width: 501px) and (max-width: 991px) {
    // at 501px, same as 95vw above
    $width: calc(60vw + 175px);

    .Dialog {
        max-width: $width;
    }

    .Dialog.FixedWidth {
        width: $width;
    }
}

@media (min-width: 992px) {
    // at 992px, same as (60vw + 175px) above
    $width: calc(40vw + 373px);

    .Dialog {
        max-width: $width;
    }

    .Dialog.FixedWidth {
        width: $width;
    }
}
