/* ============================================================
   AlexMindset brand v1 — WooCommerce notices + small shop fixes (uk/ru, site-wide)
   Styling only. Classic notices (.woocommerce-info / -message / -error) and Blocks
   notices (.wc-block-components-notice-banner). Icons: SVG masks coloured by currentColor.
   nsp-custom.css loads async → selectors start with `html[data-scheme] body`.
   ============================================================ */

html[data-scheme] body {
  --nt-surface: #FFFFFF;
  --nt-info: #1F4E54;
  --nt-ok: #3E6B4C;      /* muted green, ≥ 3:1 as a UI mark on white */
  --nt-err: #A63A2C;     /* = --danger light, 6.3:1 on white */
  --ic-info: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cline x1='12' y1='16' x2='12' y2='11'/%3E%3Cline x1='12' y1='8' x2='12.01' y2='8'/%3E%3C/svg%3E");
  --ic-ok: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpolyline points='16 9 10.5 15 8 12.5'/%3E%3C/svg%3E");
  --ic-err: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cline x1='12' y1='7.5' x2='12' y2='13'/%3E%3Cline x1='12' y1='16.5' x2='12.01' y2='16.5'/%3E%3C/svg%3E");
}
html[data-scheme="dark"] body {
  --nt-surface: #16373B;
  --nt-info: #D4B06A;
  --nt-ok: #A8C5A0;
  --nt-err: #F5B8AA;
}

/* ---------- Classic notices ---------- */
html[data-scheme] body .woocommerce-info,
html[data-scheme] body .woocommerce-message,
html[data-scheme] body .woocommerce-error {
  position: relative;
  background: var(--nt-surface) !important;
  color: var(--text) !important;
  border: 1px solid var(--line) !important;
  border-left: 4px solid var(--nt-c, var(--nt-info)) !important;
  border-radius: var(--r-sm) !important;
  box-shadow: var(--shadow-1) !important;
  padding: 14px 16px 14px 48px !important;
  margin: 0 0 20px !important;
  font-family: var(--font-body) !important;
  font-size: 15px;
  line-height: 1.5;
  list-style: none !important;
}
html[data-scheme] body .woocommerce-info { --nt-c: var(--nt-info); }
html[data-scheme] body .woocommerce-message { --nt-c: var(--nt-ok); }
html[data-scheme] body .woocommerce-error { --nt-c: var(--nt-err); }
html[data-scheme] body .woocommerce-info::before,
html[data-scheme] body .woocommerce-message::before,
html[data-scheme] body .woocommerce-error::before {
  content: "" !important;
  position: absolute !important;
  left: 16px !important; top: 15px !important;
  width: 20px; height: 20px;
  background-color: var(--nt-c) !important;
  -webkit-mask: var(--ic-info) center / contain no-repeat;
  mask: var(--ic-info) center / contain no-repeat;
  font-family: inherit !important;
  color: transparent !important;
}
html[data-scheme] body .woocommerce-message::before { -webkit-mask-image: var(--ic-ok); mask-image: var(--ic-ok); }
html[data-scheme] body .woocommerce-error::before { -webkit-mask-image: var(--ic-err); mask-image: var(--ic-err); }
html[data-scheme] body .woocommerce-error li { color: var(--text) !important; margin: 0 !important; }
html[data-scheme] body .woocommerce-error li + li { margin-top: 4px !important; }
html[data-scheme] body :is(.woocommerce-info, .woocommerce-message, .woocommerce-error) a:not(.button) {
  color: var(--primary) !important;
  text-decoration: underline;
  text-decoration-color: var(--primary-mid);
  text-underline-offset: 3px;
  font-weight: 600;
}
html[data-scheme="dark"] body :is(.woocommerce-info, .woocommerce-message, .woocommerce-error) a:not(.button) { color: var(--primary) !important; }
html[data-scheme] body :is(.woocommerce-info, .woocommerce-message, .woocommerce-error) .button {
  float: right;
  margin: -6px 0 -6px 12px !important;
  min-height: 36px !important;
  padding: 6px 14px !important;
  background: var(--glass) !important;
  border: 1px solid var(--line) !important;
  color: var(--text) !important;
  border-radius: var(--r-pill) !important;
  font-size: 14px !important;
}
@media (max-width: 600px) {
  html[data-scheme] body :is(.woocommerce-info, .woocommerce-message, .woocommerce-error) .button { float: none; display: inline-flex; margin: 8px 0 0 !important; }
}

/* ---------- Blocks notices (cart block) ---------- */
html[data-scheme] body .wc-block-components-notice-banner {
  background: var(--nt-surface) !important;
  color: var(--text) !important;
  border: 1px solid var(--line) !important;
  border-left: 4px solid var(--nt-c, var(--nt-info)) !important;
  border-radius: var(--r-sm) !important;
  box-shadow: var(--shadow-1) !important;
  font-family: var(--font-body) !important;
}
html[data-scheme] body .wc-block-components-notice-banner.is-info { --nt-c: var(--nt-info); }
html[data-scheme] body .wc-block-components-notice-banner.is-success { --nt-c: var(--nt-ok); }
html[data-scheme] body .wc-block-components-notice-banner.is-error { --nt-c: var(--nt-err); }
html[data-scheme] body .wc-block-components-notice-banner > svg {
  background: transparent !important;
  fill: var(--nt-c) !important;
  border-radius: 0 !important;
}
html[data-scheme] body .wc-block-components-notice-banner a { color: var(--primary) !important; }

/* ---------- Small shop fixes (contrast) ---------- */
/* dark: add-to-cart on the product page — text on the light-green primary must be the dark ink */
html[data-scheme="dark"] body.woocommerce div.product form.cart .single_add_to_cart_button,
html[data-scheme="dark"] body.woocommerce div.product form.cart .single_add_to_cart_button:hover { color: var(--on-primary) !important; }
/* cart block quantity buttons */
html[data-scheme] body .wc-block-components-quantity-selector__button { color: var(--text) !important; opacity: 1 !important; }
html[data-scheme] body .wc-block-components-quantity-selector__button:disabled { opacity: .45 !important; }
/* side cart: item price was #666 (2.6:1 on the dark drawer) */
html[data-scheme] body .nsp-cart-drawer .nsp-cart-item__price,
html[data-scheme] body .nsp-cart-drawer .nsp-cart-item__price * { color: var(--hint) !important; }
/* dark: product cards (catalog + «Схожі товари») were #1E1E1E → brand surface (25.11.2026) */
html[data-scheme="dark"] body .nsp-product-card {
  background: #16373B !important;
  border-color: var(--line) !important;
}
/* cart block: the shipping value («за тарифом перевізника») gets its own line from the first render, so the late
   Store-API value / text swap does not change the row height (CLS) */
html[data-scheme] body .wc-block-components-totals-shipping .wc-block-components-totals-item { flex-wrap: wrap !important; }
html[data-scheme] body .wc-block-components-totals-shipping .wc-block-components-totals-item__value,
html[data-scheme] body .wc-block-components-totals-shipping .wc-block-components-totals-item > .wc-block-components-skeleton__element {
  flex: 0 0 100% !important;
  order: 2;
  text-align: left !important;
  margin: 2px 0 0 !important;
  min-height: 1.5em;
  white-space: nowrap;
}
/* product cards: WooCommerce appends «Переглянути кошик» ~1–3 s after an AJAX add → the card grows (CLS on prod).
   The side cart opens on add anyway, so the extra link is hidden inside cards (25.11.2026). */
html[data-scheme] body .nsp-product-card a.added_to_cart { display: none !important; }
