/* Shared classic WooCommerce notices, including dynamically inserted notices. */
body :is(.woocommerce-error, .woocommerce-message, .woocommerce-info) {
  --hpw-notice-color: #0d69a0;
  --hpw-notice-background: #f0f7fb;
  --hpw-notice-border: #c9dfec;
  --hpw-notice-shadow: rgb(13 105 160 / 8%);
}

body .woocommerce-error {
  --hpw-notice-color: #b42328;
  --hpw-notice-background: #fff5f5;
  --hpw-notice-border: #f0cccc;
  --hpw-notice-shadow: rgb(180 35 40 / 8%);
}

body .woocommerce-message {
  --hpw-notice-color: #18794e;
  --hpw-notice-background: #f2fbf6;
  --hpw-notice-border: #c4e4d2;
  --hpw-notice-shadow: rgb(24 121 78 / 8%);
}

:is(body.woocommerce-page, body .woocommerce, body .woocommerce-notices-wrapper)
  :is(.woocommerce-error, .woocommerce-message, .woocommerce-info) {
  display: flex !important;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem 1rem;
  position: relative;
  box-sizing: border-box;
  width: 100%;
  max-width: 100% !important;
  margin: 0 0 1rem !important;
  padding: .75rem 1.125rem .75rem 3.25rem !important;
  border: 1px solid var(--hpw-notice-border) !important;
  border-radius: 12px;
  background: var(--hpw-notice-background) !important;
  box-shadow: 0 4px 14px var(--hpw-notice-shadow);
  color: #25343b !important;
  font: 500 .875rem/1.6 Montserrat, system-ui, sans-serif;
  list-style: none outside !important;
  overflow-wrap: anywhere;
}

body :is(.woocommerce-error, .woocommerce-message, .woocommerce-info)::before {
  content: "i";
  position: absolute;
  inset: 50% auto auto 1.125rem;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  margin: 0;
  border-radius: 50%;
  background: var(--hpw-notice-color);
  color: #fff;
  font: 700 14px/1 system-ui, sans-serif;
}

body .woocommerce-error::before { content: "!"; }
body .woocommerce-message::before { content: "✓"; }

body :is(.woocommerce-error, .woocommerce-message, .woocommerce-info) > li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem 1rem;
  width: 100%;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

body :is(.woocommerce-error, .woocommerce-message, .woocommerce-info) > li + li {
  margin-top: .625rem !important;
}

body :is(.woocommerce-error, .woocommerce-message, .woocommerce-info) a {
  color: #0d69a0;
  text-underline-offset: 3px;
}

body :is(.woocommerce-error, .woocommerce-message, .woocommerce-info) :is(a.button, button.button) {
  float: none;
  order: 1;
  flex: 0 0 auto;
  box-sizing: border-box;
  width: auto !important;
  min-width: 0 !important;
  max-width: 100%;
  min-height: 36px;
  height: auto !important;
  margin: 0 0 0 auto !important;
  padding: .5rem 1rem !important;
  border: 1px solid #0d69a0 !important;
  border-radius: 999px;
  background: #0d69a0 !important;
  box-shadow: none;
  color: #fff !important;
  font: 600 .8125rem/1.4 Montserrat, system-ui, sans-serif !important;
  letter-spacing: normal;
  text-align: center;
  text-transform: none;
  text-decoration: none !important;
  white-space: normal;
}

body :is(.woocommerce-error, .woocommerce-message, .woocommerce-info) .button:hover {
  background: #095582 !important;
}

body :is(.woocommerce-error, .woocommerce-message, .woocommerce-info) a:focus-visible {
  outline: 2px solid #0d69a0;
  outline-offset: 3px;
}

@media (max-width: 600px) {
  body :is(.woocommerce-error, .woocommerce-message, .woocommerce-info) :is(a.button, button.button) {
    float: none;
    display: table;
    margin: .25rem 0 0 !important;
  }
}

:is(body.woocommerce-page, body .woocommerce, body .woocommerce-notices-wrapper)
  :is(.woocommerce-error, .woocommerce-message, .woocommerce-info).hpw-notice-dismissible {
  padding-right: 3.25rem !important;
}

body :is(.woocommerce-error, .woocommerce-message, .woocommerce-info) .hpw-notice-close {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  right: .5rem;
  display: grid;
  place-items: center;
  width: 36px !important;
  min-width: 36px !important;
  height: 36px !important;
  min-height: 36px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 50%;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--hpw-notice-color) !important;
  font: 400 24px/1 system-ui, sans-serif !important;
  cursor: pointer;
}

body :is(.woocommerce-error, .woocommerce-message, .woocommerce-info) .hpw-notice-close:hover {
  background: rgb(37 52 59 / 7%) !important;
}

body :is(.woocommerce-error, .woocommerce-message, .woocommerce-info) .hpw-notice-close:focus-visible {
  outline: 2px solid var(--hpw-notice-color);
  outline-offset: 1px;
}
