/* MUST have min-height or aspect-ratio, must not be hidden; set z-index to enforce a new stacking context */
.ce-address-map {
    position: relative;
    z-index: 0;
    /* aspect-ratio: 16/9; */
    background-color: rgba(0, 0, 0, 0.1);
    box-sizing: initial;
    height: 500px;
}

.ce-address-list-item {
    margin-bottom: 1.25rem;
}

.ce-address-maplist .ttaddress__markerlink {
    visibility: hidden;
}

.ce-address-map-loaded .ce-address-maplist .ttaddress__markerlink {
    visibility: visible;
}

.ce-address-map .ce-media-overlay {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.25rem;
}

.ce-address-map .ce-media-overlay p {
    text-align: center;
}
.ce-address-list.ce-accordion {
    .accordion-body {
        .ce-bodytext {
            display: flex;
            flex-direction: row;
            gap: 2.5rem;
            .adress-icon {
                height: 2.5rem;
                width: auto;
                display: inline;
                margin-right: 0.5rem;
            }
            .adress-year {
                display: inline;
            }
            p {
                margin-bottom: 0;
            }
        }
    }
}

@media (min-width: 47.5em) {
    .ce-address-maplist {
        /* display: flex; */
    }

    .ce-address-maplist .ce-address-map {
        /* flex-grow: 1; */
    }

    .ce-addres-maplist .ce-address-list {
        padding-right: 1.25rem;
    }

    .ce-address-maplist-list-outer {
        position: relative;
        /* overflow: hidden; */
        /* width: 34%; */
        /* flex-grow: 0; */
        /* flex-shrink: 0; */
    }

    /* .ce-address-maplist-list-inner {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        overflow: auto;
    } */
}

.map-marker-number {
    font-weight: bold;
    text-align: center;
    padding-top: 12px;
}
.map-marker-number-black {
    color: black;
}
.map-marker-number-white {
    color: white;
}
.leaflet-popup-content {
    ul {
        list-style-type: none;
        padding-left: 0;
        margin-bottom: 1.5rem;
    }
    img {
        width: 100%;
        height: auto;
        margin-bottom: 1.5rem;
    }
}

.popup-icon-maßnahme {
    width: 38px;
    height: 38px;
}
.ce-address-maplist-list-inner {
    h3 {
        margin-top: 2.5rem;
    }
}

.no-results {
    display: none;
    margin: 1.5rem 0;
}
.map-overlay {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    background-color: rgba(255, 255, 255, 0.8);
    z-index: 10000000;
    .map-overlay-inner {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        font-size: 200%;
        color: white;
        background-color: var(--bs-primary);
        padding: 2.5rem;
    }
}
.btn-filter {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
    color: white;
}
.btn-filter:focus .btn-filter:hover {
    background-color: white;
    border-color: var(--bs-primary);
    color: black;
}

.ce-address-filter-form {
    .ce-address-filter-form-wrapper {
        display: grid;
        grid-template-columns: repeat(1, 1fr);
        grid-template-rows: 3rem 1fr 1fr 3rem;
        @media (min-width: 47.5em) {
            grid-template-columns: 1fr 35%;
            grid-template-rows: 3rem 1fr;
        }
        grid-column-gap: 1rem;
        grid-row-gap: 2.5rem;
        background-color: #f5f5f5;
        padding: 2.5rem;
        width: auto;
        margin-bottom: 2.5rem;
        max-width: 45rem;
        .fieldset-projektfilter {
            grid-area: 1 / 1 / 2 / 2;
            @media (min-width: 47.5em) {
                grid-area: 1 / 1 / 2 / 2;
            }
        }
        .fieldset-reset {
            grid-area: 4 / 1 / 5 / 2;
            @media (min-width: 47.5em) {
                grid-area: 1 / 2 / 2 / 3;
            }
        }
        .fieldset-maßnahmenart {
            grid-area: 2 / 1 / 3 / 2;
            @media (min-width: 47.5em) {
                grid-area: 2 / 1 / 3 / 2;
            }
            display: flex;
            flex-direction: column;
            margin-bottom: 0;
            .item {
                display: flex;
                flex-direction: row;
                gap: 1rem;
                align-items: center;
                margin-bottom: 0.5rem;
            }
        }
        .fieldset-fertigstellungsjahr {
            grid-area: 3 / 1 / 4 / 2;
            @media (min-width: 47.5em) {
                grid-area: 2 / 2 / 3 / 3;
            }
            display: flex;
            flex-direction: column;
            margin-bottom: 0;
            .item {
                display: flex;
                flex-direction: row;
                gap: 1rem;
                align-items: center;
                margin-bottom: 0.5rem;
            }
        }
        .item input[type="checkbox"] {
            /* Add if not using autoprefixer */
            -webkit-appearance: none;
            appearance: none;
            /* For iOS < 15 to remove gradient background */
            background-color: #fff;
            /* Not removed via appearance */
            margin: 0;
            font: inherit;
            color: var(--bs-primary);
            width: 1.15rem;
            height: 1.15rem;
            border: 1px solid black;
            background-color: white;
            transform: translateY(0.15em);
            display: grid;
            place-content: center;
            margin-bottom: 0.25rem;
        }
        .item input[type="checkbox"]:checked {
            border: 1px solid var(--bs-primary);
        }
        .item input[type="checkbox"]::before {
            content: "";
            width: 1.15rem;
            height: 1.15rem;
            text-align: center;
            font-size: 0.85rem;
        }
        .item input[type="checkbox"]:checked::before {
            content: "✓";
            background-color: var(--bs-primary);
            color: white;
        }
    }
    .filter-icon {
        height: 1.5rem;
        width: auto;
        margin-right: 0.5rem;
    }
}
