/* WhatsApp Chat Widget Stylesheet */
.wa-standalone-wrapper {
  position: fixed;
  z-index: 999999;
  display: flex;
  flex-direction: column;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.wa-standalone-wrapper.pos-right { align-items: flex-end; }
.wa-standalone-wrapper.pos-left { align-items: flex-start; }

.wa-widget-trigger {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.22s ease, box-shadow 0.2s ease, visibility 0.28s ease;
}
.wa-widget-trigger:hover {
  transform: scale(1.08) translateY(-2px);
}
.wa-widget-trigger.has-pulse {
  animation: wa-pulse 1.8s infinite;
}
.wa-widget-trigger.has-pulse:hover {
  animation: none;
}
@keyframes wa-pulse {
  0% {
    box-shadow: 0 0 0 0 var(--wa-pulse-color, rgba(37, 211, 102, 0.55)), 0 8px 24px rgba(0, 0, 0, 0.3);
  }
  70% {
    box-shadow: 0 0 0 14px rgba(0, 0, 0, 0), 0 8px 24px rgba(0, 0, 0, 0.3);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(0, 0, 0, 0), 0 8px 24px rgba(0, 0, 0, 0.3);
  }
}
.wa-widget-trigger.is-hidden,
.wa-standalone-wrapper.is-chat-open .wa-widget-trigger {
  opacity: 0 !important;
  transform: scale(0.6) translateY(12px) !important;
  pointer-events: none !important;
  visibility: hidden !important;
  position: absolute;
  bottom: 0;
  animation: none !important;
}
.wa-standalone-wrapper.pos-right .wa-widget-trigger.is-hidden,
.wa-standalone-wrapper.pos-right.is-chat-open .wa-widget-trigger {
  right: 0;
}
.wa-standalone-wrapper.pos-left .wa-widget-trigger.is-hidden,
.wa-standalone-wrapper.pos-left.is-chat-open .wa-widget-trigger {
  left: 0;
}
.wa-widget-trigger svg {
  width: 28px;
  height: 28px;
  display: block;
  fill: currentColor;
  flex-shrink: 0;
}
.wa-widget-trigger.pill-mode {
  width: auto;
  height: 50px;
  border-radius: 9999px;
  padding: 0 20px;
  gap: 10px;
}
.wa-widget-trigger.pill-mode svg {
  width: 22px;
  height: 22px;
}
.wa-trigger-text {
  font-weight: 700;
  font-size: 14px;
}
.wa-trigger-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #EF4444;
  color: white;
  font-size: 11px;
  font-weight: 800;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.wa-widget-popup {
  width: 330px;
  background: #111827;
  color: #F9FAFB;
  border-radius: 18px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
  overflow: hidden;
  margin-bottom: 0;
  transform-origin: bottom right;
  transition: opacity 0.28s ease, transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.28s ease;
  display: flex;
  flex-direction: column;
}
.wa-standalone-wrapper.pos-left .wa-widget-popup { transform-origin: bottom left; }

.wa-widget-popup.is-closed {
  opacity: 0;
  transform: scale(0.85) translateY(20px);
  pointer-events: none;
  visibility: hidden;
  height: 0;
  margin-bottom: 0;
}
.wa-widget-popup.is-open {
  opacity: 1;
  transform: scale(1) translateY(0);
  pointer-events: auto;
  visibility: visible;
  margin-bottom: 0;
}

.wa-widget-header {
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: white;
}
.wa-widget-header.is-light-header {
  color: #0F172A;
  border-bottom: 1px solid #E2E8F0;
}
.wa-widget-header.is-light-header .wa-widget-name {
  color: #0F172A;
}
.wa-widget-header.is-light-header .wa-widget-status {
  color: #64748B;
}
.wa-widget-header.is-light-header .wa-widget-close {
  color: #64748B;
}
.wa-widget-header.is-light-header .wa-widget-close:hover {
  color: #0F172A;
}
.wa-widget-header.is-light-header .wa-widget-online {
  border-color: #FFFFFF;
}
.wa-widget-header.is-light-header .wa-widget-avatar img {
  background: rgba(15, 23, 42, 0.08);
}
.wa-widget-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  position: relative;
  flex-shrink: 0;
}
.wa-widget-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: rgba(15, 23, 42, 0.4);
}
.wa-widget-online {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #10B981;
  border: 2px solid #0F172A;
}
.wa-widget-meta { flex: 1; min-width: 0; }
.wa-widget-title-row { display: flex; align-items: center; gap: 4px; }
.wa-widget-name { font-weight: 700; font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wa-widget-check { width: 14px; height: 14px; color: #38BDF8; }
.wa-widget-status { font-size: 11px; opacity: 0.75; display: block; }
.wa-widget-close {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
}

.wa-widget-popup.theme-light {
  background: #FFFFFF;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(0, 0, 0, 0.08);
}
.wa-widget-body {
  padding: 16px;
  background: #121313;
  min-height: 130px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.wa-widget-popup.theme-light .wa-widget-body {
  background: #EFEAE2;
  color: #1F2937;
}

.wa-widget-time { text-align: center; font-size: 10px; opacity: 0.6; }
.wa-widget-popup.theme-light .wa-widget-time {
  color: #64748B;
  opacity: 1;
}
.wa-widget-bubble {
  background: rgba(54, 57, 65, 0.85);
  padding: 12px 14px;
  border-radius: 4px 14px 14px 14px;
  font-size: 13px;
  line-height: 1.4;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  align-self: flex-start;
  max-width: 88%;
}
.wa-widget-bubble.is-revealed {
  animation: wa-bubble-appear 0.28s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes wa-bubble-appear {
  0% {
    opacity: 0;
    transform: translateY(6px) scale(0.97);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
.wa-widget-popup.theme-light .wa-widget-bubble {
  background: #FFFFFF;
  color: #111827;
}
.wa-bubble-author { font-size: 11px; font-weight: 700; margin-bottom: 2px; }
.wa-bubble-content { white-space: pre-wrap; word-break: break-word; }
.wa-bubble-meta { font-size: 9px; opacity: 0.5; text-align: right; margin-top: 4px; }

.wa-widget-typing {
  background: rgba(54, 57, 65, 0.85);
  padding: 6px 12px;
  border-radius: 4px 10px 10px 10px;
  display: inline-flex;
  gap: 4px;
  width: fit-content;
}
.wa-widget-popup.theme-light .wa-widget-typing { background: #FFFFFF; }
.wa-widget-typing span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #9CA3AF;
  animation: wa-jump 1.2s infinite ease-in-out;
}
.wa-widget-typing span:nth-child(2) { animation-delay: 0.2s; }
.wa-widget-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes wa-jump {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-4px); opacity: 1; }
}

.wa-widget-footer {
  padding: 10px 14px 8px 14px;
  background: #000000;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.wa-widget-popup.theme-light .wa-widget-footer {
  background: #FFFFFF;
  border-top: 1px solid #E5E7EB;
}
.wa-widget-input-bar {
  display: flex;
  align-items: center;
  background: rgba(54, 57, 65, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 9999px;
  padding: 3px 4px 3px 14px;
  gap: 6px;
  transition: all 0.2s ease;
}
.wa-widget-input-bar:focus-within {
  border-color: #25D366;
  box-shadow: 0 0 0 2px rgba(37, 211, 102, 0.25);
  background: #121313;
}
.wa-widget-popup.theme-light .wa-widget-input-bar {
  background: #F1F5F9;
  border-color: #CBD5E1;
}
.wa-widget-popup.theme-light .wa-widget-input-bar:focus-within {
  background: #FFFFFF;
  border-color: #25D366;
}
.wa-widget-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-size: 13px;
  color: #F8FAFC;
  font-family: inherit;
  padding: 6px 0;
  min-width: 0;
}
.wa-widget-popup.theme-light .wa-widget-input {
  color: #0F172A;
}
.wa-widget-input::placeholder {
  color: #64748B;
  opacity: 0.85;
}
.wa-widget-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.15s ease;
  flex-shrink: 0;
  padding: 0;
}
.wa-widget-action-btn:hover {
  transform: scale(1.08);
}
.wa-widget-action-btn.is-mic {
  color: #94A3B8;
}
.wa-widget-action-btn.is-mic:hover {
  color: #25D366;
  background: rgba(255, 255, 255, 0.08);
}
.wa-widget-popup.theme-light .wa-widget-action-btn.is-mic {
  color: #64748B;
}
.wa-widget-popup.theme-light .wa-widget-action-btn.is-mic:hover {
  background: rgba(0, 0, 0, 0.06);
}
.wa-widget-action-btn.is-mic .wa-icon-mic {
  display: block;
  width: 18px;
  height: 18px;
}
.wa-widget-action-btn.is-mic .wa-icon-send {
  display: none;
}
.wa-widget-action-btn.is-send {
  background: #25D366;
  color: #FFFFFF;
  box-shadow: 0 2px 8px rgba(37, 211, 102, 0.4);
}
.wa-widget-action-btn.is-send:hover {
  background: #20BD5A;
}
.wa-widget-action-btn.is-send .wa-icon-mic {
  display: none;
}
.wa-widget-action-btn.is-send .wa-icon-send {
  display: block;
  width: 17px;
  height: 17px;
  transform: translateX(1px);
}
.wa-widget-brand {
  font-size: 10px;
  opacity: 0.5;
  text-align: center;
  margin-top: 6px;
  letter-spacing: 0.02em;
}
.wa-widget-popup.theme-light .wa-widget-brand {
  color: #64748B;
  opacity: 0.8;
}