/* Main widget container */
.flatsome-ingredient-search {
    margin-bottom: 20px;
}

/* Search input field */
.flatsome-ingredient-search .search-field {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 3px;
    font-size: 14px;
    color: #333;
    background: #fff;
    transition: border-color 0.3s;
}

.flatsome-ingredient-search .search-field:focus {
    border-color: #aaa;
    outline: none;
}

/* Search button */
.flatsome-ingredient-search .submit-button {
    background: none;
    border: none;
    color: #666;
    padding: 0 10px;
}

/* Live results dropdown */
.ingredient-live-results {
    position: absolute;
    width: 100%;
    max-height: 400px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-top: none;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    z-index: 999;
    display: none;
}

/* Results list */
.live-search-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Individual result item */
.live-search-item {
    border-bottom: 1px solid #f5f5f5;
}

.live-search-item a {
    display: flex;
    padding: 12px;
    color: #333;
    text-decoration: none;
    align-items: center;
}

.live-search-image {
    width: 50px;
    height: 50px;
    margin-right: 12px;
    background: #f5f5f5;
    border-radius: 2px;
    overflow: hidden;
}

.live-search-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.live-search-details {
    flex: 1;
    min-width: 0;
}

.live-search-title {
    margin: 0 0 4px 0;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.live-search-price {
    color: #77a464;
    font-size: 13px;
    font-weight: bold;
}

/* Messages */
.no-results, .loading {
    padding: 15px;
    text-align: center;
    color: #666;
}

/* Loading animation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading:after {
    content: "";
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(0,0,0,0.1);
    border-top: 2px solid #446084;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-left: 8px;
    vertical-align: middle;
}

/* Hide toggle buttons by default */
.search-mode-toggle {
    display: none;
}