/* Asistente IA de Publicita — burbuja de chat (06-10-2026)
   Paleta del sitio: azul de marca #0B19BC, amarillo del header, papel cálido.
   Nunca lila/morado (regla de marca). */

.pc-burbuja,
.pc-panel {
  --pc-azul: #0B19BC;
  --pc-azul-osc: #08127a;
  --pc-amarillo: #FFD400;
  --pc-papel: #FFFDF7;
  --pc-linea: #E4E0D4;
  font-family: 'Archivo', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* ---------- burbuja (abajo a la IZQUIERDA) ---------- */
.pc-burbuja {
  position: fixed;
  left: 18px;
  bottom: 18px;
  z-index: 900;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px 12px 12px;
  border: 2px solid var(--pc-azul);
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(8, 18, 122, .22);
  cursor: pointer;
  font-size: 15px;
  font-weight: 700;
  color: var(--pc-azul-osc);
  transition: transform .15s ease, box-shadow .15s ease;
}
.pc-burbuja:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(8, 18, 122, .28); }
.pc-burbuja__ico {
  width: 34px; height: 34px; flex: 0 0 34px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--pc-azul);
  color: #fff;
  font-size: 14.5px;
  font-weight: 900;
  letter-spacing: .3px;
  text-transform: uppercase;
  line-height: 1;
}
.pc-burbuja__txt { max-width: 190px; line-height: 1.2; }
.pc-burbuja__punto {
  width: 9px; height: 9px; border-radius: 50%;
  background: #12a150; box-shadow: 0 0 0 3px rgba(18,161,80,.18);
  margin-left: 2px;
}
@media (max-width: 640px) {
  .pc-burbuja { left: 12px; bottom: 12px; padding: 10px; }
  .pc-burbuja__txt { display: none; }
}

/* ---------- panel (abajo a la izquierda) ---------- */
.pc-panel {
  position: fixed;
  left: 18px;
  bottom: 18px;
  z-index: 901;
  width: 372px;
  max-width: calc(100vw - 24px);
  height: 560px;
  max-height: calc(100vh - 40px);
  display: none;
  flex-direction: column;
  background: #fff;
  border: 2px solid var(--pc-azul);
  border-radius: 16px;
  box-shadow: 0 18px 44px rgba(8, 18, 122, .3);
  overflow: hidden;
}
.pc-panel.pc-abierto { display: flex; }
@media (max-width: 640px) {
  .pc-panel { right: 12px; left: 12px; bottom: 12px; width: auto; height: min(78vh, 560px); }
}

.pc-cab {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px;
  background: var(--pc-azul);
  color: #fff;
}
.pc-cab__ico {
  width: 32px; height: 32px; flex: 0 0 32px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: #fff;
  color: var(--pc-azul);
  font-size: 13.5px;
  font-weight: 900;
  letter-spacing: .3px;
  line-height: 1;
}
.pc-cab__t { font-weight: 700; font-size: 15px; line-height: 1.15; }
.pc-cab__s { font-size: 12px; opacity: .9; display: flex; align-items: center; gap: 6px; }
.pc-cab__cerrar {
  margin-left: auto; background: transparent; border: 0; color: #fff;
  font-size: 22px; line-height: 1; cursor: pointer; padding: 2px 6px; border-radius: 8px;
}
.pc-cab__cerrar:hover { background: rgba(255,255,255,.16); }

.pc-chat {
  flex: 1 1 auto; overflow-y: auto; padding: 14px;
  background: var(--pc-papel);
  display: flex; flex-direction: column; gap: 10px;
  scroll-behavior: smooth;
}
.pc-msg { max-width: 86%; padding: 10px 13px; border-radius: 14px; font-size: 14.5px; line-height: 1.45; white-space: pre-line; }
.pc-msg--ia { align-self: flex-start; background: #fff; border: 1px solid var(--pc-linea); color: #1b1b1b; border-bottom-left-radius: 4px; }
.pc-msg--yo { align-self: flex-end; background: var(--pc-azul); color: #fff; border-bottom-right-radius: 4px; }
.pc-msg--aviso { align-self: center; font-size: 12px; color: #6b6b6b; background: transparent; text-align: center; max-width: 100%; }

.pc-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 14px 10px; background: var(--pc-papel); }
.pc-chip {
  border: 1px solid var(--pc-azul); background: #fff; color: var(--pc-azul-osc);
  border-radius: 999px; padding: 7px 12px; font-size: 12.5px; font-weight: 600; cursor: pointer;
  font-family: inherit;
}
.pc-chip:hover { background: #EFF2FF; }

.pc-wa {
  margin: 0 14px 10px;
  display: none;
  align-items: center; justify-content: center; gap: 8px;
  padding: 11px 14px; border-radius: 12px;
  background: #12a150; color: #fff; text-decoration: none; font-weight: 700; font-size: 14.5px;
}
.pc-wa.pc-ver { display: flex; }
.pc-wa:hover { background: #0e8c44; }

.pc-pie { display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--pc-linea); background: #fff; }
.pc-pie textarea {
  flex: 1 1 auto; resize: none; border: 1.5px solid var(--pc-linea); border-radius: 12px;
  padding: 10px 12px; font-family: inherit; font-size: 14.5px; line-height: 1.35; max-height: 96px; min-height: 42px;
  background: #fff; color: #1b1b1b;
}
.pc-pie textarea:focus { outline: 2px solid var(--pc-azul); outline-offset: 1px; border-color: var(--pc-azul); }
.pc-enviar {
  flex: 0 0 auto; width: 42px; height: 42px; border-radius: 12px; border: 0; cursor: pointer;
  background: var(--pc-azul); color: #fff; font-size: 17px;
  display: grid; place-items: center;
}
.pc-enviar svg { width: 19px; height: 19px; fill: currentColor; display: block; }
.pc-enviar:disabled { opacity: .45; cursor: default; }
.pc-legal { padding: 0 14px 10px; font-size: 11px; color: #77797e; background: #fff; }
.pc-legal a { color: inherit; }

/* el puntito de "escribiendo" */
.pc-typing span {
  display: inline-block; width: 6px; height: 6px; margin-right: 3px; border-radius: 50%;
  background: var(--pc-azul); opacity: .35; animation: pcPunto 1.1s infinite;
}
.pc-typing span:nth-child(2) { animation-delay: .18s; }
.pc-typing span:nth-child(3) { animation-delay: .36s; }
@keyframes pcPunto { 0%, 60%, 100% { opacity: .25; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }
