.text-input-echeck {
    font-family: inherit;
    font-weight: 400;
    letter-spacing: normal;
    padding: 1em;
    display: block;
    background-color: var(--wc-form-color-background, #fff);
    border: var(--wc-form-border-width) solid var(--wc-form-border-color);
    border-radius: var(--wc-form-border-radius);
    color: var(--wc-form-color-text, #000);
    box-sizing: border-box;
    height: 48.80px !important;
    margin: 0;
    line-height: normal;
}

.woocommerce form .form-row.woocommerce-validated input.text-input-echeck {
    border-color: #69bf29;
}

.woocommerce form .form-row.woocommerce-invalid input.text-input-echeck {
    border-color: var(--wc-red);
}

/* Prevent red border on account name field during typing */
.woocommerce form #anet-bank-account-name-div.woocommerce-invalid input.text-input-echeck {
    border-color: var(--wc-form-border-color) !important;
}

/* Show red border for account name only when explicitly validated (blur, form submission) */
.woocommerce form #anet-bank-account-name-div.woocommerce-invalid.force-validation input.text-input-echeck {
    border-color: var(--wc-red) !important;
}

/* Ensure empty required fields show red border when validated */
.woocommerce form #anet-bank-account-name-div.woocommerce-invalid-required-field.force-validation input.text-input-echeck {
    border-color: var(--wc-red) !important;
}

.woocommerce-js form .form-row.woocommerce-invalid input.text-input-echeck {
    border-color: #d65d67;
}

.form-row-pair {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.form-row-pair>.form-row {
    flex: 1;
    min-width: 200px;
}

@media only screen and (max-width: 600px) {
    .text-input-echeck {
        width: 100% !important;
    }

    .form-row-pair {
        flex-direction: column;
    }

    .anet-card-number-label {
        display: inline-block;
        margin-top: 0;
    }
}

@media only screen and (min-width: 601px) {
    .text-input-echeck {
        width: 50% !important;
    }
}

/* eCheck Edit Form Styles */
.echeck-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
}

.echeck-row .form-row {
    flex: 1;
    min-width: 200px;
}

@media only screen and (max-width: 600px) {
    .echeck-row {
        flex-direction: column;
    }
}

/* Additional styles for eCheck edit form */
#anet-echeck-edit-form {
    max-width: 600px;
}

#anet-echeck-edit-error {
    color: #b32d2e;
    margin-bottom: 12px;
    display: none;
}

#anet-echeck-edit-form .form-row select {
    height: 40px;
}

#anet-echeck-edit-form .form-row {
    margin-bottom: 1em;
}

#anet-echeck-save-btn {
    margin: 1em;
}

