.site-map-host {
    display: block;
    width: 100%;
}

.site-map-host marker {
    display: none;
}

.site-map {
    position: relative;
    width: 100%;
    height: var(--site-map-height, 520px);
    min-height: 320px;
    overflow: hidden;
    background: #e9e9e5;
}

.site-map__canvas {
    width: 100%;
    height: 100%;
}

.site-map__switcher {
    position: absolute;
    z-index: 2;
    top: 12px;
    left: 50%;
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    justify-content: center;
    box-sizing: border-box;
    width: max-content;
    max-width: calc(100% - 24px);
    padding: 4px;
    overflow: visible;
    background: #f6f6f1;
    border: 1px solid rgba(0, 0, 0, 0.14);
    border-radius: 7px;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.14);
    transform: translateX(-50%);
    white-space: normal;
}

.site-map__zoom {
    display: flex;
    flex: none;
    padding-right: 4px;
    margin-right: 4px;
    border-right: 1px solid rgba(0, 0, 0, 0.14);
}

.site-map__styles,
.site-map__addresses,
.site-map__yandex {
    display: flex;
}

.site-map__styles,
.site-map__addresses {
    flex: 0 1 auto;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 100%;
}

.site-map__yandex {
    flex: none;
}

.site-map__addresses,
.site-map__yandex {
    padding-left: 4px;
    margin-left: 4px;
    border-left: 1px solid rgba(0, 0, 0, 0.14);
}

.site-map__yandex[hidden] {
    display: none;
}

.site-map__zoom-button,
.site-map__switcher-button {
    padding: 8px 13px;
    color: #262626;
    font: inherit;
    font-size: 14px;
    line-height: 1;
    background: transparent;
    border: 0;
    border-radius: 4px;
    cursor: pointer;
}

.site-map__zoom-button {
    width: 34px;
    padding-right: 0;
    padding-left: 0;
    font-size: 19px;
    font-weight: 500;
}

.site-map__address-button {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.site-map__yandex-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.site-map__address-color {
    flex: none;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2);
}

.site-map__zoom-button:hover,
.site-map__switcher-button:hover {
    background: rgba(0, 0, 0, 0.06);
}

.site-map__zoom-button:focus-visible,
.site-map__switcher-button:focus-visible {
    outline: 2px solid #1769aa;
    outline-offset: 1px;
}

.site-map__switcher-button.is-active {
    color: #111;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.16);
}

.site-map__bottom-controls {
    position: absolute;
    z-index: 2;
    bottom: 28px;
    left: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    box-sizing: border-box;
    width: max-content;
    max-width: calc(100% - 24px);
    transform: translateX(-50%);
}

.site-map__public-transport {
    box-sizing: border-box;
    max-width: min(1000px, 100%);
    padding: 9px 12px 10px;
    color: #262626;
    background: #fff;
    border-radius: 7px;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.14);
}

.site-map__public-transport[hidden] {
    display: none;
}

.site-map__public-transport-body {
    max-width: 100%;
    overflow-x: auto;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.55;
    text-align: center;
}

.site-map__public-transport-route {
    display: inline-block;
    color: #838383;
    white-space: nowrap;
}

.site-map__public-transport-route strong {
    color: #000;
    font-weight: 400;
}

.site-map__route-links {
    display: flex;
    flex: none;
    flex-wrap: wrap;
    justify-content: center;
    box-sizing: border-box;
    width: max-content;
    max-width: 100%;
    padding: 4px;
    overflow: visible;
    background: #f6f6f1;
    border: 1px solid rgba(0, 0, 0, 0.14);
    border-radius: 7px;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.14);
    white-space: normal;
}

.site-map__route-link {
    display: inline-flex;
    align-items: center;
    padding: 8px 13px;
    color: #262626;
    font: inherit;
    font-size: 13px;
    line-height: 1;
    text-decoration: none;
    background: transparent;
    border-radius: 4px;
}

.site-map__route-link:hover {
    background: rgba(0, 0, 0, 0.06);
}

.site-map__route-link:focus-visible {
    outline: 2px solid #1769aa;
    outline-offset: 1px;
}

.site-map__error {
    box-sizing: border-box;
    width: 100%;
    min-height: 120px;
    padding: 24px;
    color: #7a1d1d;
    background: #fff1f1;
    border: 1px solid #e5baba;
}

@media (max-width: 680px) {
    .site-map {
        height: var(--site-map-height-mobile, 440px);
    }

    .site-map__switcher {
        top: 8px;
        max-width: calc(100% - 16px);
    }

    .site-map__switcher-button {
        padding: 8px 9px;
        font-size: 12px;
    }

    .site-map__zoom-button {
        width: 30px;
        font-size: 18px;
    }

    .site-map__bottom-controls {
        bottom: 24px;
        max-width: calc(100% - 16px);
    }

    .site-map__public-transport {
        padding: 8px 10px 9px;
    }

    .site-map__public-transport-body {
        font-size: 12px;
        text-align: left;
    }

    .site-map__route-link {
        padding: 8px 9px;
        font-size: 12px;
    }
}
