
/* Блокировка прокрутки при открытом попапе */
body.popup-open {
    overflow: hidden !important;
    width: 100%;
    height: 100%;
}

/* Убираем margin-right который добавляется Magnific Popup */
body.popup-open {
    margin-right: 0 !important;
}

/* Стили для попапа поиска городов */
.popup-city-searcher {
    max-height: 80vh;
    overflow-y: auto;
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.popup-city-searcher .popup-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
    text-align: center;
}

.popup-city-searcher .popup-input-container {
    position: relative;
    margin-bottom: 15px;
}

.popup-city-searcher input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.popup-city-searcher input:focus {
    outline: none;
    border-color: #b71c3a;
}

.popup-city-searcher .real-after {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.popup-city-searcher .popup-input-container.show-after .real-after {
    opacity: 1;
}

.city-result-container {
    overflow-y: auto;
    border-radius: 6px;
}

.city-result-item {
    padding: 12px 15px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.city-result-item:hover {
    background-color: #f8f9fa;
}

.city-result-item:last-child {
    border-bottom: none;
}

/* Улучшенные стили для мобильных устройств */
@media (max-width: 768px) {
    body.popup-open {
        width: 100%;
        height: 100%;
    }
    
    .popup-city-searcher {
        max-height: 90vh;
        margin: 5vh auto;
        width: 95%;
        max-width: 400px;
    }
    
    .popup-city-searcher .popup-title {
        font-size: 16px;
        margin-bottom: 15px;
    }
    
    .popup-city-searcher input {
        font-size: 14px;
        padding: 10px 12px;
    }
    
    .city-result-item {
        padding: 10px 12px;
        font-size: 14px;
    }
}

/* Анимации для плавного открытия/закрытия */
.mfp-fade.mfp-bg {
    opacity: 0;
    transition: opacity 0.3s ease-out;
}

.mfp-fade.mfp-bg.mfp-ready {
    opacity: 0.8;
}

.mfp-fade.mfp-bg.mfp-removing {
    opacity: 0;
}

.mfp-fade.mfp-wrap .mfp-content {
    opacity: 0;
    transition: opacity 0.3s ease-out;
}

.mfp-fade.mfp-wrap.mfp-ready .mfp-content {
    opacity: 1;
}

.mfp-fade.mfp-wrap.mfp-removing .mfp-content {
    opacity: 0;
}

/* Стили для кнопки закрытия */
.mfp-close {
    color: #333;
    font-size: 24px;
    font-weight: bold;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.mfp-close:hover {
    opacity: 1;
}

/* Улучшенные стили для фона попапа */
.mfp-bg {
    background: rgba(0, 0, 0, 0.8);
}

/* Стили для контейнера попапа */
.mfp-container {
    padding: 20px;
}

/* Стили для мобильных устройств */
@media (max-width: 480px) {
    .mfp-container {
        padding: 10px;
    }
    
    .popup-city-searcher {
        width: 100%;
        margin: 2vh auto;
        max-height: 95vh;
    }
} 