/* ==========================================================================
   GBV România — toast.css (chunk 3; PORT_MAPPING §5)
   The add-to-cart toast from SiteHeader.dc.html: blue-deep card, bottom
   centre, „Produs adăugat în coș” + „Vezi coșul”. Markup inc/toast.php,
   behaviour assets/js/toast.js; since chunk 5 also the look of WooCommerce's
   success notice after a non-AJAX add (below). Stacking (audit A5): cookie 60 > toast 50 >
   to-top 40 (variables in base.css §0). Token variables only; the mockup's
   literals carry their source. Not loaded on the checkout or My Account;
   on the block cart since B-5b (R2), for its add notice.
   ========================================================================== */
/* One look for the AJAX toast and for WooCommerce's success notice after a
   NON-AJAX add (the product form's POST, a no-JS card link — chunk 5):
   inc/product.php writes the toast's words into the notice with the link
   carrying .gbv-toast__link, and that link is what keys the look; on the
   cart (B-5b, R2) the notice the store-notices block prints after a card's
   add has no link — inc/cart.php puts its words in span.gbv-toast__text,
   which keys the same look; every other .woocommerce-message keeps the
   flow recipe (woocommerce.css §1).
   The ring is the notice's: WooCommerce focuses the first role="alert"
   notice 500 ms after DOMContentLoaded (woocommerce.js
   focus_populate_live_region) and the theme's focus ring (base.css §1)
   drew it — the one edge visible over the navy footer, where the card
   matches the background. Since theme corrections step B (T17, D20) it is
   part of the look, on the toast as on the notice, from the first frame. */
.gbv-toast,
.woocommerce-message:has(.gbv-toast__link, .gbv-toast__text) {
  position: fixed;
  left: 50%;
  bottom: var(--space-6);                               /* 24 px, SiteHeader */
  z-index: var(--z-toast);
  display: flex;
  align-items: center;
  gap: 14px;                                            /* SiteHeader toast */
  box-sizing: border-box;
  max-width: calc(100vw - 2 * var(--gutter));
  padding: 13px 18px;                                   /* SiteHeader toast */
  background: var(--surface-inverse);
  color: var(--text-on-brand);
  border-radius: var(--radius-lg) var(--radius-xs) var(--radius-xs) var(--radius-xs);
  box-shadow: var(--shadow-lg);
  outline: var(--stroke-bold) solid var(--gbv-blue-steel); /* the notice's focus ring as the look (D20), blue-steel in every state — not the site's --ring-color (B-6, item 50) */
  --ring-color: var(--gbv-cream);                       /* a link inside (the notice's „Vezi coșul”) rings cream on the navy card */
  outline-offset: 2px;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  line-height: 1.3;
  white-space: nowrap;
  transform: translate(-50%, 0);
}
.gbv-toast[hidden] {
  display: none;
}
.gbv-toast__link,
.gbv-toast__link:visited {
  color: var(--gbv-orange-peach);
  font-weight: var(--fw-semibold);
  white-space: nowrap;
  text-decoration: underline;
  text-underline-offset: 3px;                           /* SiteHeader toast */
  transition: color var(--motion-base) ease;
}
.gbv-toast__link:hover,
.gbv-toast__link:focus-visible {
  color: var(--color-accent);
}
/* The notice only: WooCommerce's flow box undone. role="alert" stays;
   toast.js hides it after the toast's 3.5 s. Astra's notice padding, icon
   (::before) and clearfix (0,1,x) are out-ranked at 0,2,x. */
.woocommerce-message:has(.gbv-toast__link, .gbv-toast__text) {
  width: max-content;
  margin: 0;
  border: 0;
  animation: gbv-toast-in var(--motion-lift) ease;
}
.woocommerce-message:has(.gbv-toast__link, .gbv-toast__text)::before,
.woocommerce-message:has(.gbv-toast__link, .gbv-toast__text)::after {
  content: none;
}
.woocommerce-message:has(.gbv-toast__link, .gbv-toast__text)[hidden] {
  display: none;
}
/* woocommerce.css §1 colours every link in a WooCommerce message blue
   (0,1,1); inside the toast the link is the toast's peach */
.woocommerce-message:has(.gbv-toast__link) .gbv-toast__link,
.woocommerce-message:has(.gbv-toast__link) .gbv-toast__link:visited {
  color: var(--gbv-orange-peach);
}
.woocommerce-message:has(.gbv-toast__link) .gbv-toast__link:hover,
.woocommerce-message:has(.gbv-toast__link) .gbv-toast__link:focus-visible {
  color: var(--color-accent);
}
/* On the cart the notice sits in the store-notices block before the cart
   block: while it is the toast nothing of that block stays in the flow — no
   margin, no padding — so the cart starts where it starts without a notice
   (Teo's addendum to R2). Any other notice there keeps its place. */
.wc-block-store-notices:has(> .woocommerce-notices-wrapper > .woocommerce-message > .gbv-toast__text),
.woocommerce-notices-wrapper:has(> .woocommerce-message > .gbv-toast__text) {
  margin-top: 0;
  margin-bottom: 0;
  padding-top: 0;
  padding-bottom: 0;
}
/* Where the hidden notice held the focus and the page has no product form
   (the cart), toast.js hands it to the page head's h1 (tabindex="-1"): a
   reading position, not a control — no ring around the heading (base.css
   §1 would draw one the width of the band); the next Tab shows the ring on
   the next control. */
.gbv-page-head__title[tabindex="-1"]:focus {
  outline: none;
}
@keyframes gbv-toast-in {
  from { opacity: 0; transform: translate(-50%, 10px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}
.gbv-toast.is-visible {
  animation: gbv-toast-in var(--motion-lift) ease;
}
@media (prefers-reduced-motion: reduce) {
  .gbv-toast.is-visible,
  .woocommerce-message:has(.gbv-toast__link, .gbv-toast__text) {
    animation: none;
  }
}
