/* Navigation localization with fixed app chrome.
   The sidebar/topbar keep the same physical structure in every locale.
   Arabic and Urdu remain RTL inside workspace content and localized text. */

.app[dir="rtl"]{
  direction:ltr;
}

/* Main application content follows the active RTL language. */
.app[dir="rtl"] .content{
  direction:rtl;
}

/* Keep sidebar chrome physically unchanged while allowing RTL label text. */
.app[dir="rtl"] .sidebar .workspace-brand-copy,
.app[dir="rtl"] .sidebar .nav-direct>span,
.app[dir="rtl"] .sidebar .nav-group-name>span,
.app[dir="rtl"] .sidebar .nav-subitem>span,
.app[dir="rtl"] .sidebar .nav-flyout-label,
.app[dir="rtl"] .sidebar .platform-attribution{
  direction:rtl;
  text-align:right;
}

/* Top-level chrome stays in its normal physical order; only copy is RTL. */
.app[dir="rtl"] .workspace-crumb strong,
.app[dir="rtl"] .workspace-crumb b,
.app[dir="rtl"] .top-profile-copy,
.app[dir="rtl"] .profile-menu-identity,
.app[dir="rtl"] .profile-menu-language,
.app[dir="rtl"] .profile-menu-item{
  direction:rtl;
  text-align:right;
}

.app[dir="rtl"] .top-profile-menu{
  right:0;
  left:auto;
}

/* Module controls live inside workspace content and should remain RTL-aware. */
.app[dir="rtl"] .module-back-button{
  direction:rtl;
}

.app[dir="rtl"] .module-back-button>span:first-child{
  transform:rotate(180deg);
}

.app[dir="rtl"] .module-header-actions{
  justify-content:flex-start;
}

@media(max-width:750px){
  /* Mobile drawer always opens from the physical left, regardless of locale. */
  .app[dir="rtl"] .top-profile-menu{
    right:9px;
    left:auto;
  }
}
