/* WhatsApp chat widget */

.wa-widget {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  z-index: 1050;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

@media (min-width: 576px) {
  .wa-widget {
    bottom: 1.5rem;
    right: 1.5rem;
    gap: 0.65rem;
  }
}

.wa-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2fdb6d, #20b358);
  box-shadow: 0 8px 20px rgba(22, 163, 74, 0.24);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.wa-btn:hover {
  transform: scale(1.06);
  box-shadow: 0 10px 24px rgba(22, 163, 74, 0.32);
}

.wa-btn.is-offline {
  background: linear-gradient(135deg, #a8afb8, #8b929c);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.wa-btn.is-offline:hover {
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
}

@media (min-width: 576px) {
  .wa-btn {
    width: 46px;
    height: 46px;
  }
}

.wa-ping {
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 2px solid #22c55e;
  animation: wa-ping 1.8s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.wa-btn.is-offline .wa-ping {
  display: none;
}

@keyframes wa-ping {
  0% {
    transform: scale(1);
    opacity: 0.7;
  }
  75%, 100% {
    transform: scale(1.6);
    opacity: 0;
  }
}

.wa-hover-pill {
  display: none;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  border-radius: 999px;
  padding: 0.2rem 0.55rem 0.2rem 0.4rem;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.13);
  opacity: 0;
  transform: translateX(6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

@media (min-width: 576px) {
  .wa-hover-pill {
    display: inline-flex;
  }
}

.wa-widget:hover .wa-hover-pill {
  opacity: 1;
  transform: translateX(0);
}

.wa-pill-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.wa-hover-pill.is-online,
.wa-pill.is-online {
  background: #e7f9ee;
  color: #15803d;
}

.wa-hover-pill.is-online .wa-pill-dot,
.wa-pill.is-online .wa-pill-dot {
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.18);
}

.wa-hover-pill.is-offline,
.wa-pill.is-offline {
  background: #f1f2f4;
  color: #6b7280;
}

.wa-hover-pill.is-offline .wa-pill-dot,
.wa-pill.is-offline .wa-pill-dot {
  background: #9ca3af;
}

.wa-bubble {
  position: absolute;
  bottom: 54px;
  right: 0;
  width: 220px;
  background: #fff;
  border-radius: 12px;
  padding: 10px 12px 12px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

@media (max-width: 420px) {
  .wa-bubble {
    width: calc(100vw - 32px);
  }
}

.wa-bubble.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.wa-bubble-close {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: #f1f2f4;
  color: #6b7280;
  font-size: 0.7rem;
  line-height: 1;
  padding: 0;
}

.wa-bubble-head {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
  padding-right: 14px;
}

.wa-bubble-icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #25d366;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.wa-bubble-title {
  flex: 1;
  font-size: 0.75rem;
  font-weight: 700;
  color: #111827;
}

.wa-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  border-radius: 999px;
  padding: 0.15rem 0.45rem 0.15rem 0.35rem;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.wa-bubble-text {
  margin: 0 0 8px;
  font-size: 0.72rem;
  line-height: 1.4;
  color: #6b7280;
}

.wa-bubble-cta {
  display: block;
  border-radius: 8px;
  background: #25d366;
  padding: 7px 10px;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  transition: background-color 0.15s ease;
}

.wa-bubble-cta:hover {
  background: #1fb356;
  color: #fff;
}

.wa-bubble-tail {
  position: absolute;
  bottom: -5px;
  right: 22px;
  width: 10px;
  height: 10px;
  background: #fff;
  transform: rotate(45deg);
  border-radius: 0 0 3px 0;
}
