/* Success notices use the existing data-navigation-background palette rules in
 * layouts/_header.scss. Errors/informational notices keep their semantic styles.
 * The translucent shade keeps white copy legible even on lime/golden/pale blue;
 * it does not alter the selected color or the hamburger menu itself. */
#page .woocommerce-message {
  background-color: #3a8c84; /* Theme teal before the menu initializes / without JS. */
  background-image: linear-gradient(rgba(0, 0, 0, .4), rgba(0, 0, 0, .4));
  border: 0;
  border-radius: 0;
  color: #fff;
  font-family: "Area Normal", sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.65;
  padding: 22px 0;
}

#page .haystack-notice-inner {
  /* Use the same .container widths and horizontal padding as #header. */
  display: flex;
  align-items: center;
  gap: 16px;
}

#page .haystack-notice-inner::before,
#page .haystack-notice-inner::after,
#page .woocommerce-message::before,
#page .woocommerce-message::after {
  display: none;
}

#page .haystack-notice-symbol {
  /* Reuse the existing square brand asset, not a new icon or Woo glyph. */
  background: url("../../dist/images/logo-graphic.svg") center / contain no-repeat;
  filter: brightness(0) invert(1);
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  display: block;
}

#page .woocommerce-message a {
  color: #fff;
}

/* Woo's notice text is not wrapped in an element. Grid gives its anonymous text
 * cell and the CTA predictable positions regardless of their markup order. */
#page .haystack-notice-content {
  flex: 1;
  min-width: 0;
}

#page .haystack-notice-content:has(.wc-forward) {
  align-items: center;
  column-gap: 24px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
}

#page .woocommerce-message .button {
  /* The global Woo button bridge uses !important; reverse only notice CTAs. */
  background: transparent !important;
  border: 1px solid #fff !important;
  border-radius: 48px;
  color: #fff !important;
  float: none;
  font-family: "Area Normal", sans-serif;
  font-size: 12px;
  font-weight: 900;
  grid-column: 2;
  grid-row: 1;
  letter-spacing: .15em;
  line-height: 14px;
  margin: 0;
  padding: 16px 24px !important;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
  width: auto;
}

#page .woocommerce-message .button:hover,
#page .woocommerce-message .button:focus,
#page .woocommerce-message .button:active {
  background: #fff !important;
  border-color: #fff !important;
  color: #111 !important;
}

#page .woocommerce-message :is(a, button):focus-visible {
  outline-color: #fff !important;
}

#page .haystack-notice-dismiss {
  display: none; /* No inert dismiss control when JavaScript is unavailable. */
  flex: 0 0 32px;
  align-self: flex-start;
  transform: translateY(-10px);
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #fff;
  font: 24px/1 Arial, sans-serif;
  cursor: pointer;
}

.haystack-notices-ready #page .haystack-notice-dismiss {
  display: inline-flex;
}

#page .haystack-notice-dismiss:hover {
  background: rgba(255, 255, 255, .15);
}

@media (max-width: 767px) {
  #page .woocommerce-message {
    font-size: 15px;
    padding: 20px 0;
  }

  #page .haystack-notice-inner {
    align-items: flex-start;
    gap: 12px;
  }

  #page .haystack-notice-content:has(.wc-forward) {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 16px;
  }

  #page .haystack-notice-dismiss {
    flex-basis: 36px;
    width: 36px;
    height: 36px;
  }

  #page .woocommerce-message .button {
    grid-column: 1;
    grid-row: 2;
    justify-self: start;
  }
}
