/*
 * Neo Compounds: shared WooCommerce notice styles (0.5.37).
 *
 * One rule set for .woocommerce-message / -info / -error (div or ul) on every page except checkout, which keeps
 * its own notice styles in checkout.css (same look). Replaces the per-page patches in account.css / signup.css.
 * NC-083: .woocommerce-notice--warning is the amber card for can't-stack / replaced-coupon notices only.
 * Those notices still carry .woocommerce-info; the warning rule comes after the info rule so it wins.
 *
 * Why: Storefront paints notices as solid green / blue / red boxes with WHITE text and an absolutely positioned
 * icon (::before at left:1.5em, with padding-left:3.5em to make room). The theme turned the boxes white and cut the
 * padding to 16px on My Account, so success / info text became white-on-white and the icon covered the first
 * letters ("E· or", "P·ase confirm…").
 *
 * Loaded globally from functions.php. My Account templates also enqueue it (same handle, a no-op when already
 * loaded), so a templates-only hotfix on an older theme version still gets it.
 */

body.neo-compounds:not(.woocommerce-checkout) .woocommerce-message,
body.neo-compounds:not(.woocommerce-checkout) .woocommerce-info,
body.neo-compounds:not(.woocommerce-checkout) .woocommerce-notice--warning,
body.neo-compounds:not(.woocommerce-checkout) .woocommerce-error {
  position: relative;
  box-sizing: border-box;
  border: 1px solid var(--neo-border, #E3E8EF);
  border-radius: 14px;
  background: #fff;
  padding: 14px 18px;
  margin-top: 0;
  margin-bottom: 16px;
  list-style: none;
  font-family: var(--neo-font, system-ui, sans-serif);
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.55;
  text-indent: 0;
  text-align: left;
  color: var(--neo-ink, #0B1A30);
}

body.neo-compounds:not(.woocommerce-checkout) .woocommerce-message {
  border-color: rgba(155, 216, 74, 0.55);
  background: var(--neo-green-wash);
  color: var(--neo-green-dark, #2F5A0B);
}

body.neo-compounds:not(.woocommerce-checkout) .woocommerce-info {
  border-color: rgba(30, 91, 216, 0.35);
  background: #f3f7ff;
  color: var(--neo-navy, #0B1A30);
}

/* NC-083. #7A5600 on #FFF4D6 is 6.07:1. Only the warning class — info above stays pale blue. */
body.neo-compounds:not(.woocommerce-checkout) .woocommerce-notice--warning {
  border-color: rgba(224, 168, 0, 0.72);
  background: var(--neo-warn-bg, #FFF4D6);
  color: var(--neo-warn-text, #7A5600);
}

body.neo-compounds:not(.woocommerce-checkout) .woocommerce-error {
  border-color: rgba(214, 54, 47, 0.4);
  background: #fff6f5;
  color: #B3261E; /* --neo-error (#D6362F) is 4.5:1 on white but 4.46:1 on this tint; this is 6.2:1. */
}

/* No Storefront icon: there is no room for it and it covered the first letters. */
body.neo-compounds:not(.woocommerce-checkout) .woocommerce-message::before,
body.neo-compounds:not(.woocommerce-checkout) .woocommerce-info::before,
body.neo-compounds:not(.woocommerce-checkout) .woocommerce-notice--warning::before,
body.neo-compounds:not(.woocommerce-checkout) .woocommerce-error::before {
  content: none !important;
  display: none !important;
}

/* ul.woocommerce-error: one line per error, no bullets or indents. */
body.neo-compounds:not(.woocommerce-checkout) .woocommerce-message li,
body.neo-compounds:not(.woocommerce-checkout) .woocommerce-info li,
body.neo-compounds:not(.woocommerce-checkout) .woocommerce-notice--warning li,
body.neo-compounds:not(.woocommerce-checkout) .woocommerce-error li {
  list-style: none;
  margin: 0 0 6px;
  padding: 0;
  color: inherit;
}

body.neo-compounds:not(.woocommerce-checkout) .woocommerce-message li:last-child,
body.neo-compounds:not(.woocommerce-checkout) .woocommerce-info li:last-child,
body.neo-compounds:not(.woocommerce-checkout) .woocommerce-notice--warning li:last-child,
body.neo-compounds:not(.woocommerce-checkout) .woocommerce-error li:last-child {
  margin-bottom: 0;
}

/* Links inside notices take the notice colour (Storefront made them white). */
body.neo-compounds:not(.woocommerce-checkout) .woocommerce-message a,
body.neo-compounds:not(.woocommerce-checkout) .woocommerce-info a,
body.neo-compounds:not(.woocommerce-checkout) .woocommerce-notice--warning a,
body.neo-compounds:not(.woocommerce-checkout) .woocommerce-error a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* "View cart" / "Continue shopping" buttons in notices: a right-aligned text link, as on checkout.
   !important only to beat the My Account pill button rule (account.css, .neo-account .button). */
body.neo-compounds:not(.woocommerce-checkout) .woocommerce-message .button,
body.neo-compounds:not(.woocommerce-checkout) .woocommerce-info .button,
body.neo-compounds:not(.woocommerce-checkout) .woocommerce-notice--warning .button,
body.neo-compounds:not(.woocommerce-checkout) .woocommerce-error .button {
  float: right;
  width: auto;
  height: auto !important;
  min-height: 0 !important;
  margin: 0 0 0 16px;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: none !important;
  box-shadow: none !important;
  color: inherit !important;
  font-family: inherit !important;
  font-size: inherit !important;
  font-weight: 700 !important;
  line-height: inherit !important;
  text-decoration: none !important;
}

body.neo-compounds:not(.woocommerce-checkout) .woocommerce-message .button:hover,
body.neo-compounds:not(.woocommerce-checkout) .woocommerce-info .button:hover,
body.neo-compounds:not(.woocommerce-checkout) .woocommerce-notice--warning .button:hover,
body.neo-compounds:not(.woocommerce-checkout) .woocommerce-error .button:hover {
  background: none !important;
  color: inherit !important;
  text-decoration: underline !important;
  opacity: 1;
}

/* WooCommerce focuses the notice group after a redirect (tabindex="-1") so screen readers announce it; the
   browser's default focus ring drew a heavy black border. Keep a soft ring instead. */
body.neo-compounds .woocommerce-notices-wrapper:focus,
body.neo-compounds .woocommerce-message[tabindex="-1"]:focus,
body.neo-compounds .woocommerce-info[tabindex="-1"]:focus,
body.neo-compounds .woocommerce-notice--warning[tabindex="-1"]:focus,
body.neo-compounds .woocommerce-error[tabindex="-1"]:focus {
  outline: none;
}

body.neo-compounds:not(.woocommerce-checkout) .woocommerce-message[tabindex="-1"]:focus,
body.neo-compounds:not(.woocommerce-checkout) .woocommerce-info[tabindex="-1"]:focus,
body.neo-compounds:not(.woocommerce-checkout) .woocommerce-notice--warning[tabindex="-1"]:focus,
body.neo-compounds:not(.woocommerce-checkout) .woocommerce-error[tabindex="-1"]:focus {
  box-shadow: 0 0 0 3px rgba(30, 91, 216, 0.18);
}

/* Checkout keeps checkout.css, except: the error text was 4.46:1 on its tint, and the "View cart" link was only
   readable through -webkit-text-fill-color (its colour was still Storefront's white). */
body.neo-compounds.woocommerce-checkout .woocommerce-error,
body.neo-compounds.woocommerce-checkout .woocommerce-error[role="alert"] {
  color: #B3261E !important;
  -webkit-text-fill-color: #B3261E !important;
}

body.neo-compounds.woocommerce-checkout .woocommerce-message .button,
body.neo-compounds.woocommerce-checkout .woocommerce-info .button,
body.neo-compounds.woocommerce-checkout .woocommerce-notice--warning .button,
body.neo-compounds.woocommerce-checkout .woocommerce-error .button {
  color: inherit !important;
}

/* v0.5.43 — Costa Rica pickup block (thank-you + My Account view-order). */
.neo-pickup-block {
  margin: 18px 0 0;
  padding: 14px 16px;
  border: 1px solid var(--neo-border, #d7dde6);
  border-left: 3px solid var(--neo-navy, #0B1A30);
  border-radius: 12px;
  background: #fff;
}
.neo-order-card .neo-pickup-block { margin: 14px 22px 4px; }
.neo-pickup-block__text {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
}

/* NC-151 green (0.5.100): replace the Storefront parent green in the child theme (no parent edit). */
body.neo-compounds .woocommerce-password-strength.strong,
body.neo-compounds .stock.in-stock { color: var(--neo-green-dark); }
body.neo-compounds .form-row.woocommerce-validated input.input-text { box-shadow: inset 2px 0 0 var(--neo-green-muted); }
