/**
 * Search Autocomplete Styles
 */

.search-autocomplete-results {
    font-family: 'Cairo', sans-serif;
}

.autocomplete-section {
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.autocomplete-section:last-child {
    border-bottom: none;
}

.autocomplete-header {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #999;
    padding: 8px 16px;
    letter-spacing: 0.5px;
}

.autocomplete-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    color: inherit;
}

.autocomplete-item:hover,
.autocomplete-item.active {
    background: #f8f9ff;
    transform: translateX(-2px);
}

.autocomplete-item:active {
    background: #eef1ff;
}

.autocomplete-item mark {
    background: #ffeb3b;
    color: #333;
    font-weight: 700;
    padding: 2px 4px;
    border-radius: 3px;
}

/* Loading state */
.autocomplete-loading {
    padding: 20px;
    text-align: center;
    color: #999;
}

.autocomplete-loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

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

.search-autocomplete-results::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.search-autocomplete-results::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 10px;
}

.search-autocomplete-results::-webkit-scrollbar-thumb:hover {
    background: #ccc;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .search-autocomplete-results {
        max-height: 400px;
    }
    
    .autocomplete-item {
        padding: 10px 12px;
    }
    
    .autocomplete-item img {
        width: 40px !important;
        height: 40px !important;
    }
}
