/* WhatsApp mark, fill-less so consumers colour it via a mask — the WhatsApp button plus the
   chat-group and lexxy channel indicators. Global so any of them can reach it. */
:root {
  --glyph-whatsapp: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3E%3Cpath%20d='M17.472%2014.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94%201.165-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.019-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.611-.916-2.206-.242-.58-.487-.501-.669-.51l-.57-.01c-.198%200-.52.074-.792.372-.272.297-1.04%201.016-1.04%202.479%200%201.462%201.065%202.875%201.213%203.074.149.198%202.096%203.2%205.077%204.487.709.306%201.262.489%201.694.626.712.226%201.36.194%201.872.118.571-.085%201.758-.719%202.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421%207.403h-.004a9.87%209.87%200%2001-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86%209.86%200%2001-1.51-5.26c.001-5.45%204.436-9.884%209.888-9.884%202.64%200%205.122%201.03%206.988%202.898a9.825%209.825%200%20012.893%206.994c-.003%205.45-4.437%209.884-9.885%209.884m8.413-18.297A11.815%2011.815%200%200012.05%200C5.495%200%20.16%205.335.157%2011.892c0%202.096.547%204.142%201.588%205.945L.057%2024l6.305-1.654a11.882%2011.882%200%20005.683%201.448h.005c6.554%200%2011.89-5.335%2011.893-11.893a11.821%2011.821%200%2000-3.48-8.413z'/%3E%3C/svg%3E");
}

@layer components {
  /* A .btn that reads as WhatsApp — its brand green plus the WhatsApp glyph. Used on the public
     "join the group" link and the admin "set up" action. */
  .btn--whatsapp,
  .btn--whatsapp-group-join {
    --btn-bg: var(--color-whatsapp);
    --btn-border: var(--color-whatsapp);
    --btn-color: oklch(1 0 0);
  }

  /* The glyph is a decorative ::before, drawn as a mask over the button's own colour — CSS, so
     it survives Action Text's content sanitizer (an inline <svg> in body content would be
     stripped) and needs no markup. The .btn's gap spaces it from the label. */
  .btn--whatsapp::before,
  .btn--whatsapp-group-join::before {
    content: "";
    inline-size: 1.15em;
    block-size: 1.15em;
    flex: none;
    background-color: currentColor;
    -webkit-mask: var(--glyph-whatsapp) center / contain no-repeat;
    mask: var(--glyph-whatsapp) center / contain no-repeat;
  }
}
