/* NordSur AI Assistant - widget de chat */
.nsx, .nsx *{box-sizing:border-box}
.nsx-launch{position:fixed;right:20px;bottom:92px;z-index:9998;width:60px;height:60px;border:none;border-radius:50%;
  cursor:pointer;background:linear-gradient(135deg,#001fcc,#3358ff);color:#fff;
  box-shadow:0 10px 26px rgba(0,31,204,.38);display:flex;align-items:center;justify-content:center;
  transition:transform .2s ease,box-shadow .2s ease}
.nsx-launch:hover{transform:translateY(-2px);box-shadow:0 14px 32px rgba(0,31,204,.46)}
.nsx-launch svg{width:28px;height:28px}
.nsx-launch__dot{position:absolute;top:6px;right:6px;width:11px;height:11px;border-radius:50%;background:#5ad18a;border:2px solid #fff}
.nsx-launch .nsx-ico-close{display:none}
.nsx-launch.is-open .nsx-ico-chat{display:none}
.nsx-launch.is-open .nsx-ico-close{display:block}

.nsx-panel{position:fixed;right:20px;bottom:92px;z-index:9999;width:380px;max-width:calc(100vw - 32px);
  height:560px;max-height:calc(100vh - 120px);background:#fff;border-radius:18px;overflow:hidden;
  display:flex;flex-direction:column;box-shadow:0 24px 60px rgba(15,20,40,.28);
  border:1px solid rgba(20,30,60,.10);opacity:0;transform:translateY(12px) scale(.98);
  pointer-events:none;transition:opacity .2s ease,transform .2s ease;font-family:inherit}
.nsx-panel.is-open{opacity:1;transform:none;pointer-events:auto}

.nsx-head{display:flex;align-items:center;gap:.7rem;padding:.85rem 1rem;
  background:linear-gradient(135deg,#0b1230,#141b3d);color:#fff}
.nsx-head__logo{width:38px;height:38px;border-radius:10px;background:#fff;display:flex;align-items:center;justify-content:center;flex-shrink:0}
.nsx-head__logo img{width:30px;height:30px}
.nsx-head__t{flex:1;min-width:0}
.nsx-head__t b{display:block;font-size:.98rem;line-height:1.1}
.nsx-head__t span{font-size:.76rem;color:#aeb7d6}
.nsx-head__t span::before{content:"";display:inline-block;width:7px;height:7px;border-radius:50%;background:#5ad18a;margin-right:5px;vertical-align:middle}
.nsx-head__x{background:none;border:none;color:#aeb7d6;cursor:pointer;padding:6px;border-radius:8px;line-height:0}
.nsx-head__x:hover{background:rgba(255,255,255,.1);color:#fff}
.nsx-head__x svg{width:20px;height:20px}

.nsx-body{flex:1;overflow-y:auto;padding:1rem;background:#f6f7fb;display:flex;flex-direction:column;gap:.6rem}
.nsx-msg{max-width:85%;padding:.62rem .85rem;border-radius:14px;font-size:.92rem;line-height:1.45;white-space:pre-wrap;word-wrap:break-word}
.nsx-msg a{color:inherit;text-decoration:underline}
.nsx-msg--bot{align-self:flex-start;background:#fff;color:#1a2138;border:1px solid rgba(20,30,60,.08);border-bottom-left-radius:5px}
.nsx-msg--bot a{color:#001fcc}
.nsx-msg--user{align-self:flex-end;background:#001fcc;color:#fff;border-bottom-right-radius:5px}

.nsx-typing{align-self:flex-start;background:#fff;border:1px solid rgba(20,30,60,.08);border-radius:14px;border-bottom-left-radius:5px;padding:.7rem .9rem;display:flex;gap:4px}
.nsx-typing span{width:7px;height:7px;border-radius:50%;background:#9aa3bf;animation:nsxb 1s infinite ease-in-out}
.nsx-typing span:nth-child(2){animation-delay:.15s}
.nsx-typing span:nth-child(3){animation-delay:.3s}
@keyframes nsxb{0%,60%,100%{transform:translateY(0);opacity:.5}30%{transform:translateY(-4px);opacity:1}}

.nsx-chips{display:flex;flex-wrap:wrap;gap:.4rem;padding:.2rem 0 .1rem}
.nsx-chip{cursor:pointer;border:1px solid rgba(0,31,204,.25);background:#fff;color:#001fcc;font:inherit;font-size:.82rem;
  padding:.42rem .7rem;border-radius:999px;line-height:1.15;transition:background .15s ease}
.nsx-chip:hover{background:rgba(0,31,204,.07)}

.nsx-foot{border-top:1px solid rgba(20,30,60,.10);background:#fff;padding:.6rem .7rem .35rem}
.nsx-inrow{display:flex;align-items:flex-end;gap:.5rem}
.nsx-inrow textarea{flex:1;resize:none;border:1px solid rgba(20,30,60,.18);border-radius:12px;padding:.6rem .75rem;
  font:inherit;font-size:.92rem;max-height:96px;outline:none;line-height:1.35;
  background:#fff;color:#1a2138;-webkit-text-fill-color:#1a2138}
.nsx-inrow textarea::placeholder{color:#9aa3bf;-webkit-text-fill-color:#9aa3bf}
.nsx-inrow textarea:focus{border-color:#001fcc;box-shadow:0 0 0 3px rgba(0,31,204,.14)}
.nsx-send{flex-shrink:0;width:42px;height:42px;border:none;border-radius:12px;cursor:pointer;background:#001fcc;color:#fff;display:flex;align-items:center;justify-content:center;transition:opacity .15s ease}
.nsx-send:disabled{opacity:.45;cursor:default}
.nsx-send svg{width:19px;height:19px}
.nsx-note{font-size:.68rem;color:#8a93a3;text-align:center;padding:.3rem 0 .1rem;margin:0}
.nsx-note a{color:#8a93a3}

@media(max-width:520px){
  .nsx-panel{right:10px;left:10px;bottom:10px;width:auto;max-width:none;height:auto;top:64px;max-height:none}
  .nsx-launch{right:16px;bottom:80px}
}
