.whatsapp-widget {
  position: fixed;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(var(--whatsapp-bottom-offset, 18px), env(safe-area-inset-bottom));
  z-index: 1200;
  display: grid;
  justify-items: end;
  gap: 12px;
  font-family: "Manrope", Arial, sans-serif;
  pointer-events: none;
}

.whatsapp-card {
  width: min(340px, calc(100vw - 32px));
  padding: 18px;
  border: 1px solid rgba(26, 23, 24, .12);
  border-radius: 8px;
  background: #fff;
  color: #1f1a1d;
  box-shadow: 0 20px 60px rgba(18, 14, 16, .18);
  transform: translateY(10px) scale(.98);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
}

.whatsapp-widget.is-open .whatsapp-card {
  transform: translateY(0) scale(1);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.whatsapp-card-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
}

.whatsapp-kicker {
  margin: 0 0 6px;
  color: #af2c56;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.whatsapp-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.25;
}

.whatsapp-copy {
  margin: 10px 0 14px;
  color: #5f5158;
  font-size: .92rem;
  line-height: 1.55;
}

.whatsapp-close,
.whatsapp-toggle {
  border: 0;
  cursor: pointer;
  font: inherit;
}

.whatsapp-close {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(31, 26, 29, .06);
  color: #1f1a1d;
  font-size: 1.25rem;
  line-height: 1;
}

.whatsapp-close:hover {
  background: rgba(31, 26, 29, .1);
}

.whatsapp-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  width: 100%;
  border-radius: 999px;
  background: #d64779;
  color: #fff;
  font-size: .94rem;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 12px 26px rgba(214, 71, 121, .28);
}

.whatsapp-cta:hover {
  background: #af2c56;
}

.whatsapp-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 52px;
  padding: 0 16px 0 14px;
  border-radius: 999px;
  background: #d64779;
  color: #fff;
  box-shadow: 0 15px 34px rgba(214, 71, 121, .32);
  font-weight: 800;
  pointer-events: auto;
}

.whatsapp-toggle:hover {
  background: #af2c56;
}

.whatsapp-toggle:focus-visible,
.whatsapp-close:focus-visible,
.whatsapp-cta:focus-visible {
  outline: 3px solid rgba(214, 71, 121, .35);
  outline-offset: 3px;
}

.whatsapp-toggle svg {
  width: 26px;
  height: 26px;
  display: block;
  fill: currentColor;
}

.whatsapp-toggle-text {
  font-size: .95rem;
  line-height: 1;
}

.whatsapp-pulse {
  position: absolute;
  top: 5px;
  right: 7px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 0 rgba(255, 255, 255, .72);
  animation: whatsapp-pulse 1.8s ease-out infinite;
}

@keyframes whatsapp-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 255, 255, .72);
  }
  100% {
    box-shadow: 0 0 0 12px rgba(255, 255, 255, 0);
  }
}

@media (max-width: 640px) {
  .whatsapp-widget {
    right: max(14px, env(safe-area-inset-right));
    bottom: max(var(--whatsapp-bottom-offset, 14px), env(safe-area-inset-bottom));
  }

  .whatsapp-widget.has-cookie-banner {
    display: none;
  }

  .whatsapp-card {
    width: min(330px, calc(100vw - 28px));
    padding: 16px;
  }

  .whatsapp-toggle {
    width: 52px;
    min-height: 52px;
    padding: 0;
    justify-content: center;
  }

  .whatsapp-toggle-text {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .whatsapp-toggle svg {
    width: 25px;
    height: 25px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .whatsapp-card,
  .whatsapp-pulse {
    transition: none;
    animation: none;
  }
}
