/*
 * Checkout Address Locator Customisations v1.2.0
 * Hide the standard WooCommerce address fields until a valid address has been
 * selected from the Address locator field.
 */

.woocommerce-checkout #billing_address_map_field,
.woocommerce-checkout #shipping_address_map_field,
.woocommerce-account #billing_address_map_field,
.woocommerce-account #shipping_address_map_field {
	margin-bottom: 18px;
}

.woocommerce-checkout #billing_address_map_field label,
.woocommerce-checkout #shipping_address_map_field label,
.woocommerce-account #billing_address_map_field label,
.woocommerce-account #shipping_address_map_field label {
	font-weight: 700;
}

/* Hide the billing address/contact fields by default on checkout until JS confirms the locator has a selected address. */
body.woocommerce-checkout:not(.aafw-billing-address-ready) #billing_company_field,
body.woocommerce-checkout:not(.aafw-billing-address-ready) #billing_country_field,
body.woocommerce-checkout:not(.aafw-billing-address-ready) #billing_address_1_field,
body.woocommerce-checkout:not(.aafw-billing-address-ready) #billing_address_2_field,
body.woocommerce-checkout:not(.aafw-billing-address-ready) #billing_city_field,
body.woocommerce-checkout:not(.aafw-billing-address-ready) #billing_state_field,
body.woocommerce-checkout:not(.aafw-billing-address-ready) #billing_postcode_field,
body.woocommerce-checkout:not(.aafw-billing-address-ready) #billing_phone_field {
	display: none !important;
}

/* Do the same for the shipping address fields when the customer is using a different shipping address. */
body.woocommerce-checkout:not(.aafw-shipping-address-ready) #shipping_company_field,
body.woocommerce-checkout:not(.aafw-shipping-address-ready) #shipping_country_field,
body.woocommerce-checkout:not(.aafw-shipping-address-ready) #shipping_address_1_field,
body.woocommerce-checkout:not(.aafw-shipping-address-ready) #shipping_address_2_field,
body.woocommerce-checkout:not(.aafw-shipping-address-ready) #shipping_city_field,
body.woocommerce-checkout:not(.aafw-shipping-address-ready) #shipping_state_field,
body.woocommerce-checkout:not(.aafw-shipping-address-ready) #shipping_postcode_field {
	display: none !important;
}

body.woocommerce-checkout:not(.aafw-billing-address-ready) #billing_address_map_field::after,
body.woocommerce-checkout:not(.aafw-shipping-address-ready) #shipping_address_map_field::after {
	content: 'Select your address to reveal the address fields.';
	display: block;
	margin-top: 8px;
	font-size: 13px;
	line-height: 1.4;
	opacity: 0.72;
}

body.woocommerce-checkout.aafw-billing-address-ready #billing_company_field,
body.woocommerce-checkout.aafw-billing-address-ready #billing_country_field,
body.woocommerce-checkout.aafw-billing-address-ready #billing_address_1_field,
body.woocommerce-checkout.aafw-billing-address-ready #billing_address_2_field,
body.woocommerce-checkout.aafw-billing-address-ready #billing_city_field,
body.woocommerce-checkout.aafw-billing-address-ready #billing_state_field,
body.woocommerce-checkout.aafw-billing-address-ready #billing_postcode_field,
body.woocommerce-checkout.aafw-billing-address-ready #billing_phone_field,
body.woocommerce-checkout.aafw-shipping-address-ready #shipping_company_field,
body.woocommerce-checkout.aafw-shipping-address-ready #shipping_country_field,
body.woocommerce-checkout.aafw-shipping-address-ready #shipping_address_1_field,
body.woocommerce-checkout.aafw-shipping-address-ready #shipping_address_2_field,
body.woocommerce-checkout.aafw-shipping-address-ready #shipping_city_field,
body.woocommerce-checkout.aafw-shipping-address-ready #shipping_state_field,
body.woocommerce-checkout.aafw-shipping-address-ready #shipping_postcode_field {
	display: block !important;
}
