/* Fix round 2, group fyc (Claude, 15 Nov 2026; PLAN 1.11): one notice look, and the cart's Offer code answering in place.
   Loaded only while round 2 is on (inc/v2/v2-fix2-fyc.php); every rule also sits under body.chvf2. No words, no new colours:
   #FF8B82 is the dark pages' error colour (v2-dark.css --k-error), #34C28A the site's green, rgba(255,255,255,.28) its ring.

   1. ONE NOTICE: 12 px corners, 1 px ring, a light fill of the same tone, a drawn 16 px icon in a ring, 14 px text.
      error   ring rgba(255,139,130,.55), fill .08, "!"   WooCommerce errors (sign-in, password, cart, checkout, product,
                                                           shop), Track order, the contact form's problem list, the Google
                                                           sign-in note, the drawer's line message, Build a Stack's limit line
      success ring rgba(52,194,138,.55),  fill .08, tick  WooCommerce successes ("Cart updated.", "Undo?", added to cart,
                                                           saved details), the shop's "Added to cart" note, the contact "sent"
                                                           box, the password e-mail box
      info    ring rgba(255,255,255,.28), fill .04, "i"   WooCommerce information ("Delivery charge updated." ...). The
                                                           checkout's "Have a coupon?" row is left exactly as it is (PLAN 2.7).
      Only the look changes: margins, order, focus and the words of each box stay as they are.
      Specificity: body.chvf2.chvf2 + :is() of single classes = (0,3,2), above the theme's notice rules (commerce-ui.css
      0,1,2; the phone account 0,3,1; Build a Stack 0,3,0; the shop 0,2,0) without !important; display is never set, so the
      layouts of the "added to cart" row and the phone account's button column stay. The info exception sits in :where() so
      it adds nothing to that number.
   2. THE OFFER CODE ROW (cart, and the checkout's own coupon form): WooCommerce's own error line under the field, 13 px,
      6 px under it, the field ringed in the error colour (the kit's field error); the success words in the same place in
      green; room under the row so the line does not touch the card's edge. */

