/* AI Search Suggestions Styles */
.ai-suggestions {
    position: absolute;
    top: 100%;
    right: 0;
    right: 0;
    z-index: 1050;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    max-height: 400px;
    overflow-y: hidden;
}

.ai-suggestions .header-search-results {
    border: none !important;
    border-radius: 8px;
    padding: 0;
}

.suggestion-section {
    border-bottom: 1px solid #f0f0f0;
}

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

.suggestion-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px 8px;
    background: #f8f9fa;
    font-size: 12px;
    font-weight: 600;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.suggestion-header i {
    margin-right: 6px;
    color: #007bff;
}

.confidence-badge {
    background: #28a745;
    color: white;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 500;
}

.suggestion-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid #f5f5f5;
}

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

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

.suggestion-item.active {
    background: #e3f2fd;
    border-left: 3px solid #2196f3;
}

.suggestion-icon {
    width: 16px;
    height: 16px;
    margin-right: 12px;
    color: #6c757d;
    flex-shrink: 0;
}
.suggestion-icon:before {
    content: '';
    display: inline-block;
    font-family: unset;
    width: 16px;
    height: 16px;
}

.icon-folder::before {
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-grid" viewBox="0 0 16 16"> <path d="M1 2.5A1.5 1.5 0 0 1 2.5 1h3A1.5 1.5 0 0 1 7 2.5v3A1.5 1.5 0 0 1 5.5 7h-3A1.5 1.5 0 0 1 1 5.5zM2.5 2a.5.5 0 0 0-.5.5v3a.5.5 0 0 0 .5.5h3a.5.5 0 0 0 .5-.5v-3a.5.5 0 0 0-.5-.5zm6.5.5A1.5 1.5 0 0 1 10.5 1h3A1.5 1.5 0 0 1 15 2.5v3A1.5 1.5 0 0 1 13.5 7h-3A1.5 1.5 0 0 1 9 5.5zm1.5-.5a.5.5 0 0 0-.5.5v3a.5.5 0 0 0 .5.5h3a.5.5 0 0 0 .5-.5v-3a.5.5 0 0 0-.5-.5zM1 10.5A1.5 1.5 0 0 1 2.5 9h3A1.5 1.5 0 0 1 7 10.5v3A1.5 1.5 0 0 1 5.5 15h-3A1.5 1.5 0 0 1 1 13.5zm1.5-.5a.5.5 0 0 0-.5.5v3a.5.5 0 0 0 .5.5h3a.5.5 0 0 0 .5-.5v-3a.5.5 0 0 0-.5-.5zm6.5.5A1.5 1.5 0 0 1 10.5 9h3a1.5 1.5 0 0 1 1.5 1.5v3a1.5 1.5 0 0 1-1.5 1.5h-3A1.5 1.5 0 0 1 9 13.5zm1.5-.5a.5.5 0 0 0-.5.5v3a.5.5 0 0 0 .5.5h3a.5.5 0 0 0 .5-.5v-3a.5.5 0 0 0-.5-.5z"/></svg>') no-repeat center center;
}

.icon-box::before {
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-box" viewBox="0 0 16 16"> <path d="M8.186 1.113a.5.5 0 0 0-.372 0L1.846 3.5 8 5.961 14.154 3.5zM15 4.239l-6.5 2.6v7.922l6.5-2.6V4.24zM7.5 14.762V6.838L1 4.239v7.923zM7.443.184a1.5 1.5 0 0 1 1.114 0l7.129 2.852A.5.5 0 0 1 16 3.5v8.662a1 1 0 0 1-.629.928l-7.185 2.874a.5.5 0 0 1-.372 0L.63 13.09a1 1 0 0 1-.63-.928V3.5a.5.5 0 0 1 .314-.464z"/></svg>') no-repeat center center;
}

.icon-award::before {
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-award" viewBox="0 0 16 16"><path d="M9.669.864 8 0 6.331.864l-1.858.282-.842 1.68-1.337 1.32L2.6 6l-.306 1.854 1.337 1.32.842 1.68 1.858.282L8 12l1.669-.864 1.858-.282.842-1.68 1.337-1.32L13.4 6l.306-1.854-1.337-1.32-.842-1.68zm1.196 1.193.684 1.365 1.086 1.072L12.387 6l.248 1.506-1.086 1.072-.684 1.365-1.51.229L8 10.874l-1.355-.702-1.51-.229-.684-1.365-1.086-1.072L3.614 6l-.25-1.506 1.087-1.072.684-1.365 1.51-.229L8 1.126l1.356.702z"/><path d="M4 11.794V16l4-1 4 1v-4.206l-2.018.306L8 13.126 6.018 12.1z"/></svg>') no-repeat center center;
}

