/*
 * India Location Checkout UI
 * Uses the checkout theme's detected field background/text colors while
 * keeping all location controls on the requested Josefin Sans, 16px type.
 */
.woocommerce-checkout .ilc-location-field,
.woocommerce-checkout .ilc-location-field label,
.woocommerce-checkout .ilc-location-field input,
.woocommerce-checkout .ilc-location-field select,
.woocommerce-checkout .ilc-location-field .select2-container,
.woocommerce-checkout .ilc-location-field .select2-selection,
.woocommerce-checkout .ilc-location-field .select2-selection__rendered,
.woocommerce-checkout .ilc-location-field .select2-selection__placeholder {
    font-family: "Josefin Sans", sans-serif !important;
    font-size: 16px !important;
}

.woocommerce-checkout .ilc-city-control,
.woocommerce-checkout .ilc-postcode-control,
.woocommerce-checkout .ilc-location-field .select2-container {
    width: 100% !important;
}

.woocommerce-checkout .ilc-location-field input,
.woocommerce-checkout .ilc-location-field select,
.woocommerce-checkout .ilc-location-field .select2-selection--single {
    background-color: var(--ilc-theme-field-background, transparent) !important;
    color: var(--ilc-theme-field-color, inherit) !important;
    border-color: var(--ilc-theme-field-border-color, currentColor) !important;
    border-radius: var(--ilc-theme-field-border-radius, 0) !important;
    min-height: var(--ilc-theme-field-height, 42px) !important;
}

.woocommerce-checkout .ilc-location-field .select2-selection--single {
    display: flex !important;
    align-items: center !important;
}

.woocommerce-checkout .ilc-location-field .select2-selection--single .select2-selection__rendered {
    width: 100%;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    color: var(--ilc-theme-field-color, inherit) !important;
    line-height: normal !important;
}

.woocommerce-checkout .ilc-location-field .select2-selection__placeholder {
    color: var(--ilc-theme-field-color, inherit) !important;
    opacity: 0.65;
}

.woocommerce-checkout .ilc-location-field .select2-selection--single .select2-selection__arrow {
    top: 50% !important;
    transform: translateY(-50%);
}

.woocommerce-checkout .ilc-location-field select:disabled,
.woocommerce-checkout .ilc-location-field .select2-container--disabled .select2-selection--single {
    cursor: not-allowed;
    opacity: 0.65;
}

.woocommerce-checkout .ilc-is-loading {
    opacity: 0.72;
    pointer-events: none;
}

/* SelectWoo appends its dropdown to <body>, so these rules cannot be scoped
 * through the original form-row. The values below are detected from the
 * active checkout theme by checkout.js. */
body.woocommerce-checkout .select2-dropdown,
body.woocommerce-checkout .select2-search--dropdown,
body.woocommerce-checkout .select2-search--dropdown .select2-search__field,
body.woocommerce-checkout .select2-results,
body.woocommerce-checkout .select2-results__option {
    font-family: "Josefin Sans", sans-serif !important;
    font-size: 16px !important;
}

body.woocommerce-checkout .select2-dropdown,
body.woocommerce-checkout .select2-search--dropdown,
body.woocommerce-checkout .select2-search--dropdown .select2-search__field,
body.woocommerce-checkout .select2-results,
body.woocommerce-checkout .select2-results__option[aria-selected]:not(.select2-results__option--highlighted) {
    background-color: var(--ilc-theme-field-background, transparent) !important;
    color: var(--ilc-theme-field-color, inherit) !important;
}

body.woocommerce-checkout .select2-dropdown,
body.woocommerce-checkout .select2-search--dropdown .select2-search__field {
    border-color: var(--ilc-theme-field-border-color, currentColor) !important;
}

body.woocommerce-checkout .select2-search--dropdown .select2-search__field {
    border-radius: var(--ilc-theme-field-border-radius, 0) !important;
}
