/**
 * Live Search Plugin Styles
 */

/* Контейнер результатов */
.livesearch-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 500px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 4px 4px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    margin-top: -1px;
}

/* Индикатор загрузки */
.livesearch-loading {
    padding: 15px;
    text-align: center;
    color: #999;
    font-size: 14px;
}

/* Пустой результат */
.livesearch-empty {
    padding: 15px;
    text-align: center;
    color: #999;
    font-size: 14px;
}

/* Элемент результата */
.livesearch-item {
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
}

.livesearch-item:last-child {
    border-bottom: none;
}

.livesearch-item:hover,
.livesearch-item.active {
    background-color: #f9f9f9;
}

.livesearch-item a {
    display: flex;
    align-items: flex-start;
    padding: 12px 15px;
    text-decoration: none;
    color: inherit;
}

/* Изображение товара */
.livesearch-image {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    margin-right: 12px;
    border-radius: 4px;
    overflow: hidden;
    background: #f5f5f5;
}

.livesearch-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Детали товара */
.livesearch-details {
    flex-grow: 1;
    min-width: 0;
}

/* Название товара */
.livesearch-name {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin-bottom: 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.4;
}

.livesearch-item:hover .livesearch-name,
.livesearch-item.active .livesearch-name {
    color: #0066cc;
}

/* Цена */
.livesearch-price {
    margin-bottom: 6px;
    font-size: 16px;
    font-weight: 600;
}

.livesearch-current-price {
    color: #e74c3c;
}

.livesearch-compare-price {
    text-decoration: line-through;
    color: #999;
    font-size: 14px;
    font-weight: 400;
    margin-right: 8px;
}

/* Наличие */
.livesearch-stock {
    font-size: 12px;
}

.livesearch-in-stock {
    color: #27ae60;
}

.livesearch-out-of-stock {
    color: #999;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .livesearch-results {
        max-height: 400px;
    }
    
    .livesearch-image {
        width: 50px;
        height: 50px;
    }
    
    .livesearch-name {
        font-size: 13px;
    }
    
    .livesearch-price {
        font-size: 14px;
    }
    
    .livesearch-item a {
        padding: 10px;
    }
}

/* Прокрутка для контейнера результатов */
.livesearch-results::-webkit-scrollbar {
    width: 8px;
}

.livesearch-results::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.livesearch-results::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.livesearch-results::-webkit-scrollbar-thumb:hover {
    background: #555;
}
