/* whatsapp-kit.css (v2, 2026-10-21): 3D social coins (Facebook, WhatsApp, Instagram, X, LinkedIn, YouTube), the floating WhatsApp coin and its chat panel.
   One folder, no external requests. Markup: snippet.html. Behaviour: whatsapp-kit.js. Guide: README.md.

   Z-INDEX SCALE (documented; change a number only here or on :root)
     0-49   page content, headers, page menus
     50     --wa-z-fab    floating coin (above page content; page overlays at 55 and up cover it and the script hides it anyway)
     80     --wa-z-scrim  dim layer behind the chat panel
     81     --wa-z-panel  chat panel (top of the kit)
   Pages keep loaders and cookie bars above 90.

   TOKENS (all on :root; a page overrides any of them in its own CSS, never by editing this file)
     --wa-size, --wa-gap   floating coin size and its distance from the screen edges (phones: 58 px, 16 px)
     --wa-clear            room a page keeps under its last footer line: size + gap (same name as the old wa-float)
     --wa-lift             how far the coin rises while a link, button or field sits under its corner: size + 16 px (phones: bottom 16 px to 90 px)
     --wa-coin             social coin size (48 px)
     --wa-ink, --wa-muted, --wa-line, --wa-paper, --wa-wash     text, quiet text, borders, panel ground, greeting ground
     --wa-btn-bg, --wa-btn-fg, --wa-btn-hover                   the "Send on WhatsApp" button
     --wa-ring, --wa-ring-gap    focus ring and the gap ring under it (visible on light and dark grounds)
     --wa-radius           the one corner radius (panel 16 px; inner boxes use this minus 4 px)
     --wa-font             type stack (the page's own font-face is used when it loads one) */
:root {
  --wa-size: 64px; --wa-gap: 24px; --wa-clear: calc(var(--wa-size) + var(--wa-gap)); --wa-lift: calc(var(--wa-size) + 16px); --wa-coin: 48px;
  --wa-ink: #141318; --wa-muted: #55535C; --wa-line: #E4E4E8; --wa-paper: #FFFFFF; --wa-wash: #F4F4F6;
  --wa-btn-bg: #141318; --wa-btn-fg: #FFFFFF; --wa-btn-hover: #2A2833;
  --wa-ring: #141318; --wa-ring-gap: #FFFFFF;
  --wa-radius: 16px; --wa-font: Tonnelier, "Segoe UI", system-ui, sans-serif;
  --wa-z-fab: 50; --wa-z-scrim: 80; --wa-z-panel: 81;
}
@media (max-width: 767px) { :root { --wa-size: 58px; --wa-gap: 16px; } }

/* ---------- the coin (shared by the social coins and the floating coin) ----------
   Layers, back to front: tinted soft shadow (::before), face with bevel rim and top light (::after), white glyph.
   Per-network colour: --hi (top light), --c (body), --lo (edge). The lightest stop keeps 4.5:1 or better under the white glyph. */
