/* Анимации для результатов поиска */
.search-popup__suggestions-list,
.search-popup__products {
    transition: opacity 0.3s ease-in-out;
}

/* Изначально элементы видимы */
.search-popup__suggestions-list li {
    opacity: 1;
}

/* Анимация применяется только к новым элементам */
.search-popup__suggestions-list li.new-item,
.search-popup__products .card-item {
    animation: fadeInUp 0.4s ease-out forwards;
    opacity: 0;
}

.search-popup__suggestions-list li:nth-child(1) { animation-delay: 0.05s; }
.search-popup__suggestions-list li:nth-child(2) { animation-delay: 0.1s; }
.search-popup__suggestions-list li:nth-child(3) { animation-delay: 0.15s; }
.search-popup__suggestions-list li:nth-child(4) { animation-delay: 0.2s; }
.search-popup__suggestions-list li:nth-child(5) { animation-delay: 0.25s; }
.search-popup__suggestions-list li:nth-child(6) { animation-delay: 0.3s; }
.search-popup__suggestions-list li:nth-child(7) { animation-delay: 0.35s; }
.search-popup__suggestions-list li:nth-child(8) { animation-delay: 0.4s; }

.search-popup__products .card-item:nth-child(1) { animation-delay: 0.05s; }
.search-popup__products .card-item:nth-child(2) { animation-delay: 0.1s; }
.search-popup__products .card-item:nth-child(3) { animation-delay: 0.15s; }
.search-popup__products .card-item:nth-child(4) { animation-delay: 0.2s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.search-popup__suggestions-list.fade-out,
.search-popup__products.fade-out {
    opacity: 0;
    transition: opacity 0.2s ease-out;
}

.search-popup__suggestions-list.fade-in,
.search-popup__products.fade-in {
    opacity: 1;
    transition: opacity 0.3s ease-in;
}

/* Индикатор загрузки */
.search-popup__loading {
    display: none;
    text-align: center;
    padding: 20px;
    color: #666;
}

.search-popup__loading.active {
    display: block;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.6;
    }
    50% {
        opacity: 1;
    }
}

/* Сообщение "Ничего не найдено" */
.search-no-results {
    opacity: 1 !important;
    animation: none !important;
}

.search-no-results .search-popup__suggestions-link {
    color: #999;
    cursor: default;
    pointer-events: none;
}

.search-no-results-products {
    color: var(--gray-1);
}

/* Показываем кнопку "Смотреть все товары" на мобильной версии */
.search-popup .search-popup__suggestions-link.search-popup__suggestions-link--more {
    display: block !important;
}
