/* ==========================================================================
   WHATSAPP CALLING WIDGET (IPSA COMEDORES)
   ========================================================================== */

.wa-widget-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

.wa-widget-trigger {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
  color: #ffffff;
  border: none;
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.4), 0 2px 8px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  outline: none;
}

.wa-widget-trigger:hover {
  transform: scale(1.08) translateY(-2px);
  box-shadow: 0 12px 28px rgba(37, 211, 102, 0.5), 0 4px 12px rgba(0, 0, 0, 0.2);
}

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

.wa-widget-pulse {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: rgba(37, 211, 102, 0.4);
  animation: wa-pulse 2s infinite;
  z-index: -1;
}

@keyframes wa-pulse {
  0% {
    transform: scale(0.95);
    opacity: 0.8;
  }
  70% {
    transform: scale(1.45);
    opacity: 0;
  }
  100% {
    transform: scale(0.95);
    opacity: 0;
  }
}

.wa-widget-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 16px;
  height: 16px;
  background: #00F0FF;
  border: 2px solid #ffffff;
  border-radius: 50%;
  animation: wa-badge-blink 1.5s infinite alternate;
}

@keyframes wa-badge-blink {
  from { opacity: 0.6; transform: scale(0.85); }
  to { opacity: 1; transform: scale(1.15); }
}

.wa-widget-modal {
  position: absolute;
  bottom: 74px;
  right: 0;
  width: 330px;
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.18), 0 0 0 1px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px) scale(0.95);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.wa-widget-modal.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.wa-widget-header {
  background: linear-gradient(135deg, #075E54 0%, #128C7E 100%);
  color: #ffffff;
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.wa-avatar-wrapper {
  position: relative;
}

.wa-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #128C7E;
  font-size: 1.1rem;
  border: 2px solid rgba(255, 255, 255, 0.8);
}

.wa-status-dot {
  position: absolute;
  bottom: 1px;
  right: 1px;
  width: 11px;
  height: 11px;
  background: #25D366;
  border: 2px solid #075E54;
  border-radius: 50%;
}

.wa-header-info h4 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: #ffffff;
}

.wa-header-info p {
  margin: 2px 0 0;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.85);
  display: flex;
  align-items: center;
  gap: 4px;
}

.wa-widget-body {
  padding: 1.25rem;
  background: #F0F2F5;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.wa-chat-bubble {
  background: #ffffff;
  border-radius: 14px;
  border-top-left-radius: 4px;
  padding: 0.85rem 1rem;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  font-size: 0.85rem;
  color: #111827;
  line-height: 1.45;
}

.wa-chat-bubble strong {
  color: #128C7E;
}

.wa-action-btn {
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
  color: #ffffff;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
  transition: all 0.2s ease;
  text-decoration: none;
}

.wa-action-btn:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.wa-context-tag {
  font-size: 0.7rem;
  color: #6B7280;
  text-align: center;
  margin-top: 0.2rem;
}

/* Dark mode compatibility */
body.dark-theme .wa-widget-modal {
  background: #1F2937;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.08);
}

body.dark-theme .wa-widget-body {
  background: #111827;
}

body.dark-theme .wa-chat-bubble {
  background: #1F2937;
  color: #F3F4F6;
}

body.dark-theme .wa-chat-bubble strong {
  color: #25D366;
}

body.dark-theme .wa-context-tag {
  color: #9CA3AF;
}
