
:root {
    --map-poselki-height: 80vh;
}

#map-poselki {
    --br-default: 7px;

    width: 100%;
    height: var(--map-poselki-height);
    min-height: 400px;
    text-transform: none;
    overflow: hidden;
    position: relative;

    .mobile-list-toggle {
        position: absolute;
        right: 10px;
        top: 10px;
        z-index: 1;
        background-color: white;
        color: black;
        font-size: 12px;
        font-family: 'NTSomicBold';
        text-transform: uppercase;
        border-radius: var(--br-default);
        border: 1px solid black;
        cursor: pointer;
        overflow: hidden;

        outline: none;
        user-select: none;

        display: flex;

        span {
            display: inline-block;
            padding: 5px 15px;
            background-color: #ffcc00;
            flex-grow: 1;
        }

        span + span {
            border-left: 2px solid black;
            background-color: white;
            opacity: 0.5;
        }

        &.active {
            span {
                background-color: white;
                opacity: 0.5;
            }
            span + span {
                background-color: #ffcc00;
                opacity: 1;
            }
        }

        @media (max-width: 620px) {
            left: 10px;
        }
    }
}

.customControl {
    display: none;
    background-color: #fff;
    padding: 5px;
    border-radius: var(--br-default);
    width: 350px;
    max-width: calc(100vw - 50px);
    overflow-x: hidden;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    font-size: 16px;
    position: relative;

    @media (max-width: 620px) {
        left: 0;
        top: 40px;
        right: 0;
        bottom: 0;
        width: calc(100% - 10px);
    }

    &.map-objects {

        &.hidden {
            display: none;
        }

        display: flex;
        flex-direction: column;
        overflow-y: auto;
        position: absolute;
        top: 10px;
        left: 10px;
        bottom: 10px;
        z-index: 1;

        .content__item {
            display: block;
        }

        .map-object + .map-object {
            border-top: 1px solid #ccc;
            margin-top: 5px;
            padding-top: 5px;
        }

        @media (max-width: 620px) {
            top: 50px;
            right: 10px;
            left: 10px;
            bottom: 10px;
            width: auto;
        }
    }

    .closeButton {
        position: absolute;
        top: 3px;
        right: 6px;
        width: 10px;
        opacity: .7;
        flex-basis: 15px;
        flex-grow: 0;
        flex-shrink: 0;
        padding: 3px;
        height: 15px;
        cursor: pointer;
        background: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNCIgaGVpZ2h0PSIxNCI+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMTQgLjdsLS43LS43TDcgNi4zLjcgMCAwIC43IDYuMyA3IDAgMTMuM2wuNy43TDcgNy43bDYuMyA2LjMuNy0uN0w3LjcgN3oiIGNsaXAtcnVsZT0iZXZlbm9kZCIvPjwvc3ZnPg==")
            50% no-repeat;

        &:hover {
            opacity: 1;
        }
    }

    .content {
        padding: 10px;
        overflow: auto;
        max-height: calc(var(--map-poselki-height) - 60px);
        display: flex;
        flex-direction: column;
        gap: 10px;
        color: black;
        text-align: left;
        line-height: 1.3;
    }

    .content__item {
        display: none;
    }
    .content__item.active {
        display: block;
    }

    .content__image {

        img {
            max-height: 200px;
            width: 100%;
            height: 100%;
            object-fit: cover;
            object-position: center;
            border-radius: var(--br-default);
            overflow: hidden;
        }
    }

    .content__item.content__title {
        text-transform: uppercase;
        font-family: "AkzidenzGrotesk";
        font-size: 15px;
    }

    .content__text {
        ul {
            margin: 0;
            padding: 0;
            display: flex;
            flex-direction: column;
            gap: 5px;

            li {
                padding-left: 25px;
                position: relative;
                list-style: none;

                &::before {
                    content: '';
                    position: absolute;
                    width: 16px;
                    height: 12px;
                    background-image: url(/catalog/view/theme/aps2019/image/icons/icoCheck.svg);
                    background-repeat: no-repeat;
                    background-position: center;
                    background-size: contain;
                    left: 0;
                    top: 4px;
                }
            }
        }
    }

    .btn.btn-yellow {
        padding: 10px;
        font-family: 'NTSomicBold';
        text-align: center;
        font-size: 14px;
        border-radius: var(--br-default);
        margin-top: 15px;

        &:hover {
            color: white !important;
            background-color: black !important;
            border-color: black !important;
        }
    }
}