#pw-chatbot {
  --pw-primario: #E6007E;
  --pw-primario-osc: #ac005f;
  --pw-secundario: #1E2340;
  --pw-blanco: #ffffff;
  --pw-gris-burbuja: #f1f2f6;
  --pw-texto: #2a2f45;
  --pw-gris: #8a90a5;
  --pw-linea: #eef0f5;
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2147483000;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.45;
  box-sizing: border-box;
}
#pw-chatbot *, #pw-chatbot *::before, #pw-chatbot *::after {
  box-sizing: inherit;
  margin: 0;
  padding: 0;
}
#pw-chatbot .pw-burbuja {
  position: relative;
  width: 60px;
  height: 60px;
  border: none;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--pw-primario), var(--pw-primario-osc));
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  box-shadow: 0 8px 24px color-mix(in srgb, var(--pw-primario) 38%, transparent), 0 2px 6px rgba(30, 35, 64, .18);
  transition: transform .2s ease;
}
#pw-chatbot .pw-burbuja:hover { transform: scale(1.07); }
#pw-chatbot .pw-burbuja::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  animation: pwPulso 2.6s ease-out infinite;
}
#pw-chatbot.pw-abierto .pw-burbuja::after { animation: none; }
@keyframes pwPulso {
  0%   { box-shadow: 0 0 0 0 color-mix(in srgb, var(--pw-primario) 45%, transparent); }
  70%  { box-shadow: 0 0 0 15px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}
#pw-chatbot .pw-burbuja svg {
  width: 27px;
  position: absolute;
  transition: opacity .22s ease, transform .22s ease;
}
#pw-chatbot .pw-ico-cerrar { width: 19px !important; opacity: 0; transform: rotate(-90deg); }
#pw-chatbot.pw-abierto .pw-ico-chat { opacity: 0; transform: rotate(90deg); }
#pw-chatbot.pw-abierto .pw-ico-cerrar { opacity: 1; transform: none; }
#pw-chatbot .pw-punto {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ff3b30;
  border: 2px solid #fff;
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: pwPop .4s ease .8s both;
}
@keyframes pwPop { from { transform: scale(0); } to { transform: scale(1); } }
#pw-chatbot .pw-teaser {
  position: absolute;
  bottom: 74px;
  right: 0;
  width: 296px;
  max-width: calc(100vw - 48px);
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 18px 48px rgba(30, 35, 64, .22), 0 3px 10px rgba(30, 35, 64, .10);
  padding: 20px 18px 16px;
  text-align: center;
  opacity: 0;
  transform: translateY(12px) scale(.97);
  transform-origin: bottom right;
  pointer-events: none;
  visibility: hidden;
  transition: opacity .3s ease, transform .3s cubic-bezier(.21, 1.02, .55, 1.2), visibility .3s;
}
#pw-chatbot .pw-teaser.pw-visible {
  opacity: 1;
  transform: none;
  pointer-events: auto;
  visibility: visible;
}
#pw-chatbot.pw-abierto .pw-teaser {
  opacity: 0 !important;
  pointer-events: none !important;
  visibility: hidden !important;
}
#pw-chatbot .pw-teaser-x {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid var(--pw-linea);
  background: #fff;
  color: var(--pw-gris);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s ease;
}
#pw-chatbot .pw-teaser-x:hover { background: var(--pw-gris-burbuja); }
#pw-chatbot .pw-teaser-x svg { width: 11px; }
#pw-chatbot .pw-teaser-ava {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  margin: 0 auto 10px;
  overflow: hidden;
  box-shadow: 0 0 0 3px #fff, 0 0 0 5px color-mix(in srgb, var(--pw-primario) 45%, transparent);
}
#pw-chatbot .pw-teaser-ava img, #pw-chatbot .pw-teaser-ava svg { width: 100%; height: 100%; display: block; }
#pw-chatbot .pw-teaser-tit {
  font-size: 15px;
  font-weight: 700;
  color: var(--pw-secundario);
  margin-bottom: 4px;
}
#pw-chatbot .pw-teaser-tit strong { color: var(--pw-primario); }
#pw-chatbot .pw-teaser-sub {
  font-size: 13px;
  color: var(--pw-gris);
  margin-bottom: 14px;
}
#pw-chatbot .pw-teaser-ops {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
#pw-chatbot .pw-teaser-op {
  width: 100%;
  border: none;
  border-radius: 999px;
  padding: 11px 14px;
  background: linear-gradient(135deg, var(--pw-primario), var(--pw-primario-osc));
  color: #fff;
  font-size: 13.5px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 4px 12px color-mix(in srgb, var(--pw-primario) 25%, transparent);
  transition: transform .15s ease, box-shadow .2s ease;
}
#pw-chatbot .pw-teaser-op:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px color-mix(in srgb, var(--pw-primario) 38%, transparent);
}
#pw-chatbot .pw-ventana {
  position: absolute;
  bottom: 76px;
  right: 0;
  width: 380px;
  max-width: calc(100vw - 32px);
  height: 620px;
  max-height: calc(100vh - 130px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 24px 64px rgba(30, 35, 64, .28), 0 4px 16px rgba(30, 35, 64, .10);
  opacity: 0;
  transform: translateY(14px) scale(.96);
  transform-origin: bottom right;
  pointer-events: none;
  visibility: hidden;
  transition: opacity .26s ease, transform .26s cubic-bezier(.21, 1.02, .55, 1.2), visibility .26s;
}
#pw-chatbot.pw-abierto .pw-ventana {
  opacity: 1;
  transform: none;
  pointer-events: auto;
  visibility: visible;
}
#pw-chatbot .pw-cabecera {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: #fff;
  border-bottom: 1px solid var(--pw-linea);
  flex-shrink: 0;
}
#pw-chatbot .pw-logo {
  height: 36px;
  max-width: 55%;
  object-fit: contain;
  display: block;
}
#pw-chatbot .pw-estado {
  font-size: 11px;
  font-weight: 600;
  color: #1fa463;
  background: #e8f7ef;
  border-radius: 999px;
  padding: 4px 9px;
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}
#pw-chatbot .pw-estado-punto {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
}
#pw-chatbot .pw-cab-btns {
  margin-left: auto;
  display: flex;
  gap: 7px;
}
#pw-chatbot .pw-ghost {
  width: 31px;
  height: 31px;
  border-radius: 50%;
  border: 1px solid #e3e6ee;
  background: #fff;
  color: var(--pw-gris);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s ease, color .2s ease;
  flex-shrink: 0;
}
#pw-chatbot .pw-ghost:hover { background: var(--pw-gris-burbuja); color: var(--pw-texto); }
#pw-chatbot .pw-ghost svg { width: 14px; }
#pw-chatbot .pw-mensajes {
  flex: 1;
  overflow-y: auto;
  padding: 16px 14px 8px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #fff;
}
#pw-chatbot .pw-mensajes::-webkit-scrollbar { width: 6px; }
#pw-chatbot .pw-mensajes::-webkit-scrollbar-thumb { background: #dfe2ec; border-radius: 6px; }
#pw-chatbot .pw-fila {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  max-width: 92%;
  animation: pwEntra .28s ease both;
}
#pw-chatbot .pw-msg-ava {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 1px 4px rgba(30, 35, 64, .15);
}
#pw-chatbot .pw-msg-ava img, #pw-chatbot .pw-msg-ava svg { width: 100%; height: 100%; display: block; }
#pw-chatbot .pw-msg {
  padding: 11px 14px;
  font-size: 14px;
  overflow-wrap: break-word;
}
#pw-chatbot .pw-bot {
  background: var(--pw-gris-burbuja);
  color: var(--pw-texto);
  border-radius: 16px 16px 16px 5px;
}
#pw-chatbot .pw-usuario {
  align-self: flex-end;
  max-width: 84%;
  background: linear-gradient(135deg, var(--pw-primario), var(--pw-primario-osc));
  color: #fff;
  font-weight: 600;
  border-radius: 18px 18px 5px 18px;
  box-shadow: 0 4px 12px color-mix(in srgb, var(--pw-primario) 25%, transparent);
  animation: pwEntra .28s ease both;
}
@keyframes pwEntra {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}
#pw-chatbot .pw-bot a { color: var(--pw-primario); font-weight: 600; }
#pw-chatbot .pw-bot strong { color: var(--pw-secundario); }
#pw-chatbot .pw-escribiendo {
  display: flex;
  gap: 5px;
  padding: 14px 16px;
  width: 64px;
}
#pw-chatbot .pw-escribiendo span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #c3c8da;
  animation: pwBota 1.1s infinite ease-in-out;
}
#pw-chatbot .pw-escribiendo span:nth-child(2) { animation-delay: .15s; }
#pw-chatbot .pw-escribiendo span:nth-child(3) { animation-delay: .3s; }
@keyframes pwBota {
  0%, 60%, 100% { transform: none; opacity: .5; }
  30% { transform: translateY(-5px); opacity: 1; }
}
#pw-chatbot .pw-chips {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  padding: 2px 0 6px;
}
#pw-chatbot .pw-chip {
  background: linear-gradient(135deg, var(--pw-primario), var(--pw-primario-osc));
  border: none;
  color: #fff;
  font-size: 13.5px;
  font-weight: 600;
  font-family: inherit;
  padding: 10px 18px;
  border-radius: 999px;
  cursor: pointer;
  animation: pwEntra .3s ease both;
  transition: transform .15s ease, box-shadow .2s ease, filter .2s ease;
  box-shadow: 0 4px 12px color-mix(in srgb, var(--pw-primario) 25%, transparent);
}
#pw-chatbot .pw-chip:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
  box-shadow: 0 6px 16px color-mix(in srgb, var(--pw-primario) 38%, transparent);
}

