.cs-assistant{
  position:fixed;
  left:clamp(14px,2vw,24px);
  bottom:clamp(14px,2vw,24px);
  z-index:9988;
  font-family:inherit;
}
.cs-assistant *,
.cs-assistant *::before,
.cs-assistant *::after{
  box-sizing:border-box;
}

.cs-assistant__launcher{
  display:flex;
  align-items:center;
  gap:9px;
  min-height:48px;
  padding:7px 14px 7px 7px;
  border:1px solid rgba(255,255,255,.75);
  border-radius:999px;
  background:#0879b8;
  color:#fff;
  box-shadow:0 12px 30px rgba(4,43,67,.25);
  font:inherit;
  font-weight:800;
  cursor:pointer;
}
.cs-assistant__launcher[hidden]{
  display:none!important;
}
.cs-assistant__launcher:hover,
.cs-assistant__launcher:focus-visible{
  background:#075f90;
  outline:3px solid rgba(8,121,184,.22);
  outline-offset:3px;
}
.cs-assistant__launcher-icon{
  display:grid;
  place-items:center;
  width:34px;
  height:34px;
  flex:0 0 34px;
  border-radius:50%;
  background:#fff;
  color:#0879b8;
  font-size:20px;
  font-weight:900;
}
.cs-assistant__launcher-text{
  white-space:nowrap;
}

.cs-assistant__panel{
  position:absolute;
  left:0;
  bottom:0;
  display:flex;
  width:min(420px,calc(100vw - 32px));
  max-height:min(680px,calc(100dvh - 32px));
  flex-direction:column;
  overflow:hidden;
  border:1px solid #dce3ec;
  border-radius:18px;
  background:#fff;
  box-shadow:0 22px 60px rgba(13,34,54,.24);
  color:#172033;
}
.cs-assistant__panel[hidden]{
  display:none!important;
}

.cs-assistant__header{
  display:flex;
  flex:0 0 auto;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  padding:17px 18px;
  background:#0d2635;
  color:#fff;
}
.cs-assistant__header span{
  display:block;
  margin-bottom:3px;
  color:#f4b400;
  font-size:10px;
  font-weight:900;
  letter-spacing:.11em;
}
.cs-assistant__header h2{
  margin:0!important;
  color:#fff!important;
  font-size:19px!important;
  line-height:1.2!important;
}
.cs-assistant__close{
  display:grid;
  place-items:center;
  width:38px;
  height:38px;
  flex:0 0 38px;
  border:1px solid rgba(255,255,255,.22);
  border-radius:50%;
  background:rgba(255,255,255,.08);
  color:#fff;
  font-size:25px;
  line-height:1;
  cursor:pointer;
}
.cs-assistant__close:hover,
.cs-assistant__close:focus-visible{
  background:rgba(255,255,255,.16);
  outline:2px solid rgba(255,255,255,.45);
  outline-offset:2px;
}

.cs-assistant__body{
  display:flex;
  min-height:0;
  flex:1 1 auto;
  flex-direction:column;
  overflow:hidden;
}
.cs-assistant__messages{
  display:flex;
  min-height:118px;
  max-height:300px;
  flex:1 1 auto;
  flex-direction:column;
  gap:10px;
  overflow-y:auto;
  overscroll-behavior:contain;
  padding:16px;
  scrollbar-width:thin;
}
.cs-assistant__message{
  max-width:92%;
  padding:10px 12px;
  border-radius:13px;
  font-size:14px;
  line-height:1.5;
}
.cs-assistant__message p{
  margin:0 0 7px;
}
.cs-assistant__message p:last-child{
  margin-bottom:0;
}
.cs-assistant__message--assistant{
  align-self:flex-start;
  border:1px solid #e1e7ef;
  background:#f6f8fb;
}
.cs-assistant__message--user{
  align-self:flex-end;
  background:#0879b8;
  color:#fff;
}
.cs-assistant__message h3{
  margin:0 0 7px!important;
  font-size:15px!important;
  line-height:1.35!important;
}
.cs-assistant__message ul{
  margin:7px 0;
  padding-left:18px;
}
.cs-assistant__message a{
  font-weight:800;
}
.cs-assistant__actions{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  margin-top:9px;
}
.cs-assistant__actions a,
.cs-assistant__suggestion{
  display:inline-flex;
  min-height:34px;
  align-items:center;
  padding:6px 9px;
  border:1px solid #cbd8e5;
  border-radius:8px;
  background:#fff;
  color:#075f90;
  text-decoration:none;
  font:inherit;
  font-size:12px;
  font-weight:800;
  cursor:pointer;
}

.cs-assistant__quick{
  display:grid;
  flex:0 0 auto;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
  padding:0 16px 14px;
}
.cs-assistant__quick button{
  width:100%;
  min-width:0;
  min-height:40px;
  padding:8px 10px;
  border:1px solid #d7e1eb;
  border-radius:11px;
  background:#fff;
  color:#40506a;
  font:inherit;
  font-size:12px;
  font-weight:750;
  line-height:1.2;
  text-align:center;
  white-space:normal;
  cursor:pointer;
}
.cs-assistant__quick button:hover,
.cs-assistant__quick button:focus-visible{
  border-color:#0879b8;
  color:#0879b8;
  outline:2px solid rgba(8,121,184,.12);
  outline-offset:1px;
}

