/* WhatsApp on the wine page ([fw_whatsapp] inside .fw-buybar).
   Phones: a square button next to Add to cart in the sticky bar; the full line when the wine is sold out.
   Desktop: a quiet line under Add to cart. The only green on the site is the WhatsApp mark, so it is recognised at a glance. */
.fw-buybar.brxe-block { display: flex; flex-direction: row; flex-wrap: nowrap; align-items: stretch; gap: 1rem; }
.fw-buybar.brxe-block:not(:has(form.cart)):has(.fw-wa) { display: flex; }
.fw-buybar .brxe-shortcode { display: flex; flex: 0 0 auto; width: auto; }
.fw-buybar .fw-atc { flex: 1 1 auto; min-width: 0; }

.fw-wa { display: flex; align-items: center; gap: 1.2rem; min-height: 4.8rem; color: var(--ink); text-decoration: none; background: var(--cream); border: 1px solid var(--brass); transition: border-color .15s ease, background-color .15s ease; }
.fw-wa:hover { border-color: var(--bordeaux); background: var(--parchment); }
.fw-wa:focus-visible { outline: 2px solid var(--bordeaux); outline-offset: 2px; }
.fw-wa-icon { flex: 0 0 auto; display: grid; place-items: center; width: 3.2rem; height: 3.2rem; border-radius: 50%; background: #25d366; }
.fw-wa-icon svg { width: 2rem; height: 2rem; fill: #fff; }
.fw-wa-text { display: flex; flex-direction: column; line-height: 1.25; }
.fw-wa-label { font-family: Spectral, Georgia, serif; font-size: 1.7rem; font-weight: 500; }
.fw-wa-sub { font-size: 1.3rem; color: var(--muted); }

/* Phones, wine in stock: icon only, text kept for screen readers. */
.fw-buybar:has(form.cart) .fw-wa { justify-content: center; width: 4.8rem; height: 100%; padding: 0; }
.fw-buybar:has(form.cart) .fw-wa-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* Phones, sold out: the full line fills the bar. */
.fw-buybar:not(:has(form.cart)) .brxe-shortcode, .fw-buybar:not(:has(form.cart)) .fw-wa { flex: 1 1 auto; }
.fw-buybar:not(:has(form.cart)) .fw-wa { padding: .7rem 1.4rem .7rem .8rem; }

@media (min-width: 768px) {
  .fw-buybar.brxe-block { flex-direction: column; gap: 1.2rem; }
  .fw-buybar .brxe-shortcode { order: 2; width: 100%; }
  .fw-buybar .fw-wa, .fw-buybar:has(form.cart) .fw-wa { justify-content: flex-start; width: 100%; max-width: 42rem; padding: .9rem 1.6rem .9rem 1rem; }
  .fw-buybar:has(form.cart) .fw-wa-text { position: static; width: auto; height: auto; overflow: visible; clip: auto; white-space: normal; }
  .fw-wa-icon { width: 3.6rem; height: 3.6rem; }
  .fw-wa-icon svg { width: 2.2rem; height: 2.2rem; }
}

@media (prefers-reduced-motion: reduce) {
  .fw-wa { transition: none; }
}
