/* Connect Pro 10.0.5 — chat layout hardening. Loaded last; only keeps content inside the box. */
#wspc-support-widget.wspc-widget .wspc-chat-shell{display:flex!important;flex-direction:column!important;min-height:0!important;overflow:hidden!important}
#wspc-support-widget.wspc-widget .wspc-chat-shell>.wspc-chat-stream{flex:1 1 auto!important;min-height:0!important;overflow-y:auto!important;overflow-x:hidden!important;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
/* Everything under the messages keeps its size; the message list is what shrinks and scrolls. */
#wspc-support-widget.wspc-widget .wspc-chat-shell>.wspc-chat-form,
#wspc-support-widget.wspc-widget .wspc-chat-shell>.wspc-chat-footer,
#wspc-support-widget.wspc-widget .wspc-chat-shell>.wspc-chat-inline-actions,
#wspc-support-widget.wspc-widget .wspc-chat-shell>.wspc-chat-closed,
#wspc-support-widget.wspc-widget .wspc-chat-shell>.wspc-chat-session-timer{flex:0 0 auto!important;min-width:0!important;max-width:100%!important}
/* Composer: the text area, caret, icons and send button stay inside the frame at any text length. */
#wspc-support-widget.wspc-widget .wspc-chat-form{box-sizing:border-box!important;min-width:0!important}
#wspc-support-widget.wspc-widget .wspc-chat-form>*{min-width:0}
#wspc-support-widget.wspc-widget .wspc-chat-form .wspc-chat-input{min-width:0!important;max-width:100%!important;box-sizing:border-box!important;white-space:pre-wrap!important;overflow-wrap:anywhere!important;word-break:break-word!important}
#wspc-support-widget.wspc-widget .wspc-chat-form .wspc-chat-tool,
#wspc-support-widget.wspc-widget .wspc-chat-form button.wspc-chat-send{flex:0 0 auto}
/* Boxes that appear in the middle of the chat (identity form, topic/expert chooser) scroll instead of pushing the composer out. */
#wspc-support-widget.wspc-widget .wspc-chat-shell>.wspc-chat-routing,
#wspc-support-widget.wspc-widget .wspc-chat-shell>.wspc-chat-profile,
#wspc-support-widget.wspc-widget .wspc-chat-shell>.wspc-chat-profile-accordion{min-height:0;max-height:min(46vh,380px);overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
#wspc-support-widget.wspc-widget .wspc-chat-route-picker-page{flex:1 1 auto;min-height:0;max-width:100%;overflow-y:auto!important;overflow-x:hidden!important;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
#wspc-support-widget.wspc-widget .wspc-chat-route-picker-page .wspc-chat-route-switch-agent-options,
#wspc-support-widget.wspc-widget .wspc-chat-route-picker-page .wspc-chat-agent-options{max-height:none!important;overflow:visible!important}
#wspc-support-widget.wspc-widget .wspc-chat-route-switch-agent-options,
#wspc-support-widget.wspc-widget .wspc-chat-agent-options,
#wspc-support-widget.wspc-widget .wspc-chat-scenario-list{min-width:0;max-width:100%}
/* Long messages and links wrap inside the bubble. */
#wspc-support-widget.wspc-widget .wspc-chat-stream>.wspc-chat-messages{min-width:0;max-width:100%}
#wspc-support-widget.wspc-widget .wspc-chat-message{min-width:0;max-width:100%}
#wspc-support-widget.wspc-widget .wspc-chat-bubble{min-width:0;height:auto!important;max-height:none!important;overflow:visible!important;text-overflow:clip!important;white-space:pre-wrap;overflow-wrap:anywhere;word-break:normal;width:fit-content}
/* A long link is shown in full: it wraps at the bubble edge only when it has to (never cut with an ellipsis, never squeezed per character). */
#wspc-support-widget.wspc-widget .wspc-chat-bubble a{display:inline;max-width:100%;overflow-wrap:anywhere;word-break:normal;white-space:normal;text-overflow:clip;overflow:visible}
#wspc-support-widget.wspc-widget .wspc-chat-bubble img,
#wspc-support-widget.wspc-widget .wspc-chat-bubble video{max-width:100%;height:auto}
/* A request in flight only dims the send button; it never blocks typing. */
#wspc-support-widget.wspc-widget.wspc-chat-is-busy .wspc-chat-input{opacity:1}
