
.ancs-chat{ max-width:900px; margin:0 auto; border:1px solid #e6e6e6; border-radius:16px; background:#fff; box-shadow:0 8px 24px rgba(0,0,0,.06); display:flex; flex-direction:column; min-height:360px; }
.ancs-thread{ padding:18px; overflow:auto; max-height:60vh; }
.ancs-bubble{ display:flex; gap:10px; margin-bottom:14px; }
.ancs-bubble.user{ justify-content:flex-end; }
.ancs-bubble.bot{ justify-content:flex-start; }
.ancs-bubble .avatar{ width:36px; height:36px; border-radius:8px; background:#eef3f0; display:flex; align-items:center; justify-content:center; font-weight:600; }
.ancs-msg{ max-width:76%; padding:12px 14px; border-radius:14px; line-height:1.5; font-size:16px; }
.user .ancs-msg{ background:#e7f5ee; border:1px solid #cfe9dd; }
.bot .ancs-msg{ background:#f7fbf8; border:1px solid #e6efe9; }

.ancs-item{ margin-top:10px; padding:10px 12px; border-radius:12px; border:1px solid #eef0ef; background:#fff; }
.ancs-item a{ text-decoration:none; color:#0a3d24; font-weight:600; display:block; margin-bottom:4px; }
.ancs-item .excerpt{ font-size:14px; opacity:.85; }

.ancs-typing{ display:inline-block; width:32px; }
.ancs-typing span{ display:inline-block; width:6px; height:6px; border-radius:50%; background:#9bb7aa; margin-right:4px; animation: ancs-bounce 1.2s infinite ease-in-out; }
.ancs-typing span:nth-child(2){ animation-delay: .15s; }
.ancs-typing span:nth-child(3){ animation-delay: .3s; }

@keyframes ancs-bounce {
  0%, 80%, 100% { transform: scale(0); opacity:.5; }
  40% { transform: scale(1); opacity:1; }
}

.ancs-inputbar{ border-top:1px solid #e6e6e6; display:flex; gap:10px; padding:12px; }
.ancs-input{ flex:1 1 auto; height:52px; border-radius:9999px; border:1px solid #cfd8d3; padding:0 18px; font-size:16px; outline:none; }
.ancs-send{ height:52px; padding:0 18px; border-radius:9999px; border:0; background:#009345; color:#fff; cursor:pointer; }

@media (max-width:782px){
  .ancs-chat{ border-radius:0; box-shadow:none; border-left:0; border-right:0; }
  .ancs-msg{ max-width:100%; }
}
