/* Modal des Inhaltselements "id4web Modal".
   Zeigt ein Bild, einen Text oder beides.

   Eigener Klassenname: ".modal" gehoert Bootstrap 5 und darf nicht
   ueberschrieben werden. */

.id4web-modal {
    display: none; /* wird per JavaScript eingeblendet */
    position: fixed;
    z-index: 99999;
    inset: 0;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.65);
}

/* Flex statt fester Verschiebung: so bleibt auch ein hoher Inhalt
   vollstaendig erreichbar und wird nicht oben abgeschnitten. */
.id4web-modal.is-open {
    display: flex;
}

.id4web-modal__content {
    position: relative;
    margin: auto;
    padding: 3rem 1rem;
    width: fit-content;
    max-width: min(94vw, 760px);
    background: none;
    border: none;
}

.id4web-modal__image {
    width: 100%;
    height: auto;
    max-width: 100%;
    object-fit: contain;
    display: block;
    border-radius: 6px 6px 0 0;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.45);
    cursor: zoom-out;
}

/* Ohne Text traegt das Bild die Rundung auf allen Ecken. */
.id4web-modal--bild .id4web-modal__image:only-of-type {
    border-radius: 6px;
}

/* Text: heller Kasten, damit er auf dem dunklen Grund lesbar ist. */
.id4web-modal__text {
    background: #fff;
    color: #444;
    border-radius: 6px;
    padding: 2.2rem 2rem;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.35);
}

/* Bild und Text zusammen: der Text schliesst unten an das Bild an. */
.id4web-modal--bild .id4web-modal__text {
    border-radius: 0 0 6px 6px;
    box-shadow: 0 12px 30px -12px rgba(0, 0, 0, 0.45);
}

.id4web-modal__header {
    font-size: 1.6rem;
    font-weight: 600;
    line-height: 1.2;
    color: #004077;
    margin: 0 0 0.9rem;
}

.id4web-modal__text > :last-child {
    margin-bottom: 0;
}

.id4web-modal__text a {
    color: #1472c4;
}

.id4web-modal__text a:hover,
.id4web-modal__text a:focus-visible {
    color: #004077;
    text-decoration: underline;
}

/* Nur Text: das Logo schliesst den weissen Kasten unten ab,
   linksbuendig mit dem Text. */
.id4web-modal__logo {
    display: block;
    width: 165px;
    max-width: 60%;
    height: auto;
    margin: 2rem 0 0;
}

.id4web-modal__close {
    position: absolute;
    top: 0.6rem;
    right: 0.6rem;
    z-index: 1;
    padding: 0 0.25em;
    border: 0;
    background: none;
    color: #fff;
    font-size: 2.4rem;
    line-height: 1;
    cursor: pointer;
    text-shadow: 0 0 8px rgba(0, 0, 0, 0.9);
}

.id4web-modal__close:hover,
.id4web-modal__close:focus-visible {
    color: #bbb;
}

.id4web-modal__close:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

@media (max-width: 575.98px) {
    .id4web-modal__content {
        padding: 3rem 0.75rem;
    }

    .id4web-modal__text {
        padding: 1.6rem 1.25rem;
    }
}
