/* Shared visitor feedback; page styles own placement, not severity. */
body :is(.woocommerce-error, .woocommerce-message, .woocommerce-info, .wc-block-components-notice-banner)[class][class] {
  position: relative;
  box-sizing: border-box;
  min-width: 0;
  margin: 0 0 20px;
  padding: 14px;
  border: 1px solid var(--mt-notice-border, var(--mt-border));
  border-radius: 8px;
  color: var(--mt-notice-ink, var(--mt-text));
  background: var(--mt-notice-fill, var(--mt-surface-raised));
  font: 400 13px/20px var(--wp--preset--font-family--ui, Geist), sans-serif;
  list-style: none;
  overflow-wrap: anywhere;
}

body :is(.woocommerce-error, .wc-block-components-notice-banner.is-error) {
  --mt-notice-border: var(--mt-error-border);
  --mt-notice-ink: var(--mt-error-text);
  --mt-notice-fill: var(--mt-error-bg);
}

body :is(.woocommerce-message, .wc-block-components-notice-banner.is-success) {
  --mt-notice-border: var(--mt-notice-success-border);
  --mt-notice-ink: var(--mt-success-text);
  --mt-notice-fill: var(--mt-success-bg);
}

body .wc-block-components-notice-banner.is-warning {
  --mt-notice-border: var(--mt-notice-warning-border);
  --mt-notice-ink: var(--mt-notice-warning-text);
  --mt-notice-fill: var(--mt-notice-warning-bg);
}

body .wc-block-components-notice-banner { display: flex; align-items: flex-start; gap: 12px; }
body .wc-block-components-notice-banner[class] > svg { width: 18px; height: 18px; flex: 0 0 18px; margin: 1px 0 0; padding: 0; fill: currentColor; background: transparent; transform: none; }
body .wc-block-components-notice-banner > .wc-block-components-notice-banner__content { min-width: 0; padding: 0; }
body :is(.woocommerce-error, .woocommerce-message, .woocommerce-info)[class][class] { padding-left: 44px; }
body :is(.woocommerce-error, .woocommerce-message, .woocommerce-info)::before { position: absolute; top: 15px; left: 14px; display: block; width: 18px; height: 18px; content: ""; background: currentColor; mask: url('../icons/status-alert.svg') center / contain no-repeat; }
body .woocommerce-message::before { mask-image: url('../icons/status-check.svg'); }
body .woocommerce-error li { margin: 0; padding: 0; }
body .woocommerce-error li + li { margin-top: 8px; }
body :is(.woocommerce-error, .woocommerce-message, .woocommerce-info, .wc-block-components-notice-banner) a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
/* Woo marks its action and close-button colors important. */
body .wc-block-components-notice-banner .wc-forward { color: inherit !important; }
body .wc-block-components-notice-banner > .wc-block-components-button { color: inherit !important; display: grid; min-width: 44px !important; width: 44px !important; min-height: 44px !important; height: 44px !important; flex-basis: 44px; place-items: center; margin: -12px -12px -12px 0 !important; }
body :is(.woocommerce-error, .woocommerce-message, .woocommerce-info, .wc-block-components-notice-banner) :is(a, button):focus-visible { outline: 2px solid var(--mt-focus); outline-offset: 3px; }
body .wc-block-components-notice-snackbar { color: var(--mt-text); background: var(--mt-surface-raised); border: 1px solid var(--mt-border); border-radius: 8px; font-family: var(--wp--preset--font-family--ui, Geist), sans-serif; }
body .wc-block-components-notice-snackbar a { color: inherit; }
body .wc-block-components-validation-error { color: var(--mt-error-text); }
.mt-password-form--new > .woocommerce-password-strength:is(.short, .bad) { color: var(--mt-error-text); background: var(--mt-error-bg); border-color: var(--mt-error-border); }
.mt-password-form--new > .woocommerce-password-strength.good { color: var(--mt-notice-warning-text); background: var(--mt-notice-warning-bg); border-color: var(--mt-notice-warning-border); }
.mt-password-form--new > .woocommerce-password-strength.strong { color: var(--mt-success-text); background: var(--mt-success-bg); border-color: var(--mt-notice-success-border); }

.mt-login-card :is(.woocommerce-error, .woocommerce-message, .woocommerce-info, .wc-block-components-notice-banner),
.mt-register-card :is(.woocommerce-error, .woocommerce-message, .woocommerce-info, .wc-block-components-notice-banner) { margin-bottom: 0; }
