/* Modern Vanilla WhatsApp Widget - G-Consulting SXM */
.wa-widget-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 99999;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* Floating WhatsApp Button */
.wa-widget-btn {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: #25D366;
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.4), 0 2px 6px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  outline: none;
  position: relative;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.wa-widget-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.55), 0 3px 8px rgba(0, 0, 0, 0.2);
}

.wa-widget-btn:active {
  transform: scale(0.96);
}

.wa-widget-btn svg {
  width: 36px;
  height: 36px;
  fill: #ffffff;
  pointer-events: none;
}

/* Pulsing notification badge */
.wa-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 20px;
  height: 20px;
  background: #ff3b30;
  color: #fff;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  animation: wa-pulse 2s infinite;
}

@keyframes wa-pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

/* Chat Card Window */
.wa-card {
  position: absolute;
  bottom: 76px;
  right: 0;
  width: 340px;
  max-width: calc(100vw - 32px);
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.22), 0 2px 10px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px) scale(0.95);
  transform-origin: bottom right;
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.25s;
}

.wa-card.wa-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

/* Card Header */
.wa-header {
  background: #075E54;
  color: #fff;
  padding: 16px 16px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

.wa-profile {
  display: flex;
  align-items: center;
  gap: 12px;
}

.wa-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.85);
  background: #128C7E;
}

.wa-info h4 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.25;
  color: #fff;
}

.wa-info p {
  margin: 2px 0 0;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.82);
  display: flex;
  align-items: center;
  gap: 5px;
}

.wa-status-dot {
  width: 8px;
  height: 8px;
  background: #25D366;
  border-radius: 50%;
  display: inline-block;
}

.wa-close-btn {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.8);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s, background 0.15s;
}

.wa-close-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.15);
}

/* Chat Body */
.wa-body {
  background: #ECE5DD url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="80" height="80" opacity="0.04"><path d="M20 20h40v40H20z" fill="%23000"/></svg>');
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 320px;
  overflow-y: auto;
}

/* Chat Message Bubble */
.wa-msg {
  background: #fff;
  border-radius: 0 12px 12px 12px;
  padding: 10px 12px;
  max-width: 90%;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
  font-size: 13.5px;
  line-height: 1.45;
  color: #222;
  position: relative;
}

.wa-msg::before {
  content: "";
  position: absolute;
  top: 0;
  left: -8px;
  width: 0;
  height: 0;
  border-top: 8px solid #fff;
  border-left: 8px solid transparent;
}

.wa-time {
  display: block;
  font-size: 10.5px;
  color: #888;
  text-align: right;
  margin-top: 4px;
}

/* Quick chips */
.wa-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.wa-chip {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #d2c8be;
  border-radius: 14px;
  padding: 5px 10px;
  font-size: 11.5px;
  color: #075E54;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.wa-chip:hover {
  background: #075E54;
  color: #fff;
  border-color: #075E54;
}

/* Chat Input Footer */
.wa-footer {
  background: #F0F2F5;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-top: 1px solid #e0e0e0;
}

.wa-input {
  flex: 1;
  border: 1px solid #dcdcdc;
  border-radius: 20px;
  padding: 9px 14px;
  font-size: 13.5px;
  outline: none;
  background: #fff;
  color: #222;
  transition: border-color 0.2s;
}

.wa-input:focus {
  border-color: #25D366;
}

.wa-send-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #25D366;
  border: none;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
  flex-shrink: 0;
}

.wa-send-btn:hover {
  background: #1eb956;
  transform: scale(1.05);
}

.wa-send-btn svg {
  width: 17px;
  height: 17px;
  fill: #fff;
  transform: translateX(1px);
}

@media (max-width: 480px) {
  .wa-widget-container {
    bottom: 18px;
    right: 18px;
  }
  .wa-card {
    width: calc(100vw - 36px);
    right: 0;
    bottom: 70px;
  }
}
