/* History and latest-message controls also work in the existing desktop window. */
.global-chat-thread{overflow-anchor:none;overscroll-behavior:contain}
.ta-chat-older,.ta-chat-new-messages{display:block;border:0;border-radius:16px;padding:7px 14px;margin:6px auto;background:#eaf3f3;color:#17665e;font:inherit;font-size:12px;cursor:pointer}
.ta-chat-older[hidden],.ta-chat-new-messages[hidden]{display:none!important}
.ta-chat-older:disabled{opacity:.6;cursor:wait}
.ta-chat-new-messages{flex:0 0 auto;max-width:calc(100% - 24px)}
@media(max-width:980px){
  html.ta-chat-fullscreen-open{overflow:hidden;overscroll-behavior:none}
  .ta-ui-rc .global-chat-widget.is-open{z-index:10040!important}
  .ta-ui-rc .global-chat-widget.is-open>.global-chat-fab{display:none!important}
  .ta-ui-rc .global-chat-panel[data-chat-geometry="v113"]{
    position:fixed!important;
    left:var(--ta-chat-visual-left,0px)!important;top:var(--ta-chat-visual-top,0px)!important;
    right:auto!important;bottom:auto!important;
    width:var(--ta-chat-visual-width,100vw)!important;height:var(--ta-chat-visual-height,100dvh)!important;
    min-width:0!important;min-height:0!important;max-width:none!important;max-height:none!important;
    border:0!important;border-radius:0!important;box-shadow:none!important;
    padding:env(safe-area-inset-top,0px) env(safe-area-inset-right,0px) 0 env(safe-area-inset-left,0px);
    box-sizing:border-box;transform:none!important;background:#fff;
  }
  .ta-ui-rc .global-chat-panel .ta-chat-stage{
    position:relative!important;left:auto!important;top:auto!important;
    display:flex!important;flex-direction:column;width:100%!important;height:100%!important;
    transform:none!important;min-height:0!important;
  }
  .ta-ui-rc .global-chat-window-head{
    flex:0 0 auto;min-height:48px;max-height:56px;overflow:hidden;
    display:grid!important;grid-template-columns:minmax(0,1fr) auto 44px!important;
    padding:2px 8px!important;touch-action:auto!important;
  }
  .ta-ui-rc .global-chat-window-title{flex-wrap:nowrap}
  .ta-ui-rc .global-chat-dynamic{flex:1 1 0;height:auto!important;min-height:0!important;overflow:hidden}
  .ta-ui-rc .global-chat-shell{height:100%;min-height:0}
  .ta-ui-rc .global-chat-conversation{display:flex;flex-direction:column;min-height:0;overflow:hidden}
  .ta-ui-rc .global-chat-person-head{flex:0 0 auto;min-height:48px;max-height:68px;overflow:auto}
  .ta-ui-rc .global-chat-conversation>.is-compose-context{flex:0 1 auto;max-height:15%;min-height:0;overflow:auto}
  .ta-ui-rc .global-chat-thread{flex:1 1 0;min-height:0;padding:10px 8px;overflow-y:auto;touch-action:pan-y}
  .ta-ui-rc .global-chat-compose{
    flex:0 0 auto;min-height:0;max-height:45%;overflow-y:auto;
    padding:6px 8px calc(6px + env(safe-area-inset-bottom,0px));
  }
  .ta-ui-rc .global-chat-compose .ta-chat-input-area{flex:0 0 auto;min-height:40px;max-height:100px;overflow-y:auto}
  .ta-ui-rc .global-chat-compose textarea{font-size:16px;min-height:40px!important;height:40px;max-height:72px!important;resize:none}
  .ta-ui-rc .global-chat-compose-actions{
    display:flex!important;align-items:center;gap:8px!important;margin-top:4px;
  }
  .ta-ui-rc .global-chat-compose-actions>label{flex:0 0 44px;width:44px;min-width:44px;min-height:40px;display:grid;place-items:center}
  .ta-ui-rc .global-chat-compose-actions>label>span{display:none}
  .ta-ui-rc .global-chat-compose-actions>.btn{margin-inline-start:auto;flex:0 0 auto;min-height:40px;height:40px;max-width:60%;white-space:normal}
  .ta-ui-rc .global-chat-panel .ta-chat-resize{display:none!important}
  .ta-ui-rc .ta-chat-new-messages{font-size:13px;padding:5px 12px;margin:3px auto}
  .ta-ui-rc .global-chat-bubble .ta-message-body{font-size:14px;line-height:1.5}
}
