/**
 * City Autocomplete Styles
 * Simple dropdown suggestions
 */

/* Suggestion dropdown */
.city-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 4px 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    max-height: 250px;
    overflow-y: auto;
    z-index: 9999;
    margin: 0;
    padding: 0;
    list-style: none;
    display: none;
}

/* Individual suggestion item */
.city-suggestion-item {
    padding: 10px 14px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
    color: #333;
    transition: background-color 0.15s ease;
}

.city-suggestion-item:last-child {
    border-bottom: none;
}

.city-suggestion-item:hover,
.city-suggestion-item.active {
    background-color: #f5f5f5;
}

.city-suggestion-item .city-zipcode {
    color: #888;
    font-size: 12px;
}

/* Ensure the parent field wrapper has relative positioning */
#billing_city_field,
#shipping_city_field,
#billing_postcode_field,
#shipping_postcode_field,
.city-autocomplete-field {
    position: relative !important;
}

#billing_city_field .woocommerce-input-wrapper,
#shipping_city_field .woocommerce-input-wrapper,
#billing_postcode_field .woocommerce-input-wrapper,
#shipping_postcode_field .woocommerce-input-wrapper {
    position: relative;
}

/* Ensure suggestions appear above other elements */
#billing_city_suggestions,
#shipping_city_suggestions,
#billing_postcode_suggestions,
#shipping_postcode_suggestions {
    position: absolute;
    width: 100%;
}

/* Scrollbar styling */
.city-suggestions::-webkit-scrollbar {
    width: 6px;
}

.city-suggestions::-webkit-scrollbar-track {
    background: #f5f5f5;
}

.city-suggestions::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.city-suggestions::-webkit-scrollbar-thumb:hover {
    background: #999;
}
