/* SAVA Studio: one scroll surface for chat, independently scrolling sidebar.
   Fixed viewport also prevents the outer page/body from acquiring a second bar. */
html,body,#root{height:100%;min-height:0;max-height:100%;overflow:hidden}
#root>.layout{height:100dvh;min-height:0;max-height:100dvh;overflow:hidden}
#root .layout>.side{height:100%;min-height:0;max-height:100%;overflow:hidden}
#root .layout>.side .side-history{min-height:0;flex:1 1 auto;overflow:hidden}
#root .layout>.side .chat-history{min-height:0;flex:1 1 auto;overflow-y:auto;overscroll-behavior:contain}
#root .layout>.content{height:100%;min-height:0;max-height:none;overflow:hidden;display:flex;flex-direction:column}
#root .layout>.content>.top{flex:0 0 auto}
#root #chatView.chatwrap{height:auto!important;min-height:0!important;min-width:0;flex:1 1 auto;overflow:hidden}
#root #chatView>.chat-main{height:100%;min-height:0;min-width:0;overflow:hidden;display:flex;flex-direction:column}
#root #chatView .chat-top{flex:0 0 auto}
#root #messages.conversation{height:auto;min-height:0;flex:1 1 auto;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;scrollbar-gutter:stable}
#root #chatView .prompt-box{flex:0 0 auto}
#root #workspaceView.studio-page{flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain}
#root .limits-panel{min-height:0;overflow-y:auto;overscroll-behavior:contain}
#root .bubble.assistant{white-space:normal}
#root .bubble.assistant p{white-space:normal;overflow-wrap:anywhere}
#root .bubble.assistant ol,#root .bubble.assistant ul{padding-left:1.65em;margin:.45em 0 .75em;list-style-position:outside}
#root .bubble.assistant ol{list-style-type:decimal}
#root .bubble.assistant ul{list-style-type:disc}
#root .bubble.assistant li{white-space:normal;overflow-wrap:anywhere;margin:.35em 0}
#root .bubble.assistant li>ul{margin:.55em 0 .4em}
#root .bubble.assistant .sava-reply-math{margin:.4em 0 .85em;white-space:normal;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
#root .bubble.assistant .sava-reply-math-inline{font-variant-numeric:tabular-nums;white-space:normal;overflow-wrap:anywhere}
#root .bubble.assistant pre{white-space:pre-wrap;overflow-wrap:anywhere}
@media(max-width:620px){
 #root #chatView.chatwrap{height:auto!important;min-height:0!important}
 #root #messages.conversation{scrollbar-gutter:auto}
 #root .layout>.side.open{height:100dvh;max-height:100dvh}
}
