/* R105 — hyChat compact composer, bubble geometry and thinking lifecycle polish. */
[data-hyos-host] .os-window .hyos-chat-composer{
  display:flex!important;
  align-items:flex-end!important;
  gap:5px!important;
  min-height:42px!important;
  padding:5px 6px!important;
  margin:4px 8px 0!important;
  border-radius:17px!important
}
[data-hyos-host] .os-window .hyos-chat-composer textarea{
  flex:1 1 auto!important;
  width:auto!important;
  min-width:0!important;
  min-height:30px!important;
  height:30px;
  max-height:72px!important;
  padding:5px 6px!important;
  margin:0!important;
  line-height:20px!important;
  align-self:flex-end!important;
  border-radius:10px!important;
  overflow-y:hidden
}
[data-hyos-host] .os-window .hyos-chat-compose-attach,
[data-hyos-host] .os-window .hyos-chat-compose-mic,
[data-hyos-host] .os-window .hyos-chat-compose-voice{
  flex:0 0 30px!important;
  width:30px!important;min-width:30px!important;max-width:30px!important;
  height:30px!important;min-height:30px!important;max-height:30px!important;
  padding:0!important;margin:0!important;
  display:grid!important;place-items:center!important;
  border-radius:999px!important;
  align-self:flex-end!important;
  font-size:18px!important;
  line-height:1!important
}
[data-hyos-host] .os-window .hyos-chat-compose-attach{font-size:20px!important;font-weight:400!important}
[data-hyos-host] .os-window .hyos-chat-actions{
  flex:0 0 auto!important;
  display:flex!important;
  align-items:flex-end!important;
  gap:4px!important;
  margin:0!important
}
[data-hyos-host] .os-window .hyos-chat-actions button{
  width:30px!important;min-width:30px!important;max-width:30px!important;
  height:30px!important;min-height:30px!important;max-height:30px!important;
  padding:0!important;margin:0!important;
  display:grid!important;place-items:center!important;
  border-radius:999px!important;
  font-size:15px!important;font-weight:800!important
}
[data-hyos-host] .hyos-chat-mic-icon{
  width:9px;height:13px;border:2px solid currentColor;border-radius:7px;position:relative;display:block
}
[data-hyos-host] .hyos-chat-mic-icon:before{
  content:"";position:absolute;left:50%;bottom:-6px;transform:translateX(-50%);
  width:13px;height:7px;border:2px solid currentColor;border-top:0;border-radius:0 0 8px 8px
}
[data-hyos-host] .hyos-chat-mic-icon:after{
  content:"";position:absolute;left:50%;bottom:-9px;transform:translateX(-50%);
  width:2px;height:4px;background:currentColor;border-radius:2px
}
[data-hyos-host] .hyos-chat-wave-icon{
  display:flex;align-items:center;justify-content:center;gap:2px;width:16px;height:16px
}
[data-hyos-host] .hyos-chat-wave-icon i{
  width:2px;height:7px;background:currentColor;border-radius:4px;display:block;transform-origin:center
}
[data-hyos-host] .hyos-chat-wave-icon i:nth-child(2){height:13px}
[data-hyos-host] .hyos-chat-wave-icon i:nth-child(3){height:10px}
[data-hyos-host] .hyos-chat-wave-icon i:nth-child(4){height:5px}
[data-hyos-host] .hyos-chat-compose-voice[data-state=listening] .hyos-chat-wave-icon i,
[data-hyos-host] .hyos-chat-compose-voice[data-state=speaking] .hyos-chat-wave-icon i{
  animation:hyos-wave-bars .65s ease-in-out infinite alternate
}
[data-hyos-host] .hyos-chat-compose-voice[data-state=listening] .hyos-chat-wave-icon i:nth-child(2),
[data-hyos-host] .hyos-chat-compose-voice[data-state=speaking] .hyos-chat-wave-icon i:nth-child(2){animation-delay:.12s}
[data-hyos-host] .hyos-chat-compose-voice[data-state=listening] .hyos-chat-wave-icon i:nth-child(3),
[data-hyos-host] .hyos-chat-compose-voice[data-state=speaking] .hyos-chat-wave-icon i:nth-child(3){animation-delay:.24s}
@keyframes hyos-wave-bars{from{transform:scaleY(.55)}to{transform:scaleY(1.25)}}

