.whatsapp-widget {
  position: fixed;
  right: max(18px, env(safe-area-inset-right, 0px));
  bottom: max(18px, env(safe-area-inset-bottom, 0px));
  z-index: 1000;
  font-family: inherit;
}

.whatsapp-trigger {
  display: grid;
  width: 56px;
  height: 56px;
  place-items: center;
  padding: 0;
  color: #fff;
  background: #25d366;
  border: 1px solid rgba(255, 255, 255, .74);
  border-radius: 50%;
  box-shadow: 0 8px 22px rgba(37, 211, 102, .25), 0 2px 6px rgba(11, 43, 78, .12);
  cursor: pointer;
  transition: transform .18s ease, background-color .18s ease, box-shadow .18s ease;
}

.whatsapp-trigger:hover {
  transform: translateY(-2px);
  background: #20bd5a;
  box-shadow: 0 10px 26px rgba(37, 211, 102, .3), 0 2px 6px rgba(11, 43, 78, .12);
}

.whatsapp-trigger:focus-visible,
.whatsapp-card__close:focus-visible,
.whatsapp-card__link:focus-visible {
  outline: 3px solid #82b9ff;
  outline-offset: 3px;
}

.whatsapp-trigger svg { width: 31px; height: 31px; fill: currentColor; }

.whatsapp-card {
  position: absolute;
  right: 0;
  bottom: calc(100% + 15px);
  width: min(286px, calc(100vw - 36px));
  overflow: hidden;
  color: #26384c;
  background: #fff;
  border: 1px solid #e2eaf3;
  border-radius: 16px;
  box-shadow: 0 18px 42px rgba(18, 48, 82, .16), 0 2px 8px rgba(18, 48, 82, .05);
  animation: whatsapp-card-in .2s ease-out both;
}

.whatsapp-card[hidden] { display: none; }

.whatsapp-card__header {
  display: flex;
  min-height: 43px;
  align-items: center;
  gap: 8px;
  padding: 0 11px 0 14px;
  color: #fff;
  background: linear-gradient(135deg, #25c866, #19b957);
}

.whatsapp-card__status {
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  background: #eafff1;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, .16);
}

.whatsapp-card__header h2 {
  margin: 0;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: -.01em;
}

.whatsapp-card__close {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  margin-left: auto;
  padding: 0;
  color: rgba(255, 255, 255, .94);
  background: transparent;
  border: 0;
  border-radius: 8px;
  font: inherit;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.whatsapp-card__close:hover { background: rgba(255, 255, 255, .16); color: #fff; }

.whatsapp-card__body { padding: 13px 14px 14px; }

.whatsapp-card__body p {
  margin: 0 0 12px;
  color: #586d83;
  font-size: 12px;
  line-height: 1.55;
}

.whatsapp-card__link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #0e7135;
  font-size: 11px;
  font-weight: 650;
  text-decoration: none;
  text-underline-offset: 3px;
  transition: color .18s ease;
}

.whatsapp-card__link .icon-arrow { width: 13px; height: 13px; }
.whatsapp-card__link:hover { color: #0e7135; text-decoration: underline; }
.whatsapp-card__link:hover .icon-arrow--external { transform: translate(1px, -1px); }

.whatsapp-card__note {
  display: block;
  margin-top: 11px;
  color: #526781;
  font-size: 10px;
}

@keyframes whatsapp-card-in {
  from { opacity: 0; transform: translateY(7px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 520px) {
  .whatsapp-widget { right: max(16px, env(safe-area-inset-right, 0px)); bottom: max(16px, env(safe-area-inset-bottom, 0px)); }
  .whatsapp-trigger { width: 52px; height: 52px; }
  .whatsapp-trigger svg { width: 27px; height: 27px; }
  .whatsapp-card { width: min(286px, calc(100vw - 32px)); bottom: calc(100% + 12px); }
}

@media (prefers-reduced-motion: reduce) {
  .whatsapp-card { animation: none; }
  .whatsapp-trigger, .whatsapp-card__link { transition: none; }
}


