/* NEXEI v3.1.0 - Assistant flutuante não modal e avatar proporcional */

.sr-only{
  position:absolute!important;
  width:1px!important;
  height:1px!important;
  padding:0!important;
  margin:-1px!important;
  overflow:hidden!important;
  clip:rect(0,0,0,0)!important;
  white-space:nowrap!important;
  border:0!important;
}

/* Avatar do usuário no menu lateral */
.user-card-v309 .user-card-top{
  align-items:center!important;
  gap:10px!important;
}
.sidebar-avatar{
  width:40px!important;
  height:40px!important;
  min-width:40px!important;
  min-height:40px!important;
  border-radius:50%!important;
  box-shadow:0 8px 18px rgba(79,70,229,.18)!important;
  font-size:13px!important;
}
.sidebar-avatar img{
  width:100%!important;
  height:100%!important;
  border-radius:50%!important;
  object-fit:cover!important;
}

/* Botão flutuante: somente o avatar circular */
.nexei-assistant-launcher{
  position:fixed!important;
  right:22px!important;
  bottom:22px!important;
  z-index:120!important;
  width:58px!important;
  height:58px!important;
  min-width:58px!important;
  min-height:58px!important;
  padding:0!important;
  margin:0!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  border:3px solid #fff!important;
  border-radius:50%!important;
  background:#fff!important;
  box-shadow:0 16px 38px rgba(30,41,59,.28)!important;
  overflow:hidden!important;
  cursor:pointer!important;
  transition:transform .18s ease,box-shadow .18s ease!important;
}
.nexei-assistant-launcher:hover,
.nexei-assistant-launcher:focus-visible{
  transform:translateY(-2px) scale(1.03)!important;
  box-shadow:0 20px 44px rgba(79,70,229,.32)!important;
}
.nexei-assistant-launcher img{
  width:100%!important;
  height:100%!important;
  padding:0!important;
  margin:0!important;
  border:0!important;
  border-radius:50%!important;
  object-fit:cover!important;
  background:#fff!important;
}

/* Chat pequeno e não modal */
.nexei-assistant-modal[hidden]{
  display:none!important;
}
.nexei-assistant-modal{
  position:fixed!important;
  inset:auto 22px 92px auto!important;
  right:22px!important;
  bottom:92px!important;
  width:390px!important;
  max-width:calc(100vw - 32px)!important;
  height:min(570px,calc(100vh - 125px))!important;
  max-height:calc(100vh - 125px)!important;
  z-index:119!important;
  display:block!important;
  background:transparent!important;
  pointer-events:auto!important;
  overflow:visible!important;
}
.nexei-assistant-modal .assistant-shell{
  width:100%!important;
  height:100%!important;
  max-width:none!important;
  display:flex!important;
  flex-direction:column!important;
  background:#fff!important;
  border:1px solid #dbe5f3!important;
  border-radius:20px!important;
  overflow:hidden!important;
  box-shadow:0 24px 64px rgba(15,23,42,.24)!important;
}
.nexei-assistant-modal.is-full{
  right:20px!important;
  bottom:20px!important;
  width:calc(100vw - 280px)!important;
  height:calc(100vh - 40px)!important;
  max-width:none!important;
  max-height:none!important;
}
.nexei-assistant-modal.is-full .assistant-shell{
  width:100%!important;
  height:100%!important;
  border-radius:22px!important;
}
.assistant-head{
  flex:0 0 auto!important;
  min-height:70px!important;
  padding:13px 14px!important;
  background:linear-gradient(135deg,#18264c,#3446d9)!important;
  color:#fff!important;
  border-bottom:0!important;
}
.assistant-title img{
  width:42px!important;
  height:42px!important;
  padding:0!important;
  border-radius:50%!important;
  object-fit:cover!important;
  background:#fff!important;
  border:2px solid rgba(255,255,255,.75)!important;
}
.assistant-title small{
  color:rgba(255,255,255,.8)!important;
}
.assistant-head-actions button{
  width:34px!important;
  height:34px!important;
  min-width:34px!important;
  border:1px solid rgba(255,255,255,.28)!important;
  border-radius:10px!important;
  background:rgba(255,255,255,.12)!important;
  color:#fff!important;
  cursor:pointer!important;
}
.assistant-history{
  flex:1 1 auto!important;
  min-height:0!important;
  padding:14px!important;
  gap:10px!important;
  overflow:auto!important;
  background:#f7f9fd!important;
  scroll-behavior:smooth!important;
}
.assistant-msg{
  max-width:86%!important;
  padding:10px 12px!important;
  border-radius:16px!important;
  font-size:13px!important;
  line-height:1.45!important;
  overflow-wrap:anywhere!important;
}
.assistant-msg-user{
  align-self:flex-end!important;
  color:#fff!important;
  background:linear-gradient(135deg,#4f46e5,#6d5dfc)!important;
  border-bottom-right-radius:5px!important;
  border:0!important;
}
.assistant-msg-bot{
  align-self:flex-start!important;
  color:#172033!important;
  background:#fff!important;
  border:1px solid #e1e7f1!important;
  border-bottom-left-radius:5px!important;
}
.assistant-msg-error{
  color:#991b1b!important;
  background:#fff1f2!important;
  border-color:#fecdd3!important;
}
.assistant-loading{
  display:inline-flex!important;
  align-items:center!important;
  gap:4px!important;
  min-width:48px!important;
}
.assistant-loading i{
  width:6px!important;
  height:6px!important;
  border-radius:50%!important;
  background:#6366f1!important;
  animation:nexeiAssistantPulse 1s infinite ease-in-out!important;
}
.assistant-loading i:nth-child(2){animation-delay:.15s!important}
.assistant-loading i:nth-child(3){animation-delay:.30s!important}
@keyframes nexeiAssistantPulse{
  0%,80%,100%{transform:scale(.65);opacity:.45}
  40%{transform:scale(1);opacity:1}
}
.assistant-suggestions{
  flex:0 0 auto!important;
  max-height:112px!important;
  overflow:auto!important;
  padding:9px 12px!important;
  gap:6px!important;
  background:#fff!important;
}
.assistant-chip{
  padding:7px 10px!important;
  border-radius:999px!important;
  font-size:11px!important;
  cursor:pointer!important;
}
.assistant-form{
  flex:0 0 auto!important;
  grid-template-columns:minmax(0,1fr) auto!important;
  padding:11px 12px!important;
  gap:8px!important;
  background:#fff!important;
}
.assistant-form input{
  width:100%!important;
  min-width:0!important;
  padding:10px 12px!important;
  border-radius:12px!important;
  font-size:13px!important;
}
.assistant-form button{
  min-width:68px!important;
  padding:10px 12px!important;
  border-radius:12px!important;
}
.assistant-form button:disabled,
.assistant-form input:disabled{
  opacity:.68!important;
  cursor:wait!important;
}

@media (max-width:980px){
  .nexei-assistant-launcher{
    right:14px!important;
    bottom:16px!important;
    width:54px!important;
    height:54px!important;
    min-width:54px!important;
    min-height:54px!important;
  }
  .nexei-assistant-modal{
    right:10px!important;
    bottom:80px!important;
    width:calc(100vw - 20px)!important;
    max-width:430px!important;
    height:min(68vh,560px)!important;
    max-height:calc(100vh - 100px)!important;
  }
  .nexei-assistant-modal.is-full{
    right:8px!important;
    bottom:8px!important;
    width:calc(100vw - 16px)!important;
    height:calc(100vh - 16px)!important;
  }
  .sidebar-avatar{
    width:38px!important;
    height:38px!important;
    min-width:38px!important;
    min-height:38px!important;
  }
}