/* ======================================================================== 1. one notice */
html body.chvf2.chvf2 :is(.woocommerce-error, .woocommerce-message, :where(.woocommerce-info:not(.woocommerce-form-coupon-toggle > *)), .cl-tracking-notice, .k-errsum, .chv2-gsi__note, .cm-mini__msg, .sx-msg, .k-notice--ok, .s3-note--ok) {
  --fyc-tone: #FF8B82;
  --fyc-ring: rgba(255, 139, 130, .55);
  --fyc-fill: rgba(255, 139, 130, .08);
  --fyc-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23000' stroke-width='1.5' stroke-linecap='round'%3E%3Ccircle cx='8' cy='8' r='7.25'/%3E%3Cpath d='M8 4.5v3.75'/%3E%3Ccircle cx='8' cy='11.25' r='.95' fill='%23000' stroke='none'/%3E%3C/svg%3E");
  position: relative;
  min-height: 44px;
  padding: 12px 16px 12px 42px;
  border: 1px solid var(--fyc-ring);
  border-radius: 12px;
  background: var(--fyc-fill);
  box-shadow: none;
  color: #fff;
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  letter-spacing: 0;
  text-align: left;
  overflow-wrap: anywhere; /* review fix: a long typed code inside WooCommerce's sentence breaks instead of running past the box */
}
/* the green twin */
html body.chvf2.chvf2 :is(.woocommerce-message, .k-notice--ok, .s3-note--ok) {
  --fyc-tone: #34C28A;
  --fyc-ring: rgba(52, 194, 138, .55);
  --fyc-fill: rgba(52, 194, 138, .08);
  --fyc-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23000' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='8' cy='8' r='7.25'/%3E%3Cpath d='M5.1 8.3l2 2 3.8-4.1'/%3E%3C/svg%3E");
}
/* the quiet twin (information) */
html body.chvf2.chvf2 .woocommerce-info:not(.woocommerce-form-coupon-toggle > *) {
  --fyc-tone: rgba(255, 255, 255, .72);
  --fyc-ring: rgba(255, 255, 255, .28);
  --fyc-fill: rgba(255, 255, 255, .04);
  --fyc-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23000' stroke-width='1.5' stroke-linecap='round'%3E%3Ccircle cx='8' cy='8' r='7.25'/%3E%3Cpath d='M8 7.75v3.75'/%3E%3Ccircle cx='8' cy='4.75' r='.95' fill='%23000' stroke='none'/%3E%3C/svg%3E");
}
/* the icon: drawn (WooCommerce prints notices through wc_kses_notice(), which strips <svg>), on the first line: 12 + (20 - 16) / 2 */
html body.chvf2.chvf2 :is(.woocommerce-error, .woocommerce-message, :where(.woocommerce-info:not(.woocommerce-form-coupon-toggle > *)), .cl-tracking-notice, .k-errsum, .chv2-gsi__note, .cm-mini__msg, .sx-msg, .k-notice--ok, .s3-note--ok)::before {
  content: "";
  display: block;
  position: absolute;
  top: 14px;
  left: 16px;
  width: 16px;
  height: 16px;
  margin: 0;
  border-radius: 0;
  background: var(--fyc-tone);
  -webkit-mask: var(--fyc-icon) center / 16px 16px no-repeat;
          mask: var(--fyc-icon) center / 16px 16px no-repeat;
}
@media (forced-colors: active) {
  html body.chvf2.chvf2 :is(.woocommerce-error, .woocommerce-message, :where(.woocommerce-info:not(.woocommerce-form-coupon-toggle > *)), .cl-tracking-notice, .k-errsum, .chv2-gsi__note, .cm-mini__msg, .sx-msg, .k-notice--ok, .s3-note--ok)::before { background: CanvasText; }
}
/* inside: one text colour, links underlined in it (buttons and kit links keep their own look) */
html body.chvf2.chvf2 :is(.woocommerce-error, .woocommerce-message, :where(.woocommerce-info:not(.woocommerce-form-coupon-toggle > *)), .cl-tracking-notice, .k-errsum, .chv2-gsi__note, .cm-mini__msg, .sx-msg, .k-notice--ok, .s3-note--ok) a:not(.button):not(.btn):not(.link) {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: .2em;
}
html body.chvf2.chvf2 .k-notice--ok strong { color: inherit; }
/* several errors in one box: one list under one icon */
html body.chvf2.chvf2 .woocommerce-error > li { padding: 0; }
html body.chvf2.chvf2 .woocommerce-error > li + li { margin-top: 6px; padding-top: 0; border-top: 0; }
html body.chvf2.chvf2 .woocommerce-error > li::before { content: none; display: none; }
/* the phone account's panes ask for 16 px corners and 15 px text: one look there too (their margins and button column stay) */
html body.chvf2.chvf2.cl-acp .cm-shell__pane :is(.woocommerce-error, .woocommerce-message, .woocommerce-info, .k-notice--ok) { border-radius: 12px; font-size: 14px; line-height: 20px; }
/* "added to cart" (cart page and others): the box's tick replaces the row's own 20 px tick; the row and "View cart" stay */
html body.chvf2.chvf2 .woocommerce-message.cl-notice--cart { padding-block: 12px; }
html body.chvf2.chvf2 .cl-notice--cart .cl-notice__i { display: none; }
/* the contact form: the problem list as one box; "sent" (its inline tick gives way to the box's icon) */
html body.chvf2.chvf2 .k-errsum h2 { margin: 0; font-size: 14px; font-weight: 500; line-height: 20px; letter-spacing: 0; }
html body.chvf2.chvf2 .k-errsum ul { margin: 6px 0 0; padding-left: 1.1em; }
html body.chvf2.chvf2 .k-errsum li + li { margin-top: 2px; }
html body.chvf2.chvf2 .cl-cform__ok > svg { display: none; }

/* ======================================================================== 2. the Offer code row */
html body.chvf2 .coupon-error-notice,
html body.chvf2 .cl-coupon-ok {
  margin: 6px 0 0;
  padding: 0;
  color: #FF8B82;
  font-size: 13px;
  line-height: 18px;
  text-align: left;
  overflow-wrap: anywhere; /* review fix: a long code with no spaces ran past the card's edge at 360 px (and off the screen when longer) */
}
html body.chvf2 .cl-coupon-ok { color: #34C28A; }
/* the cart row is a wrapping flex row with a 10 px gap: the line takes its own row, 6 px under the field */
html body.chvf2 .cl-offer-coupon.coupon > :is(.coupon-error-notice, .cl-coupon-ok) { flex: 0 0 100%; margin-top: -4px; }
/* the checkout's form puts its line after an inline field, which already leaves about 8 px of line space under it */
html body.chvf2 form.checkout_coupon .coupon-error-notice { margin-top: 0; }
/* the row sat on the card's bottom edge (the card has no bottom padding once JavaScript hides "Update cart"), so the
   answer would touch it: the card's own side padding under the row (16 px on phones, 24 px on computers) */
html:not(.no-js) body.chvf2 .cm-cart .cl-offer-coupon.coupon { padding-bottom: clamp(16px, 2vw, 24px); }
/* the field while WooCommerce marks it wrong: the kit's field error (checkout and contact fields) */
html body.chvf2 :is(.cl-offer-coupon, form.checkout_coupon) input:is(.has-error, [aria-invalid="true"]) {
  border-color: #FF8B82;
  box-shadow: 0 0 0 1px #FF8B82;
}
@media (prefers-reduced-motion: no-preference) {
  html body.chvf2 .cl-offer-coupon input { transition: border-color .18s ease-out, box-shadow .18s ease-out; }
}
