/* WC Italian Billing Fields - Accessibility & Layout */

.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}

.wc-ibf-error-link {
    text-decoration: underline !important;
    font-weight: 600 !important;
    margin-left: 8px;
    color: #b21f1f !important;
    display: inline-block;
}

.woocommerce-invalid [aria-invalid="true"],
.woocommerce-invalid input,
.woocommerce-invalid select {
    border-color: #b21f1f !important;
    background-color: #fff9f9 !important;
}

[hidden] {
    display: none !important;
}

/* Customer type: match standard WooCommerce field labels (not section headings). */
.woocommerce-billing-fields #billing_customer_type_field > label,
#billing_customer_type_field > label,
#billing_customer_type_field legend {
    display: block !important;
    font-size: 1em !important;
    font-weight: 400 !important;
    line-height: 1.4 !important;
    margin: 0 0 0.5em !important;
    padding: 0 !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    color: inherit !important;
}

#billing_customer_type_field {
    margin-bottom: 1em;
}

.wc-ibf-error-message {
    font-weight: 500;
    margin-top: 4px;
    display: block;
    clear: both;
    color: #b21f1f;
    font-size: 0.875em;
    line-height: 1.3;
}

.wc-ibf-customer-type .woocommerce-input-wrapper {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 0;
}

.wc-ibf-customer-type label.radio {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 400;
    font-size: 1em;
    cursor: pointer;
    margin: 0;
    white-space: nowrap;
}

.wc-ibf-customer-type input[type="radio"] {
    margin: 0;
    cursor: pointer;
}

#billing_ibf_enable_invoice_field {
    display: block !important;
    margin-bottom: 20px !important;
}

#billing_ibf_enable_invoice_field select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    background-color: #fff;
    border-radius: 4px;
}
