/* =======================================================
   CANTAT Modern Modal Overlay
   ======================================================= */

#theModal {
    position: fixed;
    inset: 0;

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

    z-index: 99999;

    padding: 40px;

    background: rgba(20, 30, 45, .35);
}

#theModal.open {
    display: flex;
}

body.modal-open {
    overflow: hidden;
}

#overlayWrapper.modal-backdrop {
    position: relative !important;
    inset: auto !important;

    width: auto !important;
    height: auto !important;

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

    padding: 0 !important;

    background: transparent !important;
    opacity: 1 !important;
    z-index: 1 !important;
}

.modal-dialog {
    position: relative;

    width: min(900px, 85vw);
    max-height: 85vh;

    background: #fff;

    border-radius: 22px;
    overflow: hidden;

    box-shadow: 0 30px 80px rgba(0, 0, 0, .28);

    animation: cantatDialogShow .25s ease;
}

.modal-header {
    position: sticky;
    top: 0;
    z-index: 2;

    background: #fff;

    padding: 28px 75px 22px 35px;

    border-bottom: 1px solid #ececec;
}

.modal-header h2 {
    margin: 0;

    color: var(--ciFarbe2, #284e9f);

    font-size: 1.8rem;
    line-height: 2.2rem;
    font-weight: 650;
}

.modal-body {
    padding: 35px;

    max-height: calc(85vh - 95px);

    overflow-y: auto;
    overflow-x: hidden;

    line-height: 1.8;
}

.modal-body h2 {
    display: none;
}

.modal-body h3 {
    margin: 30px 0 10px;

    color: var(--ciFarbe2, #284e9f);

    font-size: 1.25rem;
    font-weight: 600;
}

.modal-body p {
    margin: 12px 0;
}

.modal-body ul {
    margin: 12px 0 12px 25px;
}

.modal-body li {
    padding-bottom: .4em;
}

.modal-body a {
    color: var(--ciFarbe2, #284e9f);
}

.modal-body b,
.modal-body strong {
    font-weight: 650;
}

.modal-close {
    position: absolute;

    top: 18px;
    right: 18px;

    width: 46px;
    height: 46px;

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

    z-index: 5;

    border: none;
    border-radius: 50%;

    background: #f6f6f6;

    cursor: pointer;

    transition:
        background .2s ease,
        transform .2s ease;
}

.modal-close img {
    width: 20px;
    height: 20px;
}

.modal-close:hover {
    background: var(--ciFarbe2, #284e9f);

    transform: rotate(90deg);
}

.modal-close:hover img {
    filter: invert(1);
}

@keyframes cantatDialogShow {
    from {
        opacity: 0;
        transform: translateY(20px) scale(.96);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media screen and (max-width: 700px) {
    #theModal {
        padding: 18px;
    }

    .modal-dialog {
        width: 100%;
        max-height: 90vh;
        border-radius: 18px;
    }

    .modal-header {
        padding: 22px 65px 18px 24px;
    }

    .modal-header h2 {
        font-size: 1.45rem;
        line-height: 1.8rem;
    }

    .modal-body {
        padding: 24px;
        max-height: calc(90vh - 85px);
    }
}