/* Included only by the fictional local preview. */
#sc-composer{flex:none;padding:12px 20px 16px;background:#fafbfd;border-top:1px solid #dbe2e8;color:#243247;font:13px/1.45 system-ui}
#sc-composer[hidden]{display:none!important}.sc-heading,.sc-fields,.sc-bottom{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.sc-heading span{font-size:11px;color:#52637c}.sc-fields{margin:8px 0}.sc-fields label{display:flex;align-items:center;gap:8px}#sc-customer{font-size:12px;color:#52637c}#sc-composer input,#sc-composer select,#sc-body{font:inherit;color:#243247;background:#fff;border:1px solid #bfccd9;border-radius:6px;padding:8px}#sc-composer select{min-height:36px}#sc-subject-row{display:grid;gap:4px;margin-bottom:8px}#sc-subject-row[hidden]{display:none!important}#sc-body-label{display:block;margin-bottom:4px}#sc-body{display:block;width:100%;min-height:84px;max-height:200px;resize:vertical}.sc-bottom{margin-top:8px}#sc-status{flex:1;min-width:170px;font-size:11px;color:#52637c}.sc-bottom button{font:inherit;border:1px solid #bfccd9;border-radius:6px;padding:7px 10px;background:#fff;color:#243247}.sc-bottom button:disabled{opacity:.6;cursor:default}#tr-comms[data-sandbox-composers="true"] .tr-conversation-panel{min-height:0}#tr-comms[data-sandbox-composers="true"] .tr-thread{min-height:0;overflow:auto}#tr-comms[data-sandbox-composers="true"] .tr-composer-wrap{flex:none}
@media(max-width:650px),(max-width:950px) and (max-height:500px) and (pointer:coarse){#sc-composer{padding:12px}#sc-composer input,#sc-composer select,#sc-body{font-size:16px}#sc-composer select,.sc-bottom button{min-height:44px}#sc-body{max-height:160px}#tr-comms[data-sandbox-composers="true"] .tr-thread{min-height:100px}}
@media(max-width:650px),(max-width:950px) and (max-height:500px) and (pointer:coarse){#tr-comms[data-sandbox-composers="true"] .tr-workspace{flex:1 1 0;min-height:0}#tr-comms[data-sandbox-composers="true"] .tr-header,#tr-comms[data-sandbox-composers="true"] .tr-jobbar,#tr-comms[data-sandbox-composers="true"] .tr-tabs,#tr-comms[data-sandbox-composers="true"] .tr-footer{flex:none}#tr-comms[data-sandbox-composers="true"] .tr-thread{min-height:0}#tr-comms[data-sandbox-composers="true"] .tr-notes{min-height:0}#sc-composer{max-height:55dvh;overflow:auto}}
@media(max-width:650px),(max-width:950px) and (max-height:500px) and (pointer:coarse){#tr-comms[data-sandbox-composers="true"] .tr-workspace{overflow:hidden}}

/* Constrain the embedded app to its viewport; let history and Notes scroll. */
#tr-comms[data-sandbox-composers="true"] .tr-shell{height:100%;min-height:0;grid-template-rows:minmax(0,1fr);overflow:hidden}
#tr-comms[data-sandbox-composers="true"] .tr-workspace{min-height:0;overflow:hidden}
#tr-comms[data-sandbox-composers="true"] .tr-conversation-panel{flex:1;min-height:0;overflow:hidden}
#tr-comms[data-sandbox-composers="true"] .tr-header,#tr-comms[data-sandbox-composers="true"] .tr-jobbar,#tr-comms[data-sandbox-composers="true"] .tr-tabs,#tr-comms[data-sandbox-composers="true"] .tr-footer,#tr-comms[data-sandbox-composers="true"] .tr-feedback{flex:none}
#tr-comms[data-sandbox-composers="true"] .tr-notes{min-height:0;overflow:auto}

/* Keep editor actions in view while the rich document itself scrolls. */
#tr-comms[data-sandbox-composers="true"] .tr-shell,#tr-comms[data-sandbox-composers="true"] .tr-workspace,#tr-comms[data-sandbox-composers="true"] .tr-conversation-panel{overflow:clip}
#tr-comms[data-sandbox-composers="true"] .tr-notes{overflow:hidden}
#tr-comms[data-sandbox-composers="true"] .tr-notes-card{display:flex;flex-direction:column;height:100%;min-height:0;overflow:hidden}
#tr-comms[data-sandbox-composers="true"] .tr-notes-top{flex:none;margin-bottom:10px}
#tr-comms[data-sandbox-composers="true"] #tr-note-edit{display:flex;flex-direction:column;flex:1;min-height:0}
#tr-comms[data-sandbox-composers="true"] #sc-note-caption{flex:none;margin:0 0 8px;color:#52637c;font-size:11px;line-height:1.4}
#tr-comms[data-sandbox-composers="true"] .tr-rich-toolbar,#tr-comms[data-sandbox-composers="true"] .tr-note-controls{flex:none}
#tr-comms[data-sandbox-composers="true"] #tr-note-input{flex:1;min-height:0;height:auto;overflow:hidden}
#tr-comms[data-sandbox-composers="true"] #tr-note-input .ql-editor{height:100%;min-height:0;overflow:auto}
#tr-comms[data-sandbox-composers="true"] .tr-note-controls{padding-top:8px}

@media(max-width:650px),(max-width:950px) and (max-height:500px) and (pointer:coarse){
 #tr-comms[data-sandbox-composers="true"] .tr-jobbar:has(#tr-deal-buttons:empty){display:none}
 #tr-comms[data-sandbox-composers="true"] .tr-footer{padding:6px 12px;min-height:0;font-size:11px;line-height:1.3}
 #tr-comms[data-sandbox-composers="true"] .tr-footer>span:first-child{display:none}
 #tr-comms[data-sandbox-composers="true"] .tr-notes{padding:8px}
 #tr-comms[data-sandbox-composers="true"] .tr-notes-card{padding:8px}
 #tr-comms[data-sandbox-composers="true"] .tr-notes-top{display:none}
 #tr-comms[data-sandbox-composers="true"] .tr-rich-toolbar{padding:5px;gap:3px}
 #tr-comms[data-sandbox-composers="true"] .tr-rich-toolbar .tr-rich-divider{margin:0 1px}
 #tr-comms[data-sandbox-composers="true"] #sc-note-caption{margin-bottom:5px}
 #tr-comms[data-sandbox-composers="true"] .tr-note-controls{padding-top:5px}
}
/* Phone composing takes the available panel, without pushing actions below it. */
@media(max-width:650px),(max-width:950px) and (max-height:500px) and (pointer:coarse){
 #tr-comms[data-sandbox-composers="true"] #tr-conversation-panel:has(#sc-composer:not([hidden])) .tr-thread{flex:1 1 0;min-height:0;padding-top:0;padding-bottom:0}
 #sc-composer{display:flex;flex-direction:column;flex:0 1 auto;min-height:0;max-height:100%;overflow:hidden}
 #sc-composer .sc-heading,#sc-customer{display:none}
 #sc-composer .sc-fields{flex:none;margin:0 0 6px}
 #sc-composer #sc-subject-row{display:flex;flex:none;align-items:center;gap:8px;margin:0 0 6px}
 #sc-subject{flex:1;min-width:0;height:44px}
 #sc-body-label{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
 #sc-body{flex:1 1 44px;min-height:44px;height:auto;max-height:none;resize:none;overflow:auto}
 #sc-composer .sc-bottom{display:grid;flex:none;grid-template-columns:1fr 1fr;gap:4px;margin-top:6px}
 #sc-status{grid-column:1/-1;min-width:0;font-size:10px;line-height:1.3}
 #sc-composer .sc-bottom button{min-height:44px;padding:6px}
}
