.wc-ajax-search-wrapper {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.search-container {
    position: relative;
}

.wc-ajax-search-input {
    width: 100%;
    padding: 12px 40px 12px 16px;
    border-radius: 100px;
    font-size: 17px;
    line-height: 1.4;
    outline: none;
    transition: all 0.3s ease;
    border: 2px solid #212121;
    height: 50px;
}

.wc-ajax-search-input:focus {
    background-color: rgba(142, 142, 147, 0.18);
}

.search-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><path fill="%238E8E93" d="M19.707 18.293l-5.395-5.396A7.952 7.952 0 0016 8c0-4.411-3.589-8-8-8S0 3.589 0 8s3.589 8 8 8a7.952 7.952 0 005.897-2.688l5.396 5.395a.997.997 0 001.414 0 .999.999 0 000-1.414zM8 14c-3.309 0-6-2.691-6-6s2.691-6 6-6 6 2.691 6 6-2.691 6-6 6z"/></svg>');
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.5;
}

.wc-ajax-search-results {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 8px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    max-height: 400px;
    overflow-y: auto;
}

.search-result-item {
    display: flex;
    padding: 12px 16px;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: background-color 0.2s ease;
}

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

.search-result-item:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

.search-result-image {
    width: 60px;
    height: 60px;
    margin-right: 16px;
    flex-shrink: 0;
}

.search-result-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
}

.search-result-content {
    flex: 1;
}

.search-result-content h4 {
    margin: 0 0 4px;
    font-size: 16px;
    color: #1d1d1f;
}

.search-result-sku {
    font-size: 14px;
    color: #86868b;
    margin-bottom: 4px;
}

.search-result-price {
    font-size: 15px;
    color: #1d1d1f;
    font-weight: 600;
    margin-bottom: 6px;
}

.search-result-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.search-result-tags {
    margin-top: 8px;
}

.search-tag {
    display: inline-flex;
    align-items: center;
    background-color: #f0f0f0;
    padding: 4px 8px;
    border-radius: 4px;
    margin-right: 8px;
    margin-bottom: 4px;
    font-size: 12px;
    color: #333;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.search-tag::before {
    content: "✓";
    margin-right: 4px;
    color: #0073aa;
}

.loading, .no-results, .error {
    padding: 20px;
    text-align: center;
    color: #86868b;
}

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

.wc-ajax-search-results::-webkit-scrollbar-track {
    background: transparent;
}

.wc-ajax-search-results::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

.wc-ajax-search-results::-webkit-scrollbar-thumb:hover {
    background-color: rgba(0, 0, 0, 0.3);
}

.search-result-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 500;
    background: #f0f7ff;
    color: #0066cc;
    border: 1px solid #cce3ff;
    transition: all 0.2s ease;
    position: relative;
    padding-left: 28px;
}

.tag::before {
    content: "✓";
    position: absolute;
    left: 12px;
    color: #0066cc;
    font-weight: bold;
    animation: popIn 0.3s ease-out;
}

/* Animation for the checkmark */
@keyframes popIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    70% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Hover effect */
.tag:hover {
    background: #e0f0ff;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 102, 204, 0.1);
}

/* Add a subtle pulse animation when tags first appear */
.search-result-tags {
    animation: tagsFadeIn 0.3s ease-out;
}

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

.matching-tags-wrapper {
    margin: 5px 0 15px 0;
}

.matching-tags-wrapper .highlight-tag {
    display: inline-flex;
    align-items: center;
    background: #f0f7ff;
    color: #0066cc;
    border: 1px solid #cce3ff;
    padding: 4px 12px 4px 28px;
    border-radius: 16px;
    position: relative;
    margin-right: 4px;
    text-decoration: none;
    font-size: 0.85em;
    animation: tagHighlight 0.5s ease-out;
}

.matching-tags-wrapper .highlight-tag::before {
    content: "✓";
    position: absolute;
    left: 12px;
    color: #0066cc;
    font-weight: bold;
}

@keyframes tagHighlight {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}