/* Shared feedback styling; visibility stays controlled by each form/plugin. */
body :is(#brx-content, .brx-popup) :is(
  [data-fmt-auth-status], [data-fmt-draft-notice], [data-fmt-package-notice],
  [data-fmt-account-notice], [data-fmt-market-notice], [data-fmt-test-card-feedback],
  [data-fmt-preview-notice], .woocommerce-error, .woocommerce-message,
  .woocommerce-info, .wpcf7-response-output
) {
  box-sizing: border-box;
  position: relative;
  float: none;
  clear: both;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: auto;
  flex: 0 1 auto;
  align-self: stretch;
  margin: 16px 0;
  padding: 12px 16px;
  border: 1px solid #f3c4c1;
  border-radius: 8px;
  background: #fff4f2;
  color: #a52a24;
  font-family: inherit;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: normal;
  text-align: left;
  text-transform: none;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
  box-shadow: none;
}

/* Feedback inside a heading/action row needs its own full-width line. */
body #brx-content :has(> :is([data-fmt-auth-status], [data-fmt-draft-notice],
  [data-fmt-package-notice], [data-fmt-account-notice], [data-fmt-market-notice])) {
  flex-wrap: wrap;
}

body :is(#brx-content, .brx-popup) :is(
  [data-fmt-auth-status], [data-fmt-draft-notice], [data-fmt-package-notice],
  [data-fmt-account-notice], [data-fmt-market-notice]
)[data-state="success"],
body #brx-content .woocommerce-message,
body :is(#brx-content, .brx-popup) .wpcf7 form.sent .wpcf7-response-output {
  border-color: #b9dfcd;
  background: #effaf4;
  color: #176442;
}

body #brx-content .woocommerce-info {
  border-color: #c9d9ec;
  background: #f0f6fc;
  color: #234b73;
}

body #brx-content :is(.woocommerce-error, .woocommerce-message, .woocommerce-info)::before,
body #brx-content :is(.woocommerce-error, .woocommerce-message, .woocommerce-info)::after {
  display: none;
}

body #brx-content ul.woocommerce-error { list-style: none; }
body #brx-content .woocommerce-error li { margin: 0; padding: 0; }
body #brx-content .woocommerce-error li + li { margin-top: 6px; }
body #brx-content :is(.woocommerce-error, .woocommerce-message, .woocommerce-info) a {
  color: inherit;
  text-decoration: underline;
  overflow-wrap: anywhere;
}

body :is(#brx-content, .brx-popup) .wpcf7-not-valid-tip {
  display: block;
  margin-top: 6px;
  color: #a52a24;
  font-size: 13px;
  line-height: 1.5;
  white-space: normal;
  overflow-wrap: anywhere;
}

body :is(#brx-content, .brx-popup) :is(input, textarea, select)[aria-invalid="true"] {
  border-color: #c4362f;
}

body :is(#brx-content, .brx-popup) :is(input, textarea, select)[aria-invalid="true"]:focus {
  outline: 2px solid #c4362f;
  outline-offset: 2px;
}
