/* Componente compartilhado: Home, páginas internas e página de erro. */
.floating-whatsapp.whatsapp-button {
  position: fixed;
  right: calc(20px + env(safe-area-inset-right, 0px));
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  z-index: 1000;
  isolation: isolate;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 50px;
  height: 50px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: #44a01c;
  box-shadow: 0 4px 18px #092e3833;
  text-decoration: none;
  transition: background-color .3s ease;
}
.floating-whatsapp > .whatsapp-icon {
  display: block;
  width: 25px;
  height: 25px;
  flex-shrink: 0;
  background: currentColor;
  -webkit-mask: url('../imagens/whats.svg') center / contain no-repeat;
  mask: url('../imagens/whats.svg') center / contain no-repeat;
}
.floating-whatsapp > span:not(.whatsapp-icon) { display: none; }
.floating-whatsapp.whatsapp-button:hover,
.floating-whatsapp.whatsapp-button:focus-visible { background: #86e25e; color: #fff; box-shadow: 0 4px 18px #092e3833; }
.floating-whatsapp:focus-visible { outline: 3px solid #F8BD18; outline-offset: 5px; }
.floating-whatsapp::before, .floating-whatsapp::after {
  content: '';
  position: absolute;
  z-index: -1;
  inset: -10px;
  opacity: 0;
  border: 4px solid #44a01c;
  border-radius: 50%;
  pointer-events: none;
  animation: floating-whatsapp-pulse 1.5s ease infinite paused;
}
.floating-whatsapp::after { animation-delay: .5s; }
.floating-whatsapp--active::before, .floating-whatsapp--active::after { animation-play-state: running; }
.floating-whatsapp:hover::before, .floating-whatsapp:hover::after,
.floating-whatsapp:focus-visible::before, .floating-whatsapp:focus-visible::after { border-color: #86e25e; }
.floating-whatsapp[hidden], body.menu-open .floating-whatsapp,
body:has(dialog[open]) .floating-whatsapp { display: none; }
@keyframes floating-whatsapp-pulse {
  0% { transform: scale(.5); opacity: 0; }
  50% { opacity: 1; }
  100% { transform: scale(1.2); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .floating-whatsapp { transition: none; }
  .floating-whatsapp::before, .floating-whatsapp::after { animation: none; }
}
@media (forced-colors: active) {
  .floating-whatsapp.whatsapp-button { border: 2px solid ButtonText; background: ButtonFace; color: ButtonText; }
  .floating-whatsapp::before, .floating-whatsapp::after { display: none; }
}
