/* One error language throughout the public WooCommerce forms. No admin/global input rules. */
#content .irantire-errors-summary,
#content .woocommerce-error,
#content .wc-block-components-notice-banner.is-error,
#content .irantire-shipping-feedback[role=alert],
#content .coupon-error-notice {
    box-sizing: border-box;
    width: 100%;
    margin: 0 0 24px !important;
    padding: 18px 22px !important;
    border: 1px solid #f2b8bd !important;
    border-inline-start: 4px solid #d52e3d !important;
    border-radius: 12px !important;
    background: #fff5f5 !important;
    color: #8a2430 !important;
    text-align: right;
    direction: rtl;
    line-height: 1.9;
    float: none !important;
    grid-column: 1 / -1;
    overflow-wrap: anywhere;
    scroll-margin-top: 110px;
}
#content .woocommerce-error::before { display: none !important; }
/* The checkout grid already provides its consistent 30px section gap. */
body.woocommerce-checkout:not(.woocommerce-order-received) #content form.checkout > .irantire-errors-summary,
body.woocommerce-checkout:not(.woocommerce-order-received) #content form.checkout > .woocommerce-NoticeGroup,
body.woocommerce-checkout:not(.woocommerce-order-received) #content form.checkout > .woocommerce-NoticeGroup .woocommerce-error { margin: 0 !important; }
#content .irantire-errors-summary strong { display: block; margin-bottom: 6px; color: #8a2430; }
#content .irantire-errors-summary ul { margin: 0; padding: 0 20px 0 0; }
#content .irantire-errors-summary li,
#content .woocommerce-error li { margin: 5px 0 !important; padding: 0 !important; }
#content .irantire-error-link {
    appearance: none !important;
    display: block !important;
    width: 100% !important;
    min-height: 0 !important;
    height: auto !important;
    padding: 2px 0 !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 2px !important;
    box-shadow: none !important;
    background: transparent !important;
    color: #8a2430 !important;
    font: inherit !important;
    line-height: inherit !important;
    text-align: right !important;
    white-space: normal !important;
    text-decoration: underline;
    text-underline-offset: 4px;
    cursor: pointer;
}
#content .irantire-error-link:focus-visible { outline: 2px solid #8a2430 !important; outline-offset: 4px; }
#content .irantire-field-error { scroll-margin-top: 110px; }
#content .irantire-field-error .irantire-inline-error {
    display: block !important;
    margin: 9px 0 0 !important;
    padding: 0 !important;
    color: #b42334 !important;
    background: transparent !important;
    font-size: 13px !important;
    font-weight: 500;
    line-height: 1.9;
    text-align: right;
    width: 100%;
    grid-column: 1 / -1;
    overflow-wrap: anywhere;
}
body #content form .irantire-field-error :is(input:not([type=hidden]):not([type=radio]):not([type=checkbox]), textarea, select, .select2-selection--single),
body #content form .irantire-field-error .irantire-file-select {
    border-color: #d52e3d !important;
    box-shadow: 0 0 0 1px #d52e3d !important;
}
body #content form .irantire-field-error :is(input[type=checkbox], input[type=radio]) { border-color: #d52e3d !important; }
#content .irantire-field-error > label { color: #b42334; }
#content .irantire-document-field.irantire-field-error {
    border-color: #d52e3d !important;
    background: #fffafa !important;
}
#content .irantire-document-field.irantire-field-error .irantire-file-status:not(.is-error) { color: #667085; }
#content .irantire-field-error :is(input, select, textarea, button, .select2-selection):focus-visible {
    outline: 2px solid #8a2430 !important;
    outline-offset: 3px;
}
#content .irantire-file-status.is-error {
    display: block;
    padding: 8px 12px;
    border-inline-start: 3px solid #d52e3d;
    border-radius: 6px;
    background: #fff5f5;
    color: #b42334;
    line-height: 1.9;
    overflow-wrap: anywhere;
}
/* Keep native Woo focus/show behavior; only form-field help presentation changes. */
body #content .woocommerce form .form-row .description {
    position: static !important;
    inset: auto !important;
    transform: none !important;
    float: none !important;
    clear: both;
    box-sizing: border-box;
    width: 100% !important;
    max-width: 100% !important;
    margin: 8px 0 0;
    padding: 10px 12px;
    border: 1px solid #eadfce !important;
    border-radius: 8px !important;
    box-shadow: none !important;
    background: #fcf8f2 !important;
    color: #66533c !important;
    font: inherit;
    font-size: 13px !important;
    line-height: 1.9;
    text-align: right;
    direction: rtl;
    white-space: normal;
    overflow-wrap: anywhere;
    z-index: auto !important;
}
/* jQuery may restore a span's inline display; keep visible help in its own row. */
body #content .woocommerce form .form-row .description[style*="display: inline"],
body #content .woocommerce form .form-row .description[style*="display:inline"] {
    display: block !important;
}
body #content .woocommerce form .form-row .description a {
    color: #795337 !important;
    text-decoration: underline;
    text-underline-offset: 3px;
}
body #content .woocommerce form .form-row .description::before,
body #content .woocommerce form .form-row .description::after {
    display: none !important;
    content: none !important;
}
body #content .woocommerce form .form-row .irantire-identity-input-status {
    display: block !important;
    position: static !important;
    inset: auto !important;
    transform: none !important;
    float: none !important;
    clear: both;
    box-sizing: border-box;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    margin: 8px 0 0 !important;
    padding: 10px 12px !important;
    border: 1px solid #f2c5c1;
    border-inline-start: 3px solid #d73e35;
    border-radius: 8px;
    background: #fff6f4;
    color: #8a3029;
    font: inherit;
    font-size: 13px;
    line-height: 1.9;
    text-align: right;
    direction: rtl;
    white-space: normal;
    overflow-wrap: anywhere;
}
body #content .woocommerce form .form-row .irantire-identity-input-status:empty {
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
}
body.woocommerce-checkout:not(.woocommerce-order-received) #content form.checkout #irantire_national_id,
body.woocommerce-checkout:not(.woocommerce-order-received) #content form.checkout #irantire_vehicle_document_number {
    text-align: right !important;
}
@media (max-width: 600px) {
    #content .irantire-errors-summary, #content .woocommerce-error,
    #content .wc-block-components-notice-banner.is-error,
    #content .irantire-shipping-feedback[role=alert],
    #content .coupon-error-notice { padding: 14px 16px !important; font-size: 13px; }
}
