/* Keep the full set of localized language names readable. */
.language-picker select {
  width: clamp(108px, 14vw, 180px);
  min-width: 108px;
  max-width: 28vw;
}

html[dir="rtl"] body,
html[dir="rtl"] .document-main {
  direction: rtl;
}

html[dir="rtl"] .bni-logo,
html[dir="rtl"] .header-title,
html[dir="rtl"] .profile-title {
  direction: ltr;
}

html[dir="rtl"] .header-title {
  text-align: left;
  border-left: 0;
  border-right: 1px solid #bdbdbd;
  padding-left: 0;
  padding-right: 23px;
}

html[dir="rtl"] .profile-title {
  border-left: 0;
  border-right: 1px solid #d5d5d5;
  padding-left: 0;
  padding-right: 15px;
  text-align: left;
}

html[dir="rtl"] .header-actions {
  margin-left: 0;
  margin-right: auto;
}

html[dir="rtl"] .language-picker {
  margin-left: 0;
  margin-right: auto;
}

html[dir="rtl"] .language-picker select {
  direction: rtl;
  text-align: right;
}

html[dir="rtl"] .tab {
  border-right: 0;
  border-left: 1px solid #c8c8c8;
}

html[dir="rtl"] .tab:last-child {
  border-left: 0;
}

html[dir="rtl"] .sheet-head-content {
  border-left: 1px solid #d1d1d1;
  border-right: 0;
}

html[dir="rtl"] .info-table td,
html[dir="rtl"] .info-table th,
html[dir="rtl"] .profile-table th,
html[dir="rtl"] .profile-table td {
  text-align: right;
}

html[dir="rtl"] .profile-table .priority {
  text-align: center;
}

html[dir="rtl"] .arrow-list li {
  padding-left: 0;
  padding-right: 16px;
}

html[dir="rtl"] .arrow-list li::before {
  left: auto;
  right: 0;
}

html[dir="rtl"] .home-card {
  border-left: 1px solid #c9c9c9;
  border-right: 5px solid var(--bni-red);
}

html[dir="rtl"] .home-card-arrow {
  margin-left: 0;
  margin-right: auto;
}

html[dir="rtl"] .mobile-menu-panel {
  inset-inline-start: auto;
  inset-inline-end: 0;
}

html[dir="rtl"] .mobile-page-group summary {
  padding-left: 34px;
  padding-right: 3px;
}

html[dir="rtl"] .mobile-page-group summary::after {
  right: auto;
  left: 4px;
}

html[dir="rtl"] .mobile-section-list {
  padding-left: 0;
  padding-right: 12px;
}

html[dir="rtl"] .mobile-section-list a {
  border-left: 0;
  border-right: 2px solid #e2e2e2;
}

html[dir="rtl"] .mobile-section-list a:hover,
html[dir="rtl"] .mobile-section-list a:focus {
  border-left-color: transparent;
  border-right-color: var(--bni-red);
}

@media (max-width: 760px) {
  .language-picker select {
    width: 96px !important;
    min-width: 96px !important;
    max-width: 96px !important;
  }

  html[dir="rtl"] .header-title {
    padding-left: 0;
    padding-right: 8px;
  }

  html[dir="rtl"] .profile-title {
    padding-left: 0;
    padding-right: 7px;
  }
}

@media (max-width: 360px) {
  html[dir="rtl"] .header-title {
    padding-right: 7px;
  }
}
