body.modal-open {
    overflow: hidden;
}

#modal-overlay {
    display: flex;
    background: #0000007a;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    top: 0;
    backdrop-filter: blur(2px);
}

.modal {
    max-width: 700px;
    width: 100%;
    margin: 0 auto;

    color: var(--color-foreground);
    background: var(--body-background-color);
}


.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 55px;

    color: var(--color-brand-contrast);
    background: var(--color-brand);
}

.modal-header .close-modal {
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 1.7em;
    padding: 4px 5px; /* 0px;*/
    min-width: 100px;
    cursor: pointer;

    border: 0;
    min-height: 100%;
    align-self: stretch;

    color: var(--color-brand-contrast);
    background-color: transparent;

    transition: .1s ease-out background-color;
}

.modal-header .close-modal:hover,
.modal-header .close-modal:focus {
    background-color: var(--color-brand-light);
}

.modal-header .close-modal:active {
    background-color: #a50000;
}

.modal-header h2 {
    margin: 0;
    font-weight: normal;
    font-size: 1.5em;
    padding: 0 .5em;
}

.modal-content {
    min-height: 150px;
    /*overflow-x: hidden;*/
    overflow-y: auto;
    max-height: calc(100vh - 60px/* - 2em*/);
    padding: .5em;
}

.dropdown-menu-right {
    right: 0;
}

.modal.modal-open {
    transform: scale(1) translate(0, 60vh);

    animation: modal-open-animation .5s linear forwards;
}

.modal.modal-open.modal-open-no-animation {
    transform: none;
    animation: none;
}

@keyframes modal-open-animation {
    66% {  transform: scale(1) translate(0, 0); }
    69% {  transform: scale(1) translate(0, 2vh);}
    73% {  transform: scale(1) translate(0, 0); }
    80% {  transform: scale(1) translate(0, 1vh);}
    100% { transform: scale(1); }
}
