/* V9.3.13 — AI drawer: whole right panel can scroll; latest reply stays reachable. */
#aiDrawer{
  top:12px!important;
  bottom:12px!important;
  height:auto!important;
  max-height:none!important;
  overflow:hidden!important;
}
#aiDrawer .ai-drawer-head{
  flex:0 0 auto!important;
}
/* Scroll the whole content column instead of trapping the user in a tiny message viewport. */
#aiDrawer .ai-drawer-body{
  display:flex!important;
  flex-direction:column!important;
  flex:1 1 auto!important;
  min-height:0!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
  overscroll-behavior:contain!important;
  scrollbar-gutter:stable!important;
  scroll-behavior:smooth!important;
  padding-bottom:10px!important;
}
/* Let conversation history grow naturally; the drawer body owns scrolling. */
#aiDrawer #globalAssistantMessages,
#aiDrawer .assistant-messages#globalAssistantMessages{
  flex:0 0 auto!important;
  width:100%!important;
  min-height:220px!important;
  height:auto!important;
  max-height:none!important;
  overflow:visible!important;
  padding-bottom:10px!important;
}
/* Keep composer reachable while the user reviews long replies. */
#aiDrawer .assistant-input{
  position:sticky!important;
  left:0!important;
  right:0!important;
  bottom:-10px!important;
  flex:0 0 auto!important;
  z-index:120!important;
  margin-top:8px!important;
  padding:8px 0 10px!important;
  background:#fff!important;
  box-shadow:0 -8px 18px rgba(15,43,75,.05)!important;
}
#aiDrawer .assistant-msg{
  overflow-wrap:anywhere!important;
  word-break:break-word!important;
}
@media(max-width:700px){
  #aiDrawer{top:8px!important;bottom:8px!important;right:8px!important;max-width:calc(100vw - 16px)!important}
  #aiDrawer #globalAssistantMessages{min-height:180px!important}
}

/* V9.3.7 — image attachment controls; scoped to existing AI drawers only. */
#aiDrawer .assistant-input.v937-multimodal-composer,
#v72333TeacherDrawer .v72333-teacher-input.v937-multimodal-composer{
  flex-wrap:wrap!important;
  align-items:flex-end!important;
}
.v937-image-bar{display:contents}
.v937-image-previews{
  order:-2;
  flex:0 0 100%;
  display:flex;
  gap:6px;
  overflow-x:auto;
  padding:0 0 6px;
}
.v937-image-previews.hidden{display:none!important}
.v937-image-chip{
  position:relative;
  flex:0 0 82px;
  min-width:82px;
  border:1px solid #dbe5ed;
  background:#f8fbfd;
  border-radius:10px;
  padding:4px;
}
.v937-image-chip img{display:block;width:72px;height:50px;object-fit:cover;border-radius:7px;background:#edf2f7}
.v937-image-chip span{display:block;margin-top:3px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:9px;color:#60788b}
.v937-image-remove{position:absolute!important;right:1px!important;top:1px!important;width:20px!important;height:20px!important;min-height:20px!important;border:0!important;border-radius:50%!important;background:rgba(15,43,75,.82)!important;color:#fff!important;padding:0!important;line-height:20px!important;font-size:14px!important;cursor:pointer!important}
.v937-image-pick{
  order:-1;
  flex:0 0 44px!important;
  width:44px!important;
  min-width:44px!important;
  height:44px!important;
  min-height:44px!important;
  border:1px solid #cbd9e4!important;
  border-radius:10px!important;
  background:#f8fbfd!important;
  color:#315b7c!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  cursor:pointer!important;
}
.v937-image-pick:hover{background:#eef6fb!important;border-color:#9fc3d9!important}
#v72333TeacherDrawer .v937-image-pick{height:40px!important;min-height:40px!important;width:40px!important;min-width:40px!important}