.icon-magic-wand::before {
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-magic" viewBox="0 0 16 16"><path d="M9.5 2.672a.5.5 0 1 0 1 0V.843a.5.5 0 0 0-1 0zm4.5.035A.5.5 0 0 0 13.293 2L12 3.293a.5.5 0 1 0 .707.707zM7.293 4A.5.5 0 1 0 8 3.293L6.707 2A.5.5 0 0 0 6 2.707zm-.621 2.5a.5.5 0 1 0 0-1H4.843a.5.5 0 1 0 0 1zm8.485 0a.5.5 0 1 0 0-1h-1.829a.5.5 0 0 0 0 1zM13.293 10A.5.5 0 1 0 14 9.293L12.707 8a.5.5 0 1 0-.707.707zM9.5 11.157a.5.5 0 0 0 1 0V9.328a.5.5 0 0 0-1 0zm1.854-5.097a.5.5 0 0 0 0-.706l-.708-.708a.5.5 0 0 0-.707 0L8.646 5.94a.5.5 0 0 0 0 .707l.708.708a.5.5 0 0 0 .707 0l1.293-1.293Zm-3 3a.5.5 0 0 0 0-.706l-.708-.708a.5.5 0 0 0-.707 0L.646 13.94a.5.5 0 0 0 0 .707l.708.708a.5.5 0 0 0 .707 0z"/></svg>') no-repeat center center;
}

.icon-edit::before {
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-pencil-square" viewBox="0 0 16 16"><path d="M15.502 1.94a.5.5 0 0 1 0 .706L14.459 3.69l-2-2L13.502.646a.5.5 0 0 1 .707 0l1.293 1.293zm-1.75 2.456-2-2L4.939 9.21a.5.5 0 0 0-.121.196l-.805 2.414a.25.25 0 0 0 .316.316l2.414-.805a.5.5 0 0 0 .196-.12l6.813-6.814z"/><path fill-rule="evenodd" d="M1 13.5A1.5 1.5 0 0 0 2.5 15h11a1.5 1.5 0 0 0 1.5-1.5v-6a.5.5 0 0 0-1 0v6a.5.5 0 0 1-.5.5h-11a.5.5 0 0 1-.5-.5v-11a.5.5 0 0 1 .5-.5H9a.5.5 0 0 0 0-1H2.5A1.5 1.5 0 0 0 1 2.5z"/></svg>') no-repeat center center;
}

.suggestion-text {
    flex: 1;
    font-size: 14px;
    color: #212529;
    font-weight: 500;
}

.suggestion-type {
    font-size: 11px;
    color: #6c757d;
    background: #e9ecef;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 8px;
    text-transform: uppercase;
    font-weight: 500;
    letter-spacing: 0.3px;
}

.typo-correction {
    font-size: 11px;
    color: #ffc107;
    background: #fff3cd;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 8px;
    font-style: italic;
}

/* Type-specific styling */
.suggestion-item[data-type="product"] .suggestion-icon {
    color: #28a745;
}

.suggestion-item[data-type="category"] .suggestion-icon {
    color: #007bff;
}

.suggestion-item[data-type="brand"] .suggestion-icon {
    color: #ffc107;
}

.suggestion-item[data-type="trending"] .suggestion-icon {
    color: #dc3545;
}

.suggestion-item[data-type="typo_correction"] .suggestion-icon {
    color: #6f42c1;
}

/* Loading state */
.ai-suggestions-loading {
    padding: 16px;
    text-align: center;
    color: #6c757d;
}

.ai-suggestions-loading i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Empty state */
.ai-suggestions-empty {
    padding: 16px;
    text-align: center;
    color: #6c757d;
    font-style: italic;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .ai-suggestions {
        max-height: 300px;
        border-radius: 0;
        left: -16px;
        right: -16px;
    }

    .suggestion-item {
        padding: 14px 16px;
    }

    .suggestion-text {
        font-size: 15px;
    }

    .suggestion-type {
        display: none;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .ai-suggestions {
        background: #2d3748;
        color: #e2e8f0;
    }

    .suggestion-header {
        background: #4a5568;
        color: #a0aec0;
    }

    .suggestion-item:hover,
    .suggestion-item.active {
        background: #4a5568;
    }

    .suggestion-item.active {
        background: #2b6cb0;
        border-left-color: #63b3ed;
    }

    .suggestion-text {
        color: #e2e8f0;
    }

    .suggestion-type {
        background: #4a5568;
        color: #a0aec0;
    }
}

/* Animation for showing suggestions */
.ai-suggestions {
    animation: slideDown 0.2s ease-out;
}

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

/* Focus states for accessibility */
.suggestion-item:focus {
    outline: 2px solid #007bff;
    outline-offset: -2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .suggestion-item {
        border: 1px solid #000;
    }

    .suggestion-item.active {
        background: #000;
        color: #fff;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .suggestion-item,
    .ai-suggestions {
        transition: none;
        animation: none;
    }
}
