.map {
    padding: 15px;
}

.box {
    position: relative;
    width: 1180px;
    height: 650px;
    margin: 0 auto;
}

.text-wrapper {
    font-weight: 500;
    color: #E3E8EC;
    font-size: 40px;
    margin-bottom: 20px;
    line-height: 90%;
}

.map-container {
    position: relative;
    display:flex;
    justify-content: space-between;
    color: #E3E8EC;
}

#map {
    position: relative;
    width: 600px;
    height: 650px;
    top: 0;
    right: 0;
    border-radius: 20px;
    overflow: hidden;
}
.map_sidebar{
    width:324px;
}
.tooltip-content{
    width: 100%;
}

.search-panel {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 488px;
    align-items: flex-start;
    gap: 20px;
    top: 121px;
    left: 0;
    background-color: transparent;
    overflow: hidden;
    box-shadow: 0px 10px 40px #0000000d;
    z-index: 100;
    border: 2px solid rgba(196, 196, 196, 0.2);
    padding: 20px 20px 20px 20px;
    border-radius: 20px;
}

.search-input {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    width: 100%;
    border-radius: 10px;
    border: 1px solid #bfbfbf;
    position: relative;
}

.search-input input {
    border: none;
    outline: none;
    width: 100%;
    font-size: 18px;
    color: #E3E8EC;
    background: transparent;
}

.search-icon {
    width: 16px;
    height: 16px;
}

.country-title {
    color: #E3E8EC;
    font-size: 20px;
    font-weight: 500;
}

.cities-list {
    flex-grow: 1;
    overflow-y: auto;
    width: 100%;
    padding-right: 10px;
}

.city-section {
    margin-bottom: 20px;
    position:relative;
}

.section-letter {
    color: #717171;
    font-size: 20px;
    font-weight: 500;
    margin-bottom: 10px;
    position: absolute;
    top: 3px;
}

.city-name {
    font-size: 16px;
    padding: 5px 0 5px 30px;
    cursor: pointer;
    transition: color 0.2s;
}

.city-name:hover, .city-name.active {
    color: #FBDB44;
}

.scrollbar {
    position: absolute;
    width: 4px;
    height: 427px;
    top: 82px;
    right: 20px;
    background-color: #f6f6f6;
    border-radius: 10px;
}

.scroll-thumb {
    height: 47px;
    background-color: #FBDB44;
    border-radius: 10px;
}

.map-tooltip {
    right: 122px;
    bottom: 107px;
    display: none;
    flex-direction: column;
    width: 439px;
    align-items: flex-start;
    gap: 20px;
    padding: 20px;
    background-color: #ffffff;
    border-radius: 15px;
    position: absolute;
    z-index: 1000;
    box-shadow: 0px 4px 20px rgba(0, 0, 0, 0.15);
}

.shop-title {
    color: #000000;
    font-size: 20px;
    font-weight: 500;
    margin-bottom: 10px;
}

.shop-address {
    color: #717171;
    font-size: 14px;
}

.shop-actions {
    display: flex;
    justify-content: space-between;
    width: 100%;
    align-items: center;
    margin-top:20px;
}
.frame-5{
    display:flex;
}
.catalog-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px 20px;
    background-color: #FBDB44;
    border-radius: 10px;
    color: black;
    font-size: 16px;
    text-decoration: none;
    cursor: pointer;
}

.phone-number {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #000000;
    font-size: 18px;
}

.phone-icon {
    width: 22px;
    height: 22px;
}

.placemark {
    width: 20px;
    height: 20px;
    background-color: #ffffff;
    border-radius: 10px;
    border: 1px solid #FBDB44;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.placemark-inner {
    width: 14px;
    height: 14px;
    background-color: #FBDB44;
    border-radius: 7px;
}

.placemark.active {
    border-color: #FBDB44;
    box-shadow: 0px 4px 20px rgba(0, 0, 0, 0.15);
}

.placemark.active .placemark-inner {
    background-color: #FBDB44;
}

.pinned-cities {
    margin-bottom: 20px;
}

.pinned-title {
    color: #E3E8EC;
    font-size: 20px;
    font-weight: 500;
    margin-bottom: 10px;
}

.pinned-cities-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.pinned-city {
    color: #717171;
    font-size: 16px;
    padding: 5px 10px;
    cursor: pointer;
    transition: color 0.2s;
    background-color: #f6f6f6;
    border-radius: 5px;
}

.pinned-city:hover, .pinned-city.active {
    color: #FBDB44;
    background-color: #fdeee7;
}
.loading .map-preloader {
    display:flex;
}
.map-preloader {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255,255,255,0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #FBDB44;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.map-container.loading {
    position: relative;
    min-height: 650px;
}

/* Autocomplete styles */
.autocomplete {
    position: absolute;
    top: 80%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #bfbfbf;
    border-top: none;
    border-radius: 10px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    margin: 20px;
    display: none;
}

.autocomplete-item {
    padding: 10px 20px;
    cursor: pointer;
    color: #717171;
    font-size: 16px;
}

.autocomplete-item:hover {
    background-color: #f6f6f6;
    color: #FBDB44;
}
.map-tooltip-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(5px);
    z-index: 11111;
}

.map-tooltip-close {
    display: none;
    position: absolute;
    top: -40px;
    right: 15px;
    width: 30px;
    height: 30px;
    padding:0;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    z-index: 1001;
    background: unset;
}

.map-tooltip-close::before,
.map-tooltip-close::after {
    content: '';
    position: absolute;
    top: 14px;
    left: 7px;
    width: 100%;
    height: 2px;
    background: #fff;
}

.map-tooltip-close::before {
    transform: rotate(45deg);
}

.map-tooltip-close::after {
    transform: rotate(-45deg);
}
.catalog-btn[href="#"] {
    display: none !important;
}
@media(max-width:960px){
    .map_sidebar {
        z-index: 111;
        position: absolute;
        top: 40px;
        left:90px;
        border-radius: 30px;
        padding: 20px;
        box-shadow: 0px 10px 40px #0000000d;
    }
    #map {
        position: relative;
        width: 100%;
        height: 650px;

    }
    .search-panel{
        padding: 0;
        overflow: hidden;
        box-shadow: unset;
        z-index: 100;
        height:400px;
        border-radius: unset;
    }
    .text-wrapper{
        font-size:25px;
    }
    .shop-actions {
        flex-direction: column-reverse;
        align-items: start;
        gap: 20px;
    }
    .map-tooltip {
        right: 10%;
        bottom: 35%;
        width: 300px;

    }
}
@media(max-width:768px){
    .map-tooltip-overlay {
        display: none;
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .map-tooltip-overlay.active {
        opacity: 1;
        display: block;
    }

    .map-tooltip-close {
        display: block;
    }

    .map-tooltip {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        border-radius: 15px 15px 0 0 !important;
        transform: translateY(100%);
        transition: transform 0.3s ease;
        z-index: 11112;
    }

    .map-tooltip.active {
        transform: translateY(0);
    }


    .map-container {
        flex-direction: column;
        padding: 0;
    }
    .search-panel {
        height: auto;
    }
    .map_sidebar {
        position: unset;
        padding: 0;
        box-shadow: unset;
        width: 100%;
        padding: 20px;
    }
    #map {
        height: 520px;
    }

    .cities-list, .pinned-cities {
        display: none;
    }

    .search-input {
        margin-bottom: 0;
    }

    .country-title {
        display: none;
    }
    .map_sidebar {
        position: relative;
        left: 0;
        top: 0;
    }

}