.ih-social-return{display:inline-flex;gap:8px;flex-wrap:wrap;margin-left:auto}
.ih-social-return button{font-size:14px!important;min-height:40px}
.ih-social-context{font-size:14px!important;line-height:1.45;margin:12px 0 0;max-width:760px;color:#284c5d}
#ipsrModeTabs{flex-wrap:wrap}
@media(max-width:600px){.ih-social-return{margin-left:0;width:100%}.ih-social-return button{flex:1}}

/* Existing IntellyPop root-page messaging layout fixes. */
/*
      IntellyPop messaging width guard
      --------------------------------
      The shared messaging control uses a fixed inbox column plus a flexible
      conversation column. Long context labels, messages, call UI, or compose
      controls must never establish an intrinsic width larger than the dialog.
   */
   #ipMsgOverlay,
   #ipMsgDialog,
   #ipMsgDialog *{
       box-sizing:border-box;
   }

   #ipMsgDialog{
       max-width:calc(100vw - 44px);
       min-width:0;
   }

   #ipMsgDialog .ip-msg-grid{
       width:100%;
       max-width:100%;
       min-width:0;
       min-height:0;

       /*
          This is the bounded content row of the modal. When the video call /
          invitation UI is open, let THIS row become the scroll container.
          That keeps the modal header + Social AI banner visible while making
          the message composer and Send button reachable below the call UI.
       */
       overflow-x:hidden;
       overflow-y:auto;
       overscroll-behavior:contain;
       scrollbar-gutter:stable;
       align-items:start;
   }

   #ipMsgDialog .ip-msg-inbox,
   #ipMsgDialog .ip-msg-conversation,
   #ipMsgDialog .ip-msg-context,
   #ipMsgDialog .ip-msg-list,
   #ipMsgDialog .ip-msg-compose,
   #ipMsgDialog .ip-video-wrap,
   #ipMsgDialog .ip-video-stage,
   #ipMsgDialog .ip-video-invite{
       min-width:0;
       max-width:100%;
   }

   #ipMsgDialog .ip-msg-conversation{
       width:100%;
       min-width:0;
       min-height:100%;
       height:auto;
       align-self:start;

       /*
          Do not create a second nested vertical scroller here. The parent
          .ip-msg-grid owns vertical scrolling so expanding video/invite blocks
          contribute to one continuous, visible modal scrollbar.
       */
       overflow:visible;
   }

   #ipMsgDialog .ip-msg-grid{
       scrollbar-width:auto;
       scrollbar-color:#8fa2a8 #f8f4eb;
   }
   #ipMsgDialog .ip-msg-grid::-webkit-scrollbar{
       width:12px;
   }
   #ipMsgDialog .ip-msg-grid::-webkit-scrollbar-track{
       background:#f8f4eb;
   }
   #ipMsgDialog .ip-msg-grid::-webkit-scrollbar-thumb{
       background:#8fa2a8;
       border:3px solid #f8f4eb;
       border-radius:999px;
   }

   /*
      The live-call panel can add the video stage, invite block, call controls
      and privacy note above the normal message composer. Keep all of that
      inside the modal and let this right-hand pane scroll instead of pushing
      the composer / Send button below the viewport.
   */
   #ipMsgDialog .ip-video-wrap.show{
       flex:none;
       min-width:0;
       max-width:100%;
   }

   #ipMsgDialog .ip-msg-context-copy{
       flex:1 1 auto;
       width:0;
       min-width:0;
       max-width:100%;
   }

   #ipMsgDialog .ip-msg-list{
       width:100%;
       overflow-x:hidden;
   }

   #ipMsgDialog .ip-msg-bubble{
       min-width:0;
       max-width:82%;
       overflow-wrap:anywhere;
       word-break:break-word;
   }

   #ipMsgDialog .ip-msg-compose{
       width:100%;
       overflow:hidden;
   }

   #ipMsgDialog .ip-msg-compose textarea,
   #ipMsgDialog .ip-video-invite-link input{
       display:block;
       width:100%;
       max-width:100%;
       min-width:0;
   }

   #ipMsgDialog .ip-msg-compose-row{
       width:100%;
       max-width:100%;
       min-width:0;
   }

   #ipMsgDialog .ip-msg-status{
       flex:1 1 220px;
       min-width:0;
       overflow-wrap:anywhere;
   }

   #ipMsgDialog .ip-msg-send,
   #ipMsgDialog .ip-msg-video-start,
   #ipMsgDialog .ip-msg-social-open{
       flex:0 0 auto;
       max-width:100%;
   }

   @media(max-width:720px){
       #ipMsgDialog{
           max-width:100vw;
       }
       #ipMsgDialog .ip-msg-grid{
           grid-template-columns:minmax(0,1fr);
       }
       #ipMsgDialog .ip-msg-bubble{
           max-width:92%;
       }
       #ipMsgDialog .ip-msg-compose-row{
           flex-wrap:wrap;
       }
       #ipMsgDialog .ip-msg-send{
           margin-left:auto;
       }
   }
   
