/* TALKCHAT_R20A6_PROFILE_DRAWER_ROOT_FIX
   Canonical desktop profile drawer geometry.
   The active desktop topbar is 44px; profile view must occupy only the
   right drawer footprint below that topbar, matching the other feature drawers.
   This replaces the old top:0 / height:100% root definition.
*/
@media (min-width:768px){
  /* Original profile overlay stage: transparent and non-blocking. */
  #featureLayer:has(.msref-profile-host){
    position:fixed!important;
    inset:0!important;
    z-index:9800!important;
    pointer-events:none!important;
    background:transparent!important;
    backdrop-filter:none!important;
    -webkit-backdrop-filter:none!important;
  }

  /* Original host behavior. */
  #featureLayer .msref-profile-host{
    position:absolute!important;
    inset:0!important;
    display:block!important;
    padding:0!important;
    pointer-events:none!important;
  }

  /* Original desktop profile = right drawer. */
  #featureLayer .msref-profile-panel{
    position:absolute!important;
    top:44px!important;
    right:0!important;
    bottom:0!important;
    left:auto!important;
    width:360px!important;
    max-width:100vw!important;
    height:auto!important;
    max-height:none!important;
    display:flex!important;
    flex-direction:column!important;
    background:#fff!important;
    color:#27313d!important;
    border:0!important;
    border-left:1px solid #e7e9ee!important;
    border-radius:0!important;
    box-shadow:-8px 0 24px rgba(20,28,40,.08)!important;
    pointer-events:auto!important;
    overflow:hidden!important;
  }

  /* Restore original profile header proportions. */
  #featureLayer .msref-profile-head{
    position:relative!important;
    min-height:52px!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    padding:12px 12px 8px!important;
    background:#fff!important;
    border-bottom:0!important;
    flex:0 0 auto!important;
  }

  #featureLayer .msref-profile-head>button:first-child{
    position:absolute!important;
    left:12px!important;
    width:36px!important;
    height:36px!important;
    min-width:36px!important;
    min-height:36px!important;
    flex:0 0 36px!important;
    border-radius:50%!important;
  }

  #featureLayer .msref-profile-head>button:first-child .material-symbols-outlined{
    font-size:20px!important;
  }

  #featureLayer .msref-profile-scroll{
    flex:1 1 auto!important;
    min-height:0!important;
    overflow-y:auto!important;
    overscroll-behavior:contain!important;
  }

  /* Restore profile-specific avatar sizes from the pre-r11 profile design. */
  #featureLayer .msref-user-row .msref-profile-avatar .ref-avatar{
    width:42px!important;
    height:42px!important;
    min-width:42px!important;
    flex-basis:42px!important;
  }

  #featureLayer .msref-menu-user-avatar .ref-avatar{
    width:48px!important;
    height:48px!important;
    min-width:48px!important;
    flex-basis:48px!important;
  }
}
