/* FEBRY.OPS V353 — mobile compact sizing pass
   Goal: reduce oversized mobile boxes in chat composer, bottom nav,
   posting switch, and posting landing cards without changing logic. */
@media (max-width: 900px){
  /* Chat composer dock */
  body.cl-ms #chatView .ms-mobile-pane .composer-wrap{
    bottom: calc(68px + env(safe-area-inset-bottom)) !important;
    padding-top: 6px !important;
  }
  body.cl-ms #chatView .ms-mobile-pane .composer{
    padding: 8px !important;
    border-radius: 18px !important;
  }
  body.cl-ms #chatView .ms-mobile-pane .composer textarea,
  body.cl-ms #chatView .ms-mobile-pane[data-mobile-pane="chat"] .composer textarea{
    min-height: 44px !important;
    max-height: 124px !important;
    font-size: 15px !important;
    line-height: 1.42 !important;
    padding: 11px 12px !important;
    border-radius: 14px !important;
  }
  body.cl-ms #chatView .ms-mobile-pane .composer .btn,
  body.cl-ms #chatView .ms-mobile-pane #attachBtn,
  body.cl-ms #chatView .ms-mobile-pane #sendBtn{
    min-width: 44px !important;
    width: 44px !important;
    height: 44px !important;
    min-height: 44px !important;
    border-radius: 14px !important;
    padding: 0 !important;
    align-self: center !important;
  }
  body.cl-ms #chatView .ms-mobile-pane #attachBtn svg,
  body.cl-ms #chatView .ms-mobile-pane #sendBtn svg{
    width: 20px !important;
    height: 20px !important;
  }

  /* Bottom navigation */
  body.cl-ms #chatView .ms-mobile-nav,
  body.cl-ms #msMobileNav{
    left: 12px !important;
    right: 12px !important;
    bottom: calc(8px + env(safe-area-inset-bottom)) !important;
    gap: 6px !important;
    padding: 6px !important;
    border-radius: 20px !important;
  }
  body.cl-ms #chatView .ms-mobile-nav button,
  body.cl-ms #msMobileNav button{
    min-height: 54px !important;
    padding: 6px 4px !important;
    border-radius: 14px !important;
    gap: 4px !important;
    font-size: 9px !important;
  }
  body.cl-ms #chatView .ms-mobile-nav .nav-icon,
  body.cl-ms #msMobileNav .nav-icon{
    width: 24px !important;
    height: 24px !important;
    border-radius: 10px !important;
  }
  body.cl-ms #chatView .ms-mobile-nav button svg,
  body.cl-ms #msMobileNav button svg{
    width: 18px !important;
    height: 18px !important;
  }
  body.cl-ms #chatView .ms-mobile-nav .nav-label,
  body.cl-ms #msMobileNav .nav-label{
    font-size: 8.5px !important;
    line-height: 1 !important;
    letter-spacing: 0 !important;
  }
  body.cl-ms #chatView .ms-mobile-nav button.active,
  body.cl-ms #msMobileNav button.active{
    transform: translateY(-1px) !important;
  }

  /* General pane spacing */
  body.cl-ms #chatView .ms-mobile-pane{
    min-height: calc(100dvh - 132px) !important;
    padding: 6px 0 6px !important;
  }
  body.cl-ms #chatView .ms-mobile-pane .mobile-card{
    padding: 12px !important;
    border-radius: 18px !important;
  }

  /* Posting hub compact */
  body.cl-ms #chatView .ms-posting-pane{
    padding: 8px 0 calc(18px + env(safe-area-inset-bottom)) !important;
  }
  body.cl-ms #chatView .ms-posting-switch{
    padding: 4px !important;
    margin: 0 0 10px !important;
    gap: 4px !important;
    border-radius: 12px !important;
  }
  body.cl-ms #chatView .ms-posting-switch button{
    min-height: 36px !important;
    padding: 7px 6px !important;
    font-size: 10.5px !important;
    line-height: 1.1 !important;
    border-radius: 9px !important;
  }
  body.cl-ms #chatView .ms-posting-pane .mobile-simple-intro{
    gap: 8px !important;
  }
  body.cl-ms #chatView .ms-posting-pane .mobile-simple-heading{
    font-size: 16px !important;
  }
  body.cl-ms #chatView .ms-posting-pane .mobile-simple-heading .mobile-simple-mark{
    width: 34px !important;
    height: 34px !important;
    border-radius: 11px !important;
    font-size: 20px !important;
  }
  body.cl-ms #chatView .ms-posting-pane .mobile-simple-intro > p,
  body.cl-ms #chatView .ms-posting-pane .mobile-simple-info,
  body.cl-ms #chatView .mobile-simple-terms summary span,
  body.cl-ms #chatView .mobile-simple-terms-content p{
    font-size: 10.5px !important;
    line-height: 1.45 !important;
  }
  body.cl-ms #chatView .mobile-simple-open,
  body.cl-ms #chatView .mobile-simple-open:not(:disabled){
    min-height: 44px !important;
    border-radius: 12px !important;
    font-size: 11px !important;
    padding: 10px 12px !important;
  }

  /* Template and Saya cards slightly smaller too */
  body.cl-ms #chatView #mobilePaneTemplate .mobile-card,
  body.cl-ms #chatView .ms-mobile-profile-action,
  body.cl-ms #chatView .ms-mobile-hide-mount .ms-text-visibility{
    padding: 11px 12px !important;
    border-radius: 14px !important;
  }
}

@media (max-width: 390px){
  body.cl-ms #chatView .ms-mobile-nav,
  body.cl-ms #msMobileNav{
    left: 10px !important;
    right: 10px !important;
    padding: 5px !important;
    gap: 5px !important;
  }
  body.cl-ms #chatView .ms-mobile-nav button,
  body.cl-ms #msMobileNav button{
    min-height: 50px !important;
    padding: 5px 3px !important;
  }
  body.cl-ms #chatView .ms-mobile-nav .nav-icon,
  body.cl-ms #msMobileNav .nav-icon{
    width: 22px !important;
    height: 22px !important;
  }
  body.cl-ms #chatView .ms-mobile-nav button svg,
  body.cl-ms #msMobileNav button svg{
    width: 16px !important;
    height: 16px !important;
  }
  body.cl-ms #chatView .ms-mobile-nav .nav-label,
  body.cl-ms #msMobileNav .nav-label{
    font-size: 8px !important;
  }
  body.cl-ms #chatView .ms-posting-switch button{
    min-height: 34px !important;
    font-size: 10px !important;
  }
  body.cl-ms #chatView .ms-mobile-pane .composer textarea{
    min-height: 42px !important;
    font-size: 15px !important;
  }
  body.cl-ms #chatView .ms-mobile-pane #attachBtn,
  body.cl-ms #chatView .ms-mobile-pane #sendBtn{
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
    min-height: 42px !important;
  }
}
