/**
 * CodeOn Core — checkout cascade styling.
 *
 * Hides the Region (state) field row entirely — the value is auto-set
 * by JS from the chosen Municipality, so the field exists for WC's
 * tax/shipping calculation but never shows on the form.
 *
 * Keeps Municipality + Settlement visually consistent with WC's native
 * Country dropdown by enabling Select2 enhancement (handled in JS) and
 * matching its width.
 */

/* Generic hide for any field row the merchant disabled in Settings */
.codeon-hidden-row {
    display: none !important;
}

.woocommerce form .form-row.codeon-geo-field select,
.woocommerce-page form .form-row.codeon-geo-field select {
    width: 100%;
}

/* Match WC's native country/state Select2 sizing. */
.woocommerce form .form-row.codeon-geo-field .select2-container,
.woocommerce-page form .form-row.codeon-geo-field .select2-container {
    width: 100% !important;
}

/* Loading state: the cascade JS adds .codeon-loading to the row while a
   REST call is in flight. */
.codeon-geo-field.codeon-loading::after {
    content: "";
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-left: 8px;
    border: 2px solid #ccc;
    border-top-color: #1a2747;
    border-radius: 50%;
    animation: codeon-spin 0.7s linear infinite;
    vertical-align: middle;
}

@keyframes codeon-spin {
    to { transform: rotate(360deg); }
}

/* My Account edit-address page — narrower form, ensure muns dropdown
   stretches like sibling fields. */
.woocommerce-MyAccount-content .codeon-geo-field {
    margin-bottom: 1em;
}
