/* ---------- mobile ---------- */

.map-module {
    margin-bottom: 96px;
}

.map-module .map-wrapper {
    max-width: 1440px;
    margin: 0 auto;
    padding-left: 24px;
    padding-right: 24px;
}

.map-module .map-wrapper .map-container {
    padding: 48px 24px;
    box-shadow: 0 0 12px 0 rgba(145, 145, 145, 0.16666);
    border-radius: 32px;
}

.map-module .map-wrapper .map-container h3 {
    text-align: center;
    margin-bottom: 72px;
}

.map-module .map-wrapper .map-container > img {
    display: block;
    max-width: 100%;
    height: auto;
    margin-bottom: 24px;
    margin-left: auto;
    margin-right: auto;
}

.map-module .map-wrapper .map-container button {
    color: #000000;
    padding: 24px 0;
    background-color: #ffffff;
    border-top: 1px solid black;
    border-bottom: 1px solid black;
    width: 100%;
    color: #000000;
    text-decoration: none;
    font-weight: normal;
    max-width: 30rem;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 24px;
}

.map-module .map-wrapper .map-container button > img {
    width: 24px;
    height: 24px;
}

.map-module .map-wrapper .map-container .drawer {
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.5s ease-in-out;
    margin: 0 auto;
    max-width: 30rem;
}

.map-module .map-wrapper .map-container .drawer.expanded {
    max-height: 3000px; /* value needs to be larger than the max height of the content */
}

.map-module .map-wrapper .map-container .drawer ol {
    padding: 24px 72px;
    border-bottom: 1px solid black;
}

.map-module .map-wrapper .map-container .drawer ol li {
    margin-bottom: 12px;

    &:last-of-type {
        margin-bottom: 0;
    }
}

.map-module .map-wrapper .map-container .drawer ol,
.map-module .map-wrapper .map-container.drawer li {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-in, visibility 0.3s ease-in;
    transition-delay: 0.5s; /* delays the fade-in until the max-height animation is complete */
}

.map-module .map-wrapper .map-container .drawer.expanded ol,
.map-module .map-wrapper .map-container .drawer.expanded li {
    opacity: 1;
    visibility: visible;
}

.drawer-toggler {
    background-color: transparent !important;
}

.map-container:has(.drawer.expanded) .drawer-toggler {
    border-bottom: 0;
}

/* ---------- tablet ---------- */

@media screen and (min-width: 48rem) {
    .map-module .map-wrapper .map-container .drawer-toggler {
        display: none;
    }

    .map-module .map-wrapper .map-container .drawer {
        max-height: 100rem;
        max-width: 60rem;
        /*margin-right: -16px;*/
    }

    .map-module .map-wrapper .map-container .drawer ol {
        visibility: visible;
        opacity: 1;
        display: flex;
        flex-wrap: wrap;
        column-gap: 36px;
        row-gap: 12px;
        justify-content: space-between;
        border-bottom: 0;
    }

    .map-module .map-wrapper .map-container .drawer ol li {
        width: calc(50% - 36px);
        margin-bottom: 0;
    }
}

/* ---------- laptop ---------- */

@media screen and (min-width: 90rem) {
    .map-module {
        margin-bottom: 192px;
    }

    .map-module .map-wrapper .map-container {
        display: grid;
        grid-template-columns: repeat(12, 1fr);
        gap: 24px;
        padding-left: 24px;
        padding-right: 24px;
    }

    .map-module .map-wrapper .map-container h3 {
        grid-column: 3 / span 8;
    }

    .map-module .map-wrapper .map-container img {
        grid-column: 3 / span 8;
    }

    .map-module .map-wrapper .map-container .drawer {
        grid-column: 2 / span 10;
    }

    .map-module .map-wrapper .map-container .drawer ol li {
        width: calc(33.33333% - 24px);
    }
}
