.product-autosuggest-container {
    position: relative;
    width: 500px;
    max-width: 100%;
    margin-bottom: 15px;
}

.product-autosuggest-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

.product-autosuggest-input:focus {
    border-color: #66afe9;
    outline: none;
    box-shadow: 0 0 5px rgba(102, 175, 233, 0.5);
}

.product-autosuggest-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ccc;
    border-top: none;
    border-radius: 0 0 4px 4px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.product-autosuggest-item {
    padding: 8px 12px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s;
    font-size: 14px;
}

/* Override the answerbase-widget reset for product autosuggest items */
.answerbase-widget .product-autosuggest-item,
.answerbase-widget .product-autosuggest-results .product-autosuggest-item {
    padding: 8px 12px !important;
    margin: 0 !important;
}

/* Override the answerbase-widget reset for loading and no-results */
.answerbase-widget .product-autosuggest-results .loading,
.answerbase-widget .product-autosuggest-results .no-results {
    padding: 8px 12px !important;
    margin: 0 !important;
}

/* Override the answerbase-widget reset for selected product */
.answerbase-widget .selected-product,
.answerbase-widget .product-autosuggest-container .selected-product {
    display: none;
    padding: 8px 12px !important;
    background: #f8f9fa !important;
    border: 1px solid #dee2e6 !important;
    border-radius: 4px !important;
    position: relative !important;
    margin: 0 0 15px 0 !important;
    min-height: 38px !important;
    box-sizing: border-box !important;
}

/* Override the answerbase-widget reset for selected product label */
.answerbase-widget .selected-product-label,
.answerbase-widget .product-autosuggest-container .selected-product-label {
    padding: 0 30px 0 0 !important;
    margin: 0 !important;
    font-weight: bold !important;
    line-height: 22px !important;
    font-size: 14px !important;
}

/* Ensure remove button styling is properly applied */
.answerbase-widget .product-autosuggest-container .remove-product,
.answerbase-widget .selected-product .remove-product {
    position: absolute !important;
    right: 8px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    background: #dc3545 !important;
    color: white !important;
    border: none !important;
    border-radius: 50% !important;
    width: 22px !important;
    height: 22px !important;
    cursor: pointer !important;
    font-size: 12px !important;
    line-height: 1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-weight: bold !important;
    opacity: 0.9 !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Remove button hover state */
.answerbase-widget .product-autosuggest-container .remove-product:hover,
.answerbase-widget .selected-product .remove-product:hover {
    background: #c82333 !important;
    opacity: 1 !important;
}

.product-autosuggest-item:hover {
    background-color: #f5f5f5;
}

.product-autosuggest-item:last-child {
    border-bottom: none;
}

.product-autosuggest-item.disabled {
    color: #999;
    cursor: default;
    font-style: italic;
}

.product-autosuggest-item.disabled:hover {
    background-color: white;
}

.product-autosuggest-item.active {
    background-color: #e6f3ff !important;
}

.selected-product {
    display: none;
    padding: 8px 12px;
    background: #f0f8ff;
    border: 1px solid #007cba;
    border-radius: 4px;
    position: relative;
    margin-bottom: 15px;
    min-height: 38px; /* Match the input height for consistent spacing */
    box-sizing: border-box;
}

.selected-product-label {
    padding-right: 30px;
    font-weight: bold;
    line-height: 22px; /* Center the text vertically */
    font-size: 14px;
}

.product-autosuggest-container .remove-product,
.answerbase-widget .product-autosuggest-container .remove-product {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: #dc3545 !important; /* Override transparent background */
    color: white !important;
    border: none;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    cursor: pointer;
    font-size: 12px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    opacity: 0.9; /* Make it more visible by default */
}

.product-autosuggest-container .remove-product:hover,
.answerbase-widget .product-autosuggest-container .remove-product:hover {
    background: #c82333 !important;
    opacity: 1;
}

.loading {
    padding: 8px 12px;
    text-align: center;
    color: #666;
    font-style: italic;
    font-size: 14px;
}

.no-results {
    padding: 8px 12px;
    text-align: center;
    color: #999;
    font-style: italic;
    font-size: 14px;
} 