#map-wrapper {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
}

/* Применяем черно-белый фильтр только к содержимому карты */
#map-wrapper .ymaps-2-1-79-map {
    filter: grayscale(100%) !important;
    -webkit-filter: grayscale(100%) !important;
}

/* Скрываем стандартные элементы Яндекса */
.ymaps-2-1-79-copyrights-pane,
.ymaps-2-1-79-copyright,
.ymaps-2-1-79-controls__toolbar,
.ymaps-2-1-79-controls__toolbar_left,
.ymaps-2-1-79-controls__toolbar_right,
.ymaps-2-1-79-controls__control,
.ymaps-2-1-79-zoom,
.ymaps-2-1-79-fullscreen {
    display: none !important;
}

.custom-search-container {
    position: absolute;
    top: 30px;
    left: 30px;
    z-index: 999;
    width: 90%;
    max-width: 400px;
}

.custom-search {
    display: flex;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    border: 2px solid #dddddd;
    transition: border-color 0.3s ease;
    position: relative;
}

.custom-search:focus-within {
    border-color: #E5097F !important;
    box-shadow: 0 2px 15px rgba(229, 9, 127, 0.2);
}

.custom-search__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 12px 0 14px;
    flex-shrink: 0;
}

.custom-search__icon svg {
    width: 30px;
    height: 30px;
    fill: #E5097F !important;
}

.custom-search__input {
    flex: 1;
    padding: 12px 16px 12px 0;
    border: none;
    outline: none;
    font-size: 15px;
    color: #6d6e71;
    background: transparent;
    min-width: 0;
}

.custom-search__input::placeholder {
    color: #999;
}

.custom-search__button {
    padding: 12px 20px;
    background: #E5097F !important;
    color: #ffffff !important;
    border: none;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    transition: background 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    flex-shrink: 0;
}

.custom-search__button:hover {
    background: #c5076e !important;
}

.custom-search__button svg {
    width: 18px;
    height: 18px;
    fill: #ffffff !important;
}

.search-results {
    position: absolute;
    top: 70px;
    left: 0;
    z-index: 1000;
    width: 100%;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    max-height: 300px;
    overflow-y: auto;
    display: none;
}

.search-results.active {
    display: block;
}

.search-result-item {
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s ease;
    font-size: 14px;
    color: #6d6e71;
}

.search-result-item:hover {
    background: #f5f5f5;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item .result-sub {
    font-size: 12px;
    color: #6d6e71;
    margin-top: 2px;
}

.search-loading {
    padding: 12px 16px;
    text-align: center;
    color: #6d6e71;
    font-size: 14px;
}

/* Кнопка геолокации */
.geolocation-btn {
    position: absolute;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    background: #ffffff;
    border: 2px solid #E5097F !important;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex !important;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    padding: 0;
}

.geolocation-btn:hover {
    background: #f5f5f5;
    border-color: #E5097F !important;
    transform: scale(1.05);
    box-shadow: 0 2px 15px rgba(229, 9, 127, 0.3);
}

.geolocation-btn svg {
    width: 24px;
    height: 24px;
    fill: #E5097F !important;
}

.geolocation-btn:hover svg {
    fill: #E5097F !important;
}

.geolocation-btn.loading {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    100% {
        transform: rotate(360deg);
    }
}

@media (max-width: 768px) {
    .custom-search-container {
        left: 10px;
        max-width: calc(100% - 20px);
    }
    
    .custom-search__input {
        font-size: 14px;
        padding: 10px 12px 10px 0;
    }
    
    .custom-search__button {
        padding: 10px 14px;
        font-size: 14px;
    }
    
    .custom-search__icon {
        padding: 0 8px 0 10px;
    }
    
    .custom-search__icon svg {
        width: 18px;
        height: 18px;
    }
    
    .search-results {
        max-height: 200px;
    }
    
    .geolocation-btn {
        width: 42px;
        height: 42px;
        bottom: 15px;
        right: 15px;
    }
    
    .geolocation-btn svg {
        width: 20px;
        height: 20px;
    }
}