.savio-whatsapp-button {
  position: fixed;
  right: max(20px, env(safe-area-inset-right, 0px));
  bottom: max(20px, env(safe-area-inset-bottom, 0px));
  z-index: 9999;
  display: grid;
  width: 64px;
  height: 64px;
  min-width: 64px;
  min-height: 64px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: #25d366;
  color: #ffffff;
  box-shadow: 0 8px 24px rgba(7, 47, 27, 0.28);
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.savio-whatsapp-button:hover {
  background: #1fbd5b;
  box-shadow: 0 10px 28px rgba(7, 47, 27, 0.34);
  transform: scale(1.04);
}

.savio-whatsapp-button:focus-visible {
  outline: 3px solid #ffffff;
  outline-offset: 3px;
  box-shadow: 0 0 0 6px #128c4b, 0 8px 24px rgba(7, 47, 27, 0.28);
}

.savio-whatsapp-button__icon {
  display: block;
  width: 35px;
  height: 35px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.savio-whatsapp-button__bubble {
  position: absolute;
  right: calc(100% + 9px);
  bottom: 0;
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  padding: 10px 15px;
  border-radius: 12px;
  background: #ffffff;
  color: #241d28;
  box-shadow: 0 4px 18px rgba(28, 20, 32, 0.17);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}

.savio-whatsapp-button__bubble::after {
  position: absolute;
  right: -5px;
  bottom: 16px;
  width: 10px;
  height: 10px;
  background: #ffffff;
  content: "";
  transform: rotate(45deg);
}

body:has(.savio-chatgpt-consent:not([hidden])) .savio-whatsapp-button {
  bottom: max(336px, 50vh);
}

@media (max-width: 767px) {
  .savio-whatsapp-button {
    right: max(14px, env(safe-area-inset-right, 0px));
    bottom: max(14px, env(safe-area-inset-bottom, 0px));
    width: 60px;
    height: 60px;
    min-width: 60px;
    min-height: 60px;
  }

  body:has(.savio-chatgpt-consent:not([hidden])) .savio-whatsapp-button {
    bottom: max(336px, 50vh);
  }

  .savio-whatsapp-button__icon {
    width: 33px;
    height: 33px;
  }

  .savio-whatsapp-button__bubble {
    right: calc(100% + 9px);
    bottom: 0;
    min-height: 42px;
    padding: 9px 13px;
    font-size: 14px;
  }

  .savio-whatsapp-button__bubble::after {
    bottom: 15px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .savio-whatsapp-button,
  .savio-whatsapp-button:hover {
    transition: none;
    transform: none;
  }
}
