/**
 * JOVA — WooCommerce Notice Compatibility
 *
 * WooCommerce shopper notices are consumed by assets/js/ui.js and surfaced
 * through the global JOVA toast system. These rules are intentionally kept
 * minimal so a notice cannot flash as a full-width WooCommerce banner before
 * JavaScript consumes it.
 */

.woocommerce-message,
.woocommerce-info,
.woocommerce-error,
.wc-block-components-notice-banner {
  box-sizing: border-box;
}

/* The JS bridge removes these nodes after converting them to a JOVA toast.
 * Hide them immediately to avoid a one-frame flash of WooCommerce styling. */
.jova-toast-ready .woocommerce-message,
.jova-toast-ready .woocommerce-info,
.jova-toast-ready .woocommerce-error,
.jova-toast-ready .wc-block-components-notice-banner {
  display: none !important;
}

/* Notice groups may be inserted directly into JOVA's checkout grid by
 * WooCommerce's legacy checkout JS. Once their notices are consumed they are
 * removed by the toast bridge; keeping the group full-width avoids a layout
 * jump in the small interval before the MutationObserver runs. */
.k-checkout-layout > .woocommerce-NoticeGroup-checkout,
.k-checkout-layout > .woocommerce-NoticeGroup-updateOrderReview {
  grid-column: 1 / -1;
  width: 100%;
}

.woocommerce-NoticeGroup-checkout:empty,
.woocommerce-NoticeGroup-updateOrderReview:empty {
  display: none !important;
}
