/* =========================================================================
   WAvincink — Estilos Personalizados SaaS & Simulación Nativa de WhatsApp
   ========================================================================= */

:root {
  --wa-header: #075E54;
  --wa-button: #25D366;
  --wa-bubble: #DCF8C6;
  --wa-chat-bg: #EFEAE2;
  --wa-bubble-text: #111B21;
}

body {
  font-family: 'Plus Jakarta Sans', 'Inter', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* Patrón sutil estilo fondo de chat de WhatsApp (SVG embebido) */
.wa-chat-wallpaper {
  background-color: var(--wa-chat-bg, #EFEAE2);
  background-image: radial-gradient(rgba(15, 23, 42, 0.055) 1.25px, transparent 1.25px),
                    radial-gradient(rgba(15, 23, 42, 0.04) 1.25px, var(--wa-chat-bg, #EFEAE2) 1.25px);
  background-size: 26px 26px;
  background-position: 0 0, 13px 13px;
  transition: background-color 0.25s ease;
}

.wa-chat-wallpaper-dark {
  background-color: #0b141a !important;
  background-image: radial-gradient(rgba(255, 255, 255, 0.045) 1.25px, transparent 1.25px),
                    radial-gradient(rgba(255, 255, 255, 0.03) 1.25px, #0b141a 1.25px) !important;
  background-size: 26px 26px;
  background-position: 0 0, 13px 13px;
}

/* Colas de las burbujas de chat de WhatsApp */
.wa-bubble-incoming {
  position: relative;
  border-radius: 0 14px 14px 14px;
}

.wa-bubble-incoming::before {
  content: '';
  position: absolute;
  top: 0;
  left: -7px;
  width: 0;
  height: 0;
  border-top: 0px solid transparent;
  border-right: 8px solid var(--incoming-bg, #ffffff);
  border-bottom: 10px solid transparent;
}

.wa-bubble-outgoing {
  position: relative;
  border-radius: 14px 0 14px 14px;
  background-color: var(--wa-bubble, #DCF8C6);
  color: var(--wa-bubble-text, #111B21);
  transition: background-color 0.2s ease, color 0.2s ease;
}

.wa-bubble-outgoing::after {
  content: '';
  position: absolute;
  top: 0;
  right: -7px;
  width: 0;
  height: 0;
  border-top: 0px solid transparent;
  border-left: 8px solid var(--wa-bubble, #DCF8C6);
  border-bottom: 10px solid transparent;
}

/* Animación de pulso para el botón flotante del widget */
@keyframes waPulseRing {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.65);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 14px rgba(37, 211, 102, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
  }
}

.wa-pulse-active {
  animation: waPulseRing 2s infinite;
}

/* Indicador de "escribiendo..." */
@keyframes typingBounce {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.4; }
  40% { transform: translateY(-4px); opacity: 1; }
}

.typing-dot:nth-child(1) { animation: typingBounce 1.2s infinite 0s; }
.typing-dot:nth-child(2) { animation: typingBounce 1.2s infinite 0.2s; }
.typing-dot:nth-child(3) { animation: typingBounce 1.2s infinite 0.4s; }

/* Scrollbars elegantes */
.custom-scrollbar::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
  background: transparent;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.45);
  border-radius: 9999px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: rgba(100, 116, 139, 0.7);
}

/* Inputs de color redondeados */
input[type="color"] {
  -webkit-appearance: none;
  border: none;
  padding: 0;
  cursor: pointer;
}
input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
}
input[type="color"]::-webkit-color-swatch {
  border: 2px solid rgba(15, 23, 42, 0.12);
  border-radius: 10px;
}
