/* Floating WhatsApp button.
 *
 * Shared by index.html and elevating-spaces.html, so it carries no
 * dependency on either page's variables or fonts. The number lives in the
 * href on each page, not here.
 *
 * z-index 900 is deliberate: above the theme's side rail (10) and the
 * Elevating Spaces sticky header (50), but below the contact modal (999)
 * so the modal still covers it.
 */

.wa-float {
  position: fixed; right: 24px; bottom: 24px; z-index: 900;
  display: flex; align-items: center; gap: 10px;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.wa-float-dot {
  position: relative;
  flex: none;
  width: 58px; height: 58px;
  display: grid; place-items: center;
  background: #25d366; color: #fff;
  border-radius: 50%;
  box-shadow: 0 10px 26px -8px rgba(37, 211, 102, .65),
              0 4px 10px -4px rgba(0, 0, 0, .3);
  transition: transform .25s ease, box-shadow .25s ease, background .2s ease;
}
.wa-float-dot svg { width: 30px; height: 30px; display: block; }

.wa-float-label {
  order: -1;                       /* sits to the left of the circle */
  white-space: nowrap;
  background: #fff; color: #2c2c2c;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 14px; line-height: 1.2;
  padding: 9px 14px; border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, .08);
  box-shadow: 0 8px 20px -12px rgba(0, 0, 0, .5);
  opacity: 0; transform: translateX(8px);
  transition: opacity .25s ease, transform .25s ease;
  pointer-events: none;
}

.wa-float:hover .wa-float-dot,
.wa-float:focus-visible .wa-float-dot {
  background: #1ebe5a;
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 16px 32px -10px rgba(37, 211, 102, .7),
              0 6px 14px -6px rgba(0, 0, 0, .35);
}
.wa-float:hover .wa-float-label,
.wa-float:focus-visible .wa-float-label {
  opacity: 1; transform: translateX(0);
}

.wa-float:focus-visible {
  outline: 2px solid #25d366;
  outline-offset: 4px;
  border-radius: 999px;
}

/* A quiet pulse that runs three times and then stops, rather than
   animating for as long as the page is open. */
.wa-float-dot::after {
  content: "";
  position: absolute;
  width: 58px; height: 58px; border-radius: 50%;
  border: 2px solid rgba(37, 211, 102, .55);
  animation: wa-float-pulse 2.6s ease-out 3;
  pointer-events: none;
}
@keyframes wa-float-pulse {
  0%   { transform: scale(1);    opacity: .7; }
  70%  { transform: scale(1.55); opacity: 0; }
  100% { transform: scale(1.55); opacity: 0; }
}

@media (max-width: 767px) {
  .wa-float { right: 16px; bottom: 16px; }
  .wa-float-dot { width: 52px; height: 52px; }
  .wa-float-dot svg { width: 27px; height: 27px; }
  .wa-float-dot::after { width: 52px; height: 52px; }
  .wa-float-label { display: none; }   /* no hover on touch, so no tooltip */
}

@media (prefers-reduced-motion: reduce) {
  .wa-float-dot, .wa-float-label { transition: none; }
  .wa-float:hover .wa-float-dot { transform: none; }
  .wa-float-dot::after { animation: none; display: none; }
}