.wa-coin, .wa-fab {
  --hi: #12835B; --c: #0B6E4C; --lo: #075A3C;
  position: relative; isolation: isolate; display: inline-grid; place-items: center; box-sizing: border-box; padding: 0; border: 0; border-radius: 50%;
  background: none; color: #FFFFFF; text-decoration: none; cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: transform .22s cubic-bezier(.22, 1, .36, 1);
}
.wa-coin::before, .wa-fab::before { /* soft shadow, tinted by the coin colour */
  content: ""; position: absolute; z-index: -2; inset: 7px 4px -6px; border-radius: 50%; background: color-mix(in srgb, var(--c) 60%, transparent);
  filter: blur(7px); opacity: .55; transition: opacity .22s ease;
}
.wa-coin::after, .wa-fab::after { /* face: top light, body gradient, bevel rim */
  content: ""; position: absolute; z-index: -1; inset: 0; border-radius: 50%;
  background: radial-gradient(70% 48% at 50% 16%, rgba(255, 255, 255, .34), rgba(255, 255, 255, 0) 100%),
              radial-gradient(circle at 32% 24%, var(--hi) 0%, var(--c) 58%, var(--lo) 100%);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .30), inset 0 0 0 3.5px rgba(0, 0, 0, .14), inset 0 -4px 6px rgba(0, 0, 0, .26), inset 0 3px 3px rgba(255, 255, 255, .38);
}
.wa-coin svg, .wa-fab > svg { position: relative; display: block; fill: currentColor; filter: drop-shadow(0 1px 0 rgba(0, 0, 0, .32)); }
.wa-coin { width: var(--wa-coin); height: var(--wa-coin); }
.wa-coin svg { width: 46%; height: 46%; }
.wa-coin:focus-visible, .wa-fab:focus-visible { outline: 2px solid var(--wa-ring); outline-offset: 2px; box-shadow: 0 0 0 2px var(--wa-ring-gap); }
@media (hover: hover) {
  .wa-coin:hover, .wa-fab:hover { transform: translateY(-3px); }
  .wa-coin:hover::before, .wa-fab:hover::before { opacity: .9; }
}
.wa-coin, .wa-coin:hover, .wa-coin:focus-visible { color: #FFFFFF; } /* beats a page rule such as a:hover { color } */
.wa-coin--whatsapp  { --hi: #12835B; --c: #0B6E4C; --lo: #075A3C; }
.wa-coin--facebook  { --hi: #0866FF; --c: #0B52C9; --lo: #073E99; }
.wa-coin--instagram { --hi: #D6246E; --c: #B82468; --lo: #7A2A9E; }
.wa-coin--youtube   { --hi: #E10000; --c: #C40000; --lo: #8E0000; }
.wa-coin--linkedin  { --hi: #0A66C2; --c: #0A5AAA; --lo: #07407A; }
.wa-coin--x         { --hi: #2A2833; --c: #141318; --lo: #000000; }

/* the row the script fills: <div data-wa-coins> */
.wa-coins { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.wa-coins:empty { display: none; }

/* ---------- the floating coin ---------- */
.wa-fab {
  position: fixed; z-index: var(--wa-z-fab); width: var(--wa-size); height: var(--wa-size);
  right: calc(var(--wa-gap) + env(safe-area-inset-right, 0px)); bottom: calc(var(--wa-gap) + env(safe-area-inset-bottom, 0px));
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .4s ease, visibility 0s linear .4s, transform .22s cubic-bezier(.22, 1, .36, 1), translate .3s cubic-bezier(.22, 1, .36, 1);
}
.wa-fab > svg { width: 50%; height: 50%; }
html.wa-on:not(.wa-open) .wa-fab { opacity: 1; visibility: visible; pointer-events: auto; transition-delay: 0s; }
html.wa-lift .wa-fab { translate: 0 calc(-1 * var(--wa-lift)); } /* a control sits under the coin's corner: the coin moves up instead of hiding */
html.wa-light .wa-fab::after { box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .30), inset 0 0 0 3.5px rgba(0, 0, 0, .14), inset 0 -4px 6px rgba(0, 0, 0, .26), inset 0 3px 3px rgba(255, 255, 255, .38), 0 0 0 2px rgba(255, 255, 255, .92); }
html.wa-light .wa-fab::before { background: rgba(255, 255, 255, .55); }
/* two ring pulses, started once by the script a few seconds after the coin first appears, then still */
.wa-fab__ring { position: absolute; z-index: -1; inset: 0; border-radius: 50%; border: 2px solid var(--hi); opacity: 0; pointer-events: none; }
@keyframes wa-pulse { from { opacity: .7; transform: scale(1); } to { opacity: 0; transform: scale(1.6); } }
.wa-fab.is-pulsing .wa-fab__ring { animation: wa-pulse 1.4s ease-out 2 both; }
html.wa-light .wa-fab__ring { border-color: #FFFFFF; }
/* slide-out label: on hover and keyboard focus */
.wa-fab__tip {
  position: absolute; top: 50%; right: calc(100% + 10px); display: flex; align-items: center; box-sizing: border-box; height: 40px; margin-top: -20px; padding: 0 16px;
  white-space: nowrap; background: var(--wa-paper); color: var(--wa-ink); border: 1px solid var(--wa-line); border-radius: calc(var(--wa-radius) - 4px);
  font: 600 15px/1 var(--wa-font); box-shadow: 0 8px 24px rgba(20, 19, 24, .18);
  opacity: 0; transform: translateX(12px); pointer-events: none; transition: opacity .2s ease, transform .26s cubic-bezier(.22, 1, .36, 1);
}
.wa-fab:focus-visible .wa-fab__tip { opacity: 1; transform: none; }
@media (hover: hover) { .wa-fab:hover .wa-fab__tip { opacity: 1; transform: none; } }

/* ---------- the chat panel ---------- */
.wa-scrim { position: fixed; inset: 0; z-index: var(--wa-z-scrim); background: rgba(20, 19, 24, .35); opacity: 0; transition: opacity .25s ease; }
.wa-scrim.is-open { opacity: 1; }
.wa-panel {
  position: fixed; z-index: var(--wa-z-panel); display: flex; flex-direction: column; box-sizing: border-box; width: min(360px, calc(100vw - 2 * var(--wa-gap)));
  right: calc(var(--wa-gap) + env(safe-area-inset-right, 0px)); bottom: calc(var(--wa-gap) + var(--wa-size) + 12px + env(safe-area-inset-bottom, 0px));
  max-height: calc(100vh - var(--wa-gap) - var(--wa-size) - 36px); max-height: calc(100dvh - var(--wa-gap) - var(--wa-size) - 36px); overflow-y: auto;
  background: var(--wa-paper); color: var(--wa-ink); border: 1px solid var(--wa-line); border-radius: var(--wa-radius); box-shadow: 0 24px 64px rgba(20, 19, 24, .28);
  font: 400 16px/1.45 var(--wa-font); opacity: 0; transform: translateY(12px); transition: opacity .22s ease, transform .28s cubic-bezier(.22, 1, .36, 1);
}
.wa-panel[hidden], .wa-scrim[hidden] { display: none; }
.wa-scrim:not(.is-open), .wa-panel:not(.is-open) { pointer-events: none; } /* while fading out they must not count as covering the coin */
.wa-panel.is-open { opacity: 1; transform: none; }
.wa-panel:focus { outline: none; }
.wa-panel__head { display: flex; align-items: center; gap: 12px; padding: 14px 14px 14px 16px; border-bottom: 1px solid var(--wa-line); }
.wa-panel__logo { display: block; width: 40px; height: auto; flex: 0 0 40px; }
.wa-panel__who { flex: 1 1 auto; min-width: 0; }
.wa-panel__name { display: block; font-size: 18px; font-weight: 600; line-height: 1.2; }
.wa-panel__reply { margin: 2px 0 0; font-size: 13px; line-height: 1.3; color: var(--wa-muted); }
.wa-panel__reply[hidden] { display: none; }
.wa-panel__close {
  display: grid; place-items: center; flex: 0 0 44px; width: 44px; height: 44px; padding: 0; border: 1px solid var(--wa-line); border-radius: calc(var(--wa-radius) - 4px);
  background: transparent; color: var(--wa-ink); cursor: pointer; font-size: 24px; line-height: 1;
}
.wa-panel__close:hover { background: var(--wa-wash); }
.wa-panel__body { padding: 16px; }
.wa-panel__greeting { margin: 0; padding: 12px 14px; background: var(--wa-wash); border-radius: calc(var(--wa-radius) - 4px); }
.wa-panel__label { display: block; margin: 16px 0 6px; font-size: 14px; font-weight: 600; }
.wa-panel__text {
  display: block; box-sizing: border-box; width: 100%; min-height: 96px; margin: 0; padding: 12px 14px; resize: vertical;
  border: 1px solid var(--wa-line); border-radius: calc(var(--wa-radius) - 4px); background: var(--wa-paper); color: var(--wa-ink); font: inherit; font-size: 16px;
}
.wa-panel__text:hover { border-color: var(--wa-ink); }
.wa-panel__send {
  display: flex; align-items: center; justify-content: center; gap: 10px; box-sizing: border-box; min-height: 48px; margin-top: 12px; padding: 12px 20px;
  background: var(--wa-btn-bg); color: var(--wa-btn-fg); border-radius: calc(var(--wa-radius) - 4px); text-decoration: none; font-size: 17px; font-weight: 600; line-height: 1.2;
}
.wa-panel__send:hover { background: var(--wa-btn-hover); color: var(--wa-btn-fg); }
.wa-panel__send svg { width: 20px; height: 20px; flex: 0 0 20px; fill: currentColor; }
.wa-panel :focus-visible { outline: 2px solid var(--wa-ring); outline-offset: 2px; }
.wa-panel__send:focus-visible { box-shadow: 0 0 0 2px var(--wa-ring-gap); }

/* phones: the panel is a full-width bottom sheet */
@media (max-width: 767px) {
  .wa-panel { /* --wa-kb: height hidden under the on-screen keyboard (whatsapp-kit.js), so the sheet and its text box stay above it */
    left: 0; right: 0; bottom: var(--wa-kb, 0px); width: auto; max-height: calc(88vh - var(--wa-kb, 0px)); max-height: calc(88dvh - var(--wa-kb, 0px));
    border-width: 1px 0 0; border-radius: var(--wa-radius) var(--wa-radius) 0 0;
    padding-bottom: env(safe-area-inset-bottom, 0px); transform: translateY(24px);
  }
}
@media (prefers-reduced-motion: reduce) {
  .wa-coin, .wa-fab, .wa-fab__tip, .wa-panel, .wa-scrim, .wa-coin::before, .wa-fab::before { transition: none !important; animation: none !important; }
  .wa-fab__ring { display: none; }
  .wa-coin:hover, .wa-fab:hover { transform: none; }
  .wa-panel, .wa-panel.is-open { transform: none; }
}
@media print { .wa-kit, .wa-coins { display: none; } }
