/* CTT Address Lookup Styles */


.ctt-dynamic-container {
    width: 100% !important;
    display: block !important;
    margin-top: 0 !important;
    margin-bottom: 15px !important;
    padding: 0 !important;
    
}

.ctt-loading-indicator {
    margin: 0;
    padding: 12px 15px;
    background-color: #f0f8ff;
    border: 1px solid #b3d9ff;
    border-radius: 4px;
    color: #0066cc;
    font-size: 14px;
    font-weight: 500;
}

.ctt-loading-indicator .spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 3px solid #b3d9ff;
    border-top-color: #0066cc;
    border-radius: 50%;
    animation: ctt-spin 0.8s linear infinite;
    margin-right: 10px;
    vertical-align: middle;
}

.ctt-error-indicator {
    margin: 0;
    padding: 12px 15px;
    background-color: #ffe8e8;
    border: 1px solid #ffb3b3;
    border-radius: 4px;
    color: #cc0000;
    font-size: 14px;
    font-weight: 500;
}

/* CTT Address Lookup Styles */

/* CTT dropdown field - styled to match WooCommerce billing/shipping input fields exactly */
/* Height: 60px, Border: #ADB5BD, Border-radius: 4px, Font: system default stack, Color: black */
.woocommerce-address-select,
select#billing_ctt_address,
select#shipping_ctt_address {
    /* Border - exact match with inputs rgb(173, 181, 189) */
    border: 1px solid rgb(173, 181, 189) !important;
    border-width: 1px !important;
    border-color: rgb(173, 181, 189) !important;
    border-style: solid !important;
    
    /* Outline and corners */
    outline: 0px none rgb(0, 0, 0) !important;
    border-radius: 4px !important;
    
    /* Spacing and box model */
    padding: 0px 22px !important;
    margin: 0px !important;
    box-sizing: border-box !important;
    
    /* Text styles - match input fields */
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji" !important;
    font-size: 16px !important;
    font-weight: 400 !important;
    color: rgb(0, 0, 0) !important;
    text-align: start !important;
    line-height: normal !important;
    font-style: normal !important;
    
    /* Dimensions and background */
    width: 100% !important;
    height: 60px !important;
    background-color: #fff !important;
}

/* Focus state - darker border when user clicks on the field */
.woocommerce-address-select:focus,
select#billing_ctt_address:focus,
select#shipping_ctt_address:focus {
    border-color: #999 !important;
    outline: none !important;
    box-shadow: none !important;
}

/* Loading state - blue background when searching for addresses */
select#billing_ctt_address.loading,
select#shipping_ctt_address.loading {
    background-color: #e8f4f8 !important;
    border-color: #b3d9ff !important;
}

select#billing_ctt_address.loading option,
select#shipping_ctt_address.loading option {
    color: #0066cc !important;
}

/* Error state - red background when address lookup fails */
select#billing_ctt_address.error,
select#shipping_ctt_address.error {
    background-color: #ffe8e8 !important;
    border-color: #ffb3b3 !important;
}

select#billing_ctt_address.error option,
select#shipping_ctt_address.error option {
    color: #cc0000 !important;
}

/* Dropdown options - styled to match input text */
.woocommerce-address-select option,
select#billing_ctt_address option,
select#shipping_ctt_address option {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji" !important;
    font-size: 16px !important;
    font-weight: 400 !important;
    font-style: normal !important;
    line-height: normal !important;
    color: rgb(0, 0, 0) !important;
    padding: 8px !important;
    background-color: #fff !important;
}

/* Custom scrollbar for dropdown list (Webkit browsers) */
select#billing_ctt_address::-webkit-scrollbar,
select#shipping_ctt_address::-webkit-scrollbar {
    width: 8px;
}

select#billing_ctt_address::-webkit-scrollbar-track,
select#shipping_ctt_address::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

select#billing_ctt_address::-webkit-scrollbar-thumb,
select#shipping_ctt_address::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

/* Hover state for dropdown options */
select#billing_ctt_address option:hover,
select#shipping_ctt_address option:hover {
    background-color: #f5f5f5 !important;
}

@keyframes ctt-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
