
/**
 * Live Search Autocomplete Styles for PrestaShop 1.6
 * Place in: themes/twoj-motyw/css/modules/blocksearch/blocksearch-autocomplete.css
 * or add to global.css
 */

/* Live Search Results Container */
.live-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e5e5e5;
    border-top: none;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    z-index: 9999;
    max-height: 500px;
    overflow-y: auto;
    display: none;
    margin-top: -1px;
}

/* Loading State */
.live-search-loading,
.live-search-empty,
.live-search-error {
    padding: 1.5rem;
    text-align: center;
    color: #666;
    font-size: 14px;
}

.live-search-error {
    color: #d32f2f;
}

/* Results List */
.live-search-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Individual Result Item */
.live-search-item {
    border-bottom: 1px solid #f5f5f5;
}

.live-search-item:last-child {
    border-bottom: none;
}

.live-search-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    text-decoration: none;
    color: inherit;
    transition: background 0.2s ease;
}

.live-search-link:hover {
    background: #f8f8f8;
}

/* Product Image */
.live-search-image {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    background: #f5f5f5;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.live-search-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Product Info */
.live-search-info {
    flex: 1;
    min-width: 0;
}

.live-search-name {
    font-size: 15px;
    font-weight: 600;
    color: #2c2c2c;
    margin-bottom: 0.25rem;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.live-search-reference {
    font-size: 12px;
    color: #999;
    margin-bottom: 0.5rem;
}

.live-search-price {
    font-size: 16px;
    font-weight: 700;
    color: #1a1a1a;
}

/* Scrollbar Styling */
.live-search-results::-webkit-scrollbar {
    width: 8px;
}

.live-search-results::-webkit-scrollbar-track {
    background: #f5f5f5;
}

.live-search-results::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

.live-search-results::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* Responsive */
@media (max-width: 768px) {
    .live-search-results {
        max-height: 400px;
    }
    
    .live-search-image {
        width: 60px;
        height: 60px;
    }
    
    .live-search-name {
        font-size: 14px;
    }
    
    .live-search-price {
        font-size: 14px;
    }
}

/* Animation */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.live-search-results {
    animation: slideDown 0.2s ease;
}