#pw-chatbot .pw-chip.pw-alt,
#pw-chatbot .pw-teaser-op.pw-alt {
  background: linear-gradient(135deg, var(--pw-secundario), #3a4270);
  box-shadow: 0 4px 12px color-mix(in srgb, var(--pw-secundario) 40%, transparent);
}
#pw-chatbot .pw-chip.pw-alt:hover,
#pw-chatbot .pw-teaser-op.pw-alt:hover {
  filter: brightness(1.25);
  box-shadow: 0 6px 16px color-mix(in srgb, var(--pw-secundario) 55%, transparent);
}
#pw-chatbot .pw-form {
  width: 92%;
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 14px;
  background: var(--pw-gris-burbuja);
  border-radius: 16px;
  animation: pwEntra .28s ease both;
}
#pw-chatbot .pw-form label {
  font-size: 12px;
  font-weight: 600;
  color: var(--pw-gris);
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: left;
}
#pw-chatbot .pw-form input[type="text"],
#pw-chatbot .pw-form input[type="tel"],
#pw-chatbot .pw-form input[type="email"],
#pw-chatbot .pw-form select {
  border: 1.5px solid transparent;
  border-radius: 10px;
  padding: 9px 11px;
  font-size: 14px;
  font-family: inherit;
  color: var(--pw-texto);
  background: #fff;
  outline: none;
  transition: border-color .2s ease;
  width: 100%;
}
#pw-chatbot .pw-form input:focus,
#pw-chatbot .pw-form select:focus { border-color: var(--pw-primario); }
#pw-chatbot .pw-rgpd {
  flex-direction: row !important;
  align-items: flex-start;
  gap: 8px !important;
  font-weight: 500 !important;
  font-size: 11.5px !important;
  line-height: 1.4;
  cursor: pointer;
}
#pw-chatbot .pw-rgpd input {
  margin-top: 2px;
  accent-color: var(--pw-primario);
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  cursor: pointer;
}
#pw-chatbot .pw-rgpd a { color: var(--pw-primario); font-weight: 600; }
#pw-chatbot .pw-rgpd-aviso { font-size: 10.5px; color: var(--pw-gris); text-align: left; }
#pw-chatbot .pw-error {
  font-size: 12px;
  color: #e5484d;
  font-weight: 600;
  background: #fdecec;
  padding: 8px 10px;
  border-radius: 8px;
  text-align: left;
}
#pw-chatbot .pw-btn-enviar-lead {
  background: linear-gradient(135deg, var(--pw-primario), var(--pw-primario-osc));
  color: #fff;
  border: none;
  padding: 11px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease;
  box-shadow: 0 5px 14px color-mix(in srgb, var(--pw-primario) 28%, transparent);
}
#pw-chatbot .pw-btn-enviar-lead:hover { transform: translateY(-1px); }
#pw-chatbot .pw-form-ok { opacity: .55; }
#pw-chatbot .pw-entrada {
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  background: #fff;
  border-top: 1px solid var(--pw-linea);
  flex-shrink: 0;
}
#pw-chatbot .pw-entrada input {
  flex: 1;
  border: 1.5px solid #e3e6ee;
  border-radius: 999px;
  padding: 10px 16px;
  font-size: 14px;
  font-family: inherit;
  color: var(--pw-texto);
  background: #fafbfe;
  outline: none;
  transition: border-color .2s ease;
}
#pw-chatbot .pw-entrada input:focus { border-color: var(--pw-primario); background: #fff; }
#pw-chatbot .pw-enviar {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  border: none;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--pw-primario), var(--pw-primario-osc));
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .15s ease;
}
#pw-chatbot .pw-enviar:hover { transform: scale(1.08); }
#pw-chatbot .pw-enviar svg { width: 18px; }
#pw-chatbot .pw-pie {
  background: #fff;
  text-align: center;
  padding: 5px 0 8px;
  flex-shrink: 0;
}
#pw-chatbot .pw-pie a {
  font-size: 10.5px;
  color: var(--pw-gris);
  text-decoration: none;
  font-weight: 600;
  letter-spacing: .2px;
}
#pw-chatbot .pw-pie a:hover { color: var(--pw-primario); }
@media (max-width: 480px) {
  #pw-chatbot .pw-ventana {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    border-radius: 0;
  }
  #pw-chatbot.pw-abierto .pw-burbuja,
  #pw-chatbot.pw-abierto .pw-teaser { display: none; }
  #pw-chatbot .pw-entrada { padding-bottom: calc(10px + env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) {
  #pw-chatbot *, #pw-chatbot *::before, #pw-chatbot *::after {
    animation: none !important;
    transition: none !important;
  }
}
#pw-chatbot .pw-contactos { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
#pw-chatbot .pw-contacto { display: flex; align-items: center; justify-content: center; gap: 7px; padding: 9px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 700 !important; text-decoration: none; border: 1.5px solid var(--pw-primario); color: var(--pw-primario) !important; background: #fff; transition: background .2s ease, color .2s ease, transform .15s ease; }
#pw-chatbot .pw-contacto:hover { background: var(--pw-primario); color: #fff !important; transform: translateY(-1px); }
#pw-chatbot .pw-contacto svg { width: 16px; height: 16px; flex-shrink: 0; }
#pw-chatbot .pw-wa { border-color: #25D366; color: #128C7E !important; }
#pw-chatbot .pw-wa:hover { background: #25D366; color: #fff !important; }
