/* Asistente IA — chat flotante (estilo .ez) */
.ezc-launcher {
  position: fixed; bottom: 18px; right: 18px; z-index: 101;
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--ez-ink); color: #fff; border: none; cursor: pointer;
  border-radius: 999px; padding: 12px 18px; font: 600 14px/1 var(--ez-font);
  box-shadow: 0 8px 24px rgba(15,23,42,.28);
}
.ezc-launcher:hover { background: var(--ez-ink-2); }
.ezc-launcher .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ez-yellow); box-shadow: 0 0 0 3px rgba(245,158,11,.25); }
.ezc-launcher svg { width: 20px; height: 20px; }
/* Cuando el banner de cookies está visible, el asistente se eleva por encima para que se vea y se pueda usar sin aceptar antes */
body.ez-cookie-open .ezc-launcher { bottom: 100px; }

.ezc-panel {
  position: fixed; bottom: 18px; right: 18px; z-index: 102;
  width: 380px; max-width: calc(100vw - 32px); height: 560px; max-height: calc(100vh - 32px);
  background: #fff; border: 1px solid var(--ez-line); border-radius: 16px; overflow: hidden;
  display: none; flex-direction: column; box-shadow: var(--ez-shadow-lg);
}
.ezc-panel.open { display: flex; }
.ezc-head { background: var(--ez-ink); color: #fff; padding: 14px 16px; display: flex; align-items: center; gap: 10px; }
.ezc-head .av { width: 34px; height: 34px; border-radius: 9px; background: var(--ez-yellow); color: var(--ez-ink); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ezc-head .t { flex: 1; line-height: 1.2; }
.ezc-head .t strong { font-size: 14px; display: block; }
.ezc-head .t span { font-size: 11.5px; color: #a4b3c7; }
.ezc-head .x { background: none; border: none; color: #a4b3c7; cursor: pointer; font-size: 20px; line-height: 1; padding: 4px; }
.ezc-head .x:hover { color: #fff; }

.ezc-body { flex: 1; overflow-y: auto; padding: 16px; background: var(--ez-bg-2); display: flex; flex-direction: column; gap: 10px; }
.ezc-msg { max-width: 85%; padding: 10px 13px; border-radius: 12px; font-size: 14px; line-height: 1.5; white-space: pre-wrap; word-wrap: break-word; }
.ezc-msg.bot { background: #fff; border: 1px solid var(--ez-line); align-self: flex-start; border-bottom-left-radius: 4px; }
.ezc-msg.me { background: var(--ez-ink); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.ezc-msg a { color: var(--ez-blue-dark); font-weight: 600; }
.ezc-msg.me a { color: var(--ez-yellow); }
.ezc-typing { align-self: flex-start; color: var(--ez-muted); font-size: 13px; padding: 6px 4px; }
.ezc-typing span { display: inline-block; width: 6px; height: 6px; margin: 0 1px; background: var(--ez-muted); border-radius: 50%; animation: ezc-b 1s infinite; }
.ezc-typing span:nth-child(2) { animation-delay: .15s; } .ezc-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes ezc-b { 0%,60%,100% { opacity: .3; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }

.ezc-foot { border-top: 1px solid var(--ez-line); padding: 10px; display: flex; gap: 8px; background: #fff; }
.ezc-foot textarea { flex: 1; resize: none; border: 1.5px solid var(--ez-line); border-radius: 10px; padding: 10px 12px; font: inherit; font-size: 14px; outline: none; max-height: 90px; }
.ezc-foot textarea:focus { border-color: var(--ez-blue); }
.ezc-foot button { background: var(--ez-blue); color: #fff; border: none; border-radius: 10px; width: 44px; flex-shrink: 0; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.ezc-foot button:hover { background: var(--ez-blue-dark); }
.ezc-foot button:disabled { opacity: .5; cursor: default; }
.ezc-foot button svg { width: 18px; height: 18px; }
.ezc-disclaimer { font-size: 10.5px; color: var(--ez-muted); text-align: center; padding: 0 10px 8px; background: #fff; }

@media (max-width: 480px) {
  .ezc-panel { width: 100%; max-width: 100%; height: 100%; max-height: 100%; bottom: 0; left: 0; border-radius: 0; }
}
