/**
 * Bowdabra WooCommerce notices — sitewide.
 * Brand red (#BB0000 / Elementor primary), tight under header, readable on mobile.
 */

:root {
  --ba-notice-red: var(--e-global-color-primary, #bb0000);
  --ba-notice-text: #1a1a1a;
  --ba-notice-muted: #5c5c5c;
  --ba-notice-radius: 10px;
  --ba-notice-font: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Host used when BA prints notices on non-Woo templates */
.ba-wc-notices-host {
  width: 100%;
  max-width: 1100px;
  margin: 12px auto 0;
  padding: 0 16px;
  box-sizing: border-box;
  font-family: var(--ba-notice-font);
}

.ba-wc-notices-host:empty {
  display: none;
}

.woocommerce-notices-wrapper {
  width: 100%;
  max-width: 1100px;
  margin: 10px auto 14px;
  padding: 0 16px;
  box-sizing: border-box;
}

.woocommerce-notices-wrapper:empty {
  display: none;
}

/* Kill focus rings that some themes leave as ugly boxes */
.woocommerce-error:focus,
.woocommerce-info:focus,
.woocommerce-message:focus,
.woocommerce-notices-wrapper:focus,
.woocommerce-error:focus-visible,
.woocommerce-info:focus-visible,
.woocommerce-message:focus-visible,
.woocommerce-notices-wrapper:focus-visible {
  outline: none !important;
  box-shadow: none !important;
}

ul.woocommerce-error,
ul.woocommerce-info,
ul.woocommerce-message,
.woocommerce-error,
.woocommerce-info,
.woocommerce-message {
  position: relative;
  width: 100% !important;
  max-width: 1100px;
  margin: 10px auto 12px !important;
  padding: 12px 40px 12px 44px !important;
  box-sizing: border-box !important;
  list-style: none !important;
  border-radius: var(--ba-notice-radius) !important;
  border: 1px solid #e6e6e6 !important;
  border-left: 4px solid var(--ba-notice-red) !important;
  background: #fff !important;
  color: var(--ba-notice-text) !important;
  font-family: var(--ba-notice-font) !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  line-height: 1.45 !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06) !important;
}

.woocommerce-error {
  border-left-color: var(--ba-notice-red) !important;
  background: #fff8f8 !important;
  background-color: #fff8f8 !important;
}

.woocommerce-message {
  border-left-color: #2f7d32 !important;
  background: #f5faf5 !important;
  background-color: #f5faf5 !important;
}

.woocommerce-info {
  border-left-color: #c9a227 !important;
  background: #fffdf5 !important;
  background-color: #fffdf5 !important;
}

/* Beat Elementor Pro notice sheet without fighting unrelated widgets */
body.woocommerce .woocommerce-error,
body.woocommerce-page .woocommerce-error,
body .woocommerce-notices-wrapper .woocommerce-error,
body .ba-wc-notices-host .woocommerce-error {
  background: #fff8f8 !important;
  background-color: #fff8f8 !important;
  border-left: 4px solid var(--ba-notice-red) !important;
}

body.woocommerce .woocommerce-message,
body.woocommerce-page .woocommerce-message,
body .woocommerce-notices-wrapper .woocommerce-message,
body .ba-wc-notices-host .woocommerce-message {
  background: #f5faf5 !important;
  background-color: #f5faf5 !important;
  border-left: 4px solid #2f7d32 !important;
}

body.woocommerce .woocommerce-info,
body.woocommerce-page .woocommerce-info,
body .woocommerce-notices-wrapper .woocommerce-info,
body .ba-wc-notices-host .woocommerce-info {
  background: #fffdf5 !important;
  background-color: #fffdf5 !important;
  border-left: 4px solid #c9a227 !important;
}

.woocommerce-error li,
.woocommerce-info li,
.woocommerce-message li {
  display: block !important;
  margin: 0 0 6px !important;
  padding: 0 !important;
  list-style: none !important;
}

.woocommerce-error li:last-child,
.woocommerce-info li:last-child,
.woocommerce-message li:last-child {
  margin-bottom: 0 !important;
}

/* Theme icon (::before) — keep WC glyph, tone it to brand */
.woocommerce-error::before,
.woocommerce-info::before,
.woocommerce-message::before {
  position: absolute !important;
  top: 12px !important;
  left: 14px !important;
  margin: 0 !important;
  font-size: 1.05em !important;
  line-height: 1.2 !important;
  color: var(--ba-notice-red) !important;
}

.woocommerce-message::before {
  color: #2f7d32 !important;
}

.woocommerce-info::before {
  color: #a88410 !important;
}

.woocommerce-error a,
.woocommerce-info a,
.woocommerce-message a {
  color: var(--ba-notice-red) !important;
  font-weight: 600 !important;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.woocommerce-error a:hover,
.woocommerce-info a:hover,
.woocommerce-message a:hover {
  color: #990000 !important;
}

/* Dismiss control (injected by BA) */
.ba-wc-notice-dismiss {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ba-notice-muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  appearance: none;
}

.ba-wc-notice-dismiss:hover,
.ba-wc-notice-dismiss:focus-visible {
  color: var(--ba-notice-text);
  background: rgba(0, 0, 0, 0.06);
  outline: none;
}

@media (min-width: 768px) {
  .woocommerce-notices-wrapper,
  ul.woocommerce-error,
  ul.woocommerce-info,
  ul.woocommerce-message,
  .woocommerce-error,
  .woocommerce-info,
  .woocommerce-message {
    width: min(92%, 1100px) !important;
  }
}

@media (max-width: 767px) {
  .ba-wc-notices-host,
  .woocommerce-notices-wrapper {
    padding-left: 12px;
    padding-right: 12px;
    margin-top: 8px;
    margin-bottom: 8px;
  }

  ul.woocommerce-error,
  ul.woocommerce-info,
  ul.woocommerce-message,
  .woocommerce-error,
  .woocommerce-info,
  .woocommerce-message {
    margin: 8px auto !important;
    padding: 11px 36px 11px 12px !important;
    font-size: 13.5px !important;
  }
}

/* Never hide notices globally (guards against accidental theme/soft-cutover bleed) */
body .woocommerce-error,
body .woocommerce-info,
body .woocommerce-message,
body .woocommerce-notices-wrapper:not(:empty),
body .ba-wc-notices-host:not(:empty) {
  visibility: visible !important;
  opacity: 1;
}

/* Empty-cart info keeps checkout.css card treatment — don't force flex row on that block */
.woocommerce-cart .cart-empty.woocommerce-info,
.woocommerce-cart .woocommerce-info.cart-empty,
.woocommerce-cart .wc-empty-cart-message .woocommerce-info {
  display: block !important;
  max-width: 420px;
}
