.modal-backdrop {
    position: fixed;
    z-index: 1040;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    transition: opacity 0.15s linear;
    pointer-events: auto;
    opacity: 0;
    background-color: var(--backdrop-background-color);
}
.modal-backdrop:not(.in) {
    pointer-events: none;
}
.modal-backdrop.in {
    z-index: 2040;
    opacity: 0.8;
}

.modal {
    position: fixed;
    z-index: 4005;
    top: -25%;
    left: 50%;
    width: 560px;
    margin-left: -280px;
    transition: opacity 0.1s linear, top 0.3s ease-out;
    pointer-events: auto;
    opacity: 0;
    outline: none;
    background-clip: padding-box;
}
.modal:not(.in) {
    pointer-events: none;
}
.modal.in {
    top: 10%;
    opacity: 1;
}
.modal.modal-lg {
    left: 45%;
    width: 60%;
}
.modal.modal-infinite {
    max-height: 90%;
    overflow-y: auto;
}

.modal-head .close {
    margin-top: 2px;
}
.modal-head h3 {
    margin: 0;
}

.modal-body {
    position: relative;
    overflow-y: auto;
    max-height: 480px;
}
.modal-infinite .modal-body {
    overflow-y: hidden;
    max-height: unset;
}
.modal .modal-body {
    background: var(--modal-body-background);
}

.modal-footer {
    margin-bottom: 0;
    text-align: right;
    background-color: var(--modal-body-background);
}

@media (max-width: 640px), (max-width: 834px) and (orientation: portrait) {
    .layout-root .modal {
        right: 0;
        left: 0;
        overflow-y: auto;
        width: 100%;
        max-height: 90%;
        margin: 0;
    }
    .layout-root .modal.modal-infinite {
        top: 0;
        max-height: 100%;
    }
}