/* Bubbles should hug content, not look like full-width panels. */
[data-hyos-host] .os-window .hyos-chat-messages{
  gap:10px!important;
  padding:10px 12px!important
}
[data-hyos-host] .os-window .hyos-chat-messages>.hy-message{
  display:flex!important;
  width:100%!important;
  max-width:100%!important;
  margin:0!important
}
[data-hyos-host] .os-window .hyos-chat-messages>.hy-message.user{justify-content:flex-end!important}
[data-hyos-host] .os-window .hyos-chat-messages>.hy-message.assistant{justify-content:flex-start!important}
[data-hyos-host] .os-window .hyos-chat-messages .hy-bubble{
  width:fit-content!important;
  min-width:0!important;
  max-width:min(88%,680px)!important;
  padding:9px 11px!important;
  border-radius:16px!important;
  box-shadow:0 7px 22px rgba(0,0,0,.15)!important
}
[data-hyos-host] .os-window .hyos-chat-messages .hy-message.user .hy-bubble{
  max-width:min(76%,620px)!important;
  border-bottom-right-radius:6px!important
}
[data-hyos-host] .os-window .hyos-chat-messages .hy-message.assistant .hy-bubble{
  border-bottom-left-radius:6px!important
}
[data-hyos-host] .os-window .hyos-native-chat .hy-message-head{
  min-height:0!important;
  margin:0 0 5px!important;
  gap:6px!important
}
[data-hyos-host] .os-window .hyos-native-chat .hy-message-avatar{
  width:26px!important;height:26px!important;min-width:26px!important
}
[data-hyos-host] .os-window .hyos-chat-messages .hy-speaker{
  font-size:9px!important;line-height:1!important
}
[data-hyos-host] .os-window .hyos-chat-messages .hy-prose{
  font-size:13px!important;
  line-height:1.48!important
}
[data-hyos-host] .os-window .hyos-chat-messages .hy-prose>:first-child{margin-top:0!important}
[data-hyos-host] .os-window .hyos-chat-messages .hy-prose>:last-child{margin-bottom:0!important}
[data-hyos-host] .os-window .hyos-chat-messages .hy-prose p{margin:.38em 0!important}
[data-hyos-host] .os-window .hyos-chat-messages .hy-ui-loader{
  width:max-content!important;
  max-width:100%!important;
  margin:4px 0 0!important;
  padding:6px 8px!important;
  border-radius:10px!important
}
[data-hyos-host] .os-window .hyos-chat-messages .hy-ui-loader[data-active=false]{display:none!important}

@container hyos-lite-window (max-width:620px){
  [data-hyos-host] .os-window .hyos-chat-composer{margin:4px 5px 5px!important;padding:4px 5px!important;gap:4px!important}
  [data-hyos-host] .os-window .hyos-chat-composer textarea{min-height:30px!important;height:30px;max-height:70px!important;padding:5px!important}
  [data-hyos-host] .os-window .hyos-chat-compose-attach,
  [data-hyos-host] .os-window .hyos-chat-compose-mic,
  [data-hyos-host] .os-window .hyos-chat-compose-voice,
  [data-hyos-host] .os-window .hyos-chat-actions button{
    flex-basis:30px!important;width:30px!important;min-width:30px!important;max-width:30px!important;
    height:30px!important;min-height:30px!important;max-height:30px!important
  }
  [data-hyos-host] .os-window .hyos-chat-messages{padding:8px!important;gap:8px!important}
  [data-hyos-host] .os-window .hyos-chat-messages .hy-bubble{max-width:92%!important;padding:8px 9px!important}
  [data-hyos-host] .os-window .hyos-chat-messages .hy-message.user .hy-bubble{max-width:86%!important}
}
@container hyos-lite-window (max-width:390px){
  [data-hyos-host] .os-window .hyos-chat-composer{gap:3px!important}
  [data-hyos-host] .os-window .hyos-chat-compose-mic{display:none!important}
  [data-hyos-host] .os-window .hyos-chat-messages .hy-bubble{max-width:95%!important}
  [data-hyos-host] .os-window .hyos-chat-messages .hy-message.user .hy-bubble{max-width:90%!important}
}