.cs-assistant__form{
  display:grid;
  flex:0 0 auto;
  grid-template-columns:minmax(0,1fr) auto;
  gap:8px;
  padding:12px 14px;
  border-top:1px solid #e7ecf2;
  background:#fff;
}
.cs-assistant__form input{
  width:100%;
  min-width:0;
  min-height:44px;
  border:1px solid #c9d4e0;
  border-radius:10px;
  padding:8px 11px;
  background:#fff;
  color:#172033;
  font:inherit;
  font-size:14px;
}
.cs-assistant__form input:focus{
  border-color:#0879b8;
  outline:3px solid rgba(8,121,184,.12);
}
.cs-assistant__form button{
  min-height:44px;
  border:0;
  border-radius:10px;
  background:#0879b8;
  color:#fff;
  padding:7px 15px;
  font:inherit;
  font-weight:800;
  cursor:pointer;
}
.cs-assistant__form button:hover,
.cs-assistant__form button:focus-visible{
  background:#075f90;
  outline:3px solid rgba(8,121,184,.18);
  outline-offset:2px;
}

.cs-assistant__footer{
  display:flex;
  flex:0 0 auto;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:9px 14px 11px;
  border-top:1px solid #edf1f5;
  background:#fafbfd;
  color:#687588;
  font-size:10px;
  line-height:1.35;
}
.cs-assistant__footer span{
  max-width:260px;
}
.cs-assistant__footer a{
  flex:0 0 auto;
  color:#0879b8;
  font-weight:800;
  text-decoration:none;
}
.cs-assistant__status{
  color:#687588;
  font-style:italic;
}
.cs-assistant__confidence{
  display:block;
  margin-top:7px;
  color:#7a8798;
  font-size:10px;
}
.cs-assistant__offline{
  margin-top:7px;
}
.cs-assistant__offline a{
  font-weight:800;
}

/* Celular em retrato e larguras compactas. */
@media(max-width:620px){
  .cs-assistant{
    left:14px;
    bottom:max(18px,env(safe-area-inset-bottom));
  }
  .cs-assistant__launcher{
    display:grid;
    place-items:center;
    width:52px;
    height:52px;
    min-height:52px;
    padding:0;
    border-radius:50%;
    box-shadow:0 10px 26px rgba(4,43,67,.28);
  }
  .cs-assistant__launcher[hidden]{
    display:none!important;
  }
  .cs-assistant__launcher-icon{
    width:38px;
    height:38px;
    flex-basis:38px;
    font-size:22px;
  }
  .cs-assistant__launcher-text{
    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;
  }
  .cs-assistant__panel{
    left:0;
    bottom:0;
    width:calc(100vw - 28px);
    max-height:calc(100dvh - 36px);
    border-radius:17px;
  }
  .cs-assistant__header{
    padding:15px 16px;
  }
  .cs-assistant__header h2{
    font-size:18px!important;
  }
  .cs-assistant__messages{
    min-height:105px;
    max-height:38dvh;
    padding:14px 14px 10px;
  }
  .cs-assistant__quick{
    gap:8px;
    padding:0 14px 12px;
  }
  .cs-assistant__quick button{
    min-height:42px;
  }
  .cs-assistant__form{
    padding:10px 12px;
  }
  .cs-assistant__footer{
    align-items:flex-start;
    flex-direction:column;
    padding:10px 14px 12px;
  }
  .cs-assistant__footer span{
    max-width:none;
  }
}

/* Celulares muito estreitos: prioriza legibilidade dos atalhos. */
@media(max-width:390px){
  .cs-assistant__quick{
    grid-template-columns:1fr;
  }
}

/* Celular na horizontal: painel compacto e sem barra horizontal. */
@media(orientation:landscape) and (max-height:620px) and (max-width:1100px){
  .cs-assistant{
    left:14px;
    bottom:14px;
  }
  .cs-assistant__panel{
    width:min(430px,calc(100vw - 28px));
    max-height:calc(100dvh - 28px);
  }
  .cs-assistant__header{
    padding:12px 14px;
  }
  .cs-assistant__header h2{
    font-size:17px!important;
  }
  .cs-assistant__messages{
    min-height:72px;
    max-height:24dvh;
    padding:10px 12px 8px;
  }
  .cs-assistant__message{
    font-size:12.5px;
  }
  .cs-assistant__quick{
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:6px;
    padding:0 12px 9px;
  }
  .cs-assistant__quick button{
    min-height:34px;
    padding:6px 8px;
    font-size:11.5px;
  }
  .cs-assistant__form{
    padding:8px 10px;
  }
  .cs-assistant__form input,
  .cs-assistant__form button{
    min-height:38px;
  }
  .cs-assistant__footer{
    padding:7px 10px 8px;
    font-size:9.5px;
  }
}

@media(prefers-reduced-motion:reduce){
  .cs-assistant *{
    scroll-behavior:auto!important;
    transition:none!important;
  }
}

/* alpha.90.51 — passos de ajuda mais legíveis no FAQ e no Assistente */
.cs-assistant__message ol,
.cs-assistant__message ul{
  margin:9px 0;
  padding-left:0;
  list-style:none;
  display:grid;
  gap:7px;
}
.cs-assistant__message li{
  position:relative;
  padding:8px 9px 8px 34px;
  border:1px solid #e1e7ef;
  border-radius:9px;
  background:#fff;
  line-height:1.4;
}
.cs-assistant__message ol{counter-reset:csassistantstep}
.cs-assistant__message ol>li{counter-increment:csassistantstep}
.cs-assistant__message ol>li:before{
  content:counter(csassistantstep);
  position:absolute;
  left:9px;
  top:8px;
  width:18px;
  height:18px;
  border-radius:50%;
  display:grid;
  place-items:center;
  background:#0879b8;
  color:#fff;
  font-size:10px;
  font-weight:800;
}
.cs-assistant__message ul>li:before{
  content:"✓";
  position:absolute;
  left:10px;
  top:7px;
  color:#0879b8;
  font-weight:900;
}
.cs-assistant__message li strong{
  display:block;
  margin-bottom:1px;
  color:#152036;
}
.cs-assistant__message li span{
  display:block;
  color:#526078;
}
