/* Keep the conversation, rather than service panels, in the available viewport. */
#assistantWaitOffer{flex:none;align-self:stretch;box-sizing:border-box;padding:12px;border:1px solid #d6dfd7;border-radius:12px;background:#f6f7f3;color:#20342d}
#assistantWaitOffer p{margin:0 0 10px;font:13px/1.45 Arial,sans-serif}
#assistantWaitOffer button{min-height:40px;padding:8px 12px;border:1px solid #c3cfc6;border-radius:10px;background:#fff;color:#315847;font:700 13px Arial,sans-serif;cursor:pointer}
#assistantWaitOffer button:first-child{background:#315847;color:#fff}
#assistantWaitOffer button:disabled{opacity:.55}
#assistantWaitOffer button:focus-visible{outline:2px solid #a58042;outline-offset:2px}
@media(max-width:700px){
 body.sm-admin-chat-restored .messenger__header{height:52px!important;min-height:52px!important;max-height:none!important;padding:4px 52px!important;flex:0 0 52px!important;overflow:visible!important;box-shadow:none!important}
 body.sm-admin-chat-restored .messenger__header-top{min-height:44px!important}
 body.sm-admin-chat-restored .messenger__header .person,body.sm-admin-chat-restored .messenger__header .person__avatar{width:32px!important;min-width:32px!important;height:32px!important}
 body.sm-admin-chat-restored .messenger__header .operator-actions{width:calc(100% - 108px)!important}
 body.sm-admin-chat-restored .messenger__header .call-wrap:not([hidden]){position:static!important;inset:auto!important;width:100%!important;transform:none!important}
 body.sm-admin-chat-restored .messenger__header .call-specialist{min-height:40px!important;padding:6px 8px!important}
 body.sm-admin-chat-restored .messenger__header .call-specialist::before,body.sm-admin-chat-restored .messenger__header .call-specialist::after,body.sm-admin-chat-restored .messenger__header .call-specialist__state small{display:none!important}
 body.sm-admin-chat-restored .sm-mobile-chat-close{display:grid!important;place-items:center!important;width:44px!important;height:44px!important;right:0!important;min-width:44px!important;padding:0!important}
 /* With the assistant toolbar present, the old header supplies only the close button. */
 body.sm-admin-chat-restored.has-chat-assistant .messenger__header{position:absolute!important;inset:0 0 auto auto!important;width:44px!important;height:48px!important;min-height:0!important;padding:0!important;background:transparent!important;pointer-events:none}
 body.sm-admin-chat-restored.has-chat-assistant .messenger__header-top{display:none!important}
 body.sm-admin-chat-restored.has-chat-assistant .sm-mobile-chat-close{pointer-events:auto;color:#315847!important;background:transparent!important;border:0!important;top:2px!important;transform:none!important}
 body.sm-admin-chat-restored #assistantChoice{box-sizing:border-box;flex:0 0 auto;min-height:56px;max-height:none;padding:6px calc(64px + env(safe-area-inset-right)) 6px 10px;overflow:visible;background:#f6f7f3}
 /* The host close button occupies 40px + an 8px inset; leave a 16px gap. */
 body.sm-chat-embedded .sm-mobile-chat-close{display:none!important}
 #assistantChoice .assistant-choice-heading{min-height:44px;gap:6px}
 #assistantChoice .assistant-choice-identity{display:flex;flex:1;align-items:center;gap:3px;min-width:0}
 .assistant-choice-badge{flex:none;white-space:nowrap}
 #assistantChoiceTitle{flex:0 1 auto;min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
 #assistantChoice #assistantHuman{max-width:150px;min-height:40px;padding:6px 8px;font-size:12px;line-height:16px}
 #assistantLiveStatus:not(:empty){margin:0;padding:2px 0 4px;font-size:11px;line-height:14px}
 body.sm-admin-chat-restored .messenger__messages{min-height:0!important;max-height:none!important;flex:1 1 0!important;padding:10px!important;overscroll-behavior:contain;overflow-x:hidden!important}
 body.sm-admin-chat-restored .message{max-width:94%;padding:10px 12px;font-size:14px;line-height:1.45}
 body.sm-admin-chat-restored .composer{flex:0 0 auto!important;max-height:none!important;overflow:visible!important;box-sizing:border-box;padding:6px 6px max(6px,env(safe-area-inset-bottom))!important}
 body.sm-admin-chat-restored .composer__row{grid-template-columns:44px minmax(0,1fr) 44px!important;gap:4px!important;min-width:0!important;align-items:end!important}
 body.sm-admin-chat-restored .composer #messageInput{font-size:16px!important;line-height:22px!important;padding:11px 36px!important;overflow-y:auto!important}
 body.sm-admin-chat-restored .composer .message-input-shell{min-width:0!important}
 body.sm-admin-chat-restored .composer .ma-emoji-toggle{left:1px!important;width:32px!important;min-width:32px!important}
 body.sm-admin-chat-restored .composer .voice-record-button--inside{right:1px!important;width:32px!important;min-width:32px!important;height:36px!important}
 body.sm-admin-chat-restored .photo-draft{max-height:100px;overflow-y:auto}
 body.sm-admin-chat-restored .voice-record-status{font-size:11px;line-height:16px;gap:5px;flex-wrap:wrap;margin-top:4px}
 body.sm-admin-chat-restored .chat-inline-notice{flex:none;max-height:60px;overflow:auto;margin:4px 8px 0;padding:6px 8px;font-size:12px}
}
@media(max-width:360px){
 #assistantChoice #assistantHuman{max-width:134px}
 body.sm-admin-chat-restored .messenger__messages{padding:8px!important;gap:8px!important}
}
@media(max-width:700px) and (max-height:400px){
 body.sm-admin-chat-restored .messenger__messages{padding:6px 8px!important}
 body.sm-admin-chat-restored .composer{padding-top:4px!important;padding-bottom:4px!important}
 body.sm-admin-chat-restored .photo-draft{max-height:60px}
}


/* Keep the assistant identity separate from Andrey's presence inside the call button. */
#assistantChoice .assistant-choice-heading{align-items:center;gap:10px}
#assistantChoice .assistant-choice-identity{display:flex;flex:1 1 0;flex-direction:column;align-items:stretch;gap:2px;min-width:0;margin:0;padding:0}
#assistantChoice .assistant-identity-name{margin:0;padding:0;font:600 14px/20px Arial,sans-serif;color:#315447;overflow-wrap:anywhere}
#assistantChoice #assistantChoiceTitle{display:inline;white-space:normal;overflow:visible;text-overflow:clip}
#assistantChoice .assistant-choice-badge{font-size:12px;font-weight:400;white-space:nowrap;color:#68776d}
#assistantChoice #assistantIdentityBadge[hidden]{display:none!important}
#assistantChoice .assistant-owner-presence{display:block;margin:2px 0 0;padding:0;font:400 11px/14px Arial,sans-serif;color:#68736d}
#assistantChoice .assistant-owner-presence.is-online{color:#68736d}
#assistantChoice #assistantHuman{align-self:center;flex:0 0 auto;margin:0;min-height:44px;line-height:16px;white-space:normal;border-color:#b48a49;background:#fff;color:#315847;transition:border-color .2s ease}
#assistantChoice #assistantHuman.is-online{border-color:#4b8064}
#assistantChoice #assistantHumanLabel{display:block}
@media(max-width:700px){
 #assistantChoice .assistant-choice-heading{gap:8px}
 #assistantChoice #assistantHuman{max-width:136px;padding:7px 9px}
}
@media(max-width:360px){#assistantChoice #assistantHuman{max-width:104px}}
