/*
NF Corporate / Platform Arabic RTL Production Layer V1
Presentation only. Uses logical CSS properties where possible.
*/

html[dir="rtl"] {
  direction: rtl;
}

html[dir="rtl"] body {
  direction: rtl;
  text-align: right;
  font-family: "Noto Kufi Arabic", "Noto Sans Arabic", Arial, sans-serif;
}

html[dir="rtl"] .nf-en { display: none !important; }
html[dir="rtl"] .nf-ar { display: revert !important; }

html[dir="rtl"] .nf-wrap,
html[dir="rtl"] .nf-main,
html[dir="rtl"] .nf-site-header,
html[dir="rtl"] .nf-mobile-panel,
html[dir="rtl"] .nf-footer {
  direction: rtl;
}

html[dir="rtl"] .nf-desktop-nav {
  margin-left: 0 !important;
  margin-right: auto !important;
}

html[dir="rtl"] .nf-account-menu {
  right: auto !important;
  left: 0 !important;
}

html[dir="rtl"] .nf-mega-menu {
  left: 50%;
  right: auto;
}

html[dir="rtl"] .nf-desktop-nav > a:after,
html[dir="rtl"] .nf-nav-item > a:after {
  left: 100%;
  right: 0;
}

html[dir="rtl"] .nf-desktop-nav > a:hover:after,
html[dir="rtl"] .nf-nav-item > a:hover:after {
  left: 0;
}

html[dir="rtl"] .nf-home-strip span {
  border-right: 0 !important;
  border-left: 1px solid var(--nf-line, rgba(6,24,44,.12));
}

html[dir="rtl"] .nf-home-strip span:last-child {
  border-left: 0 !important;
}

html[dir="rtl"] .nf-home-strip span:first-child {
  padding-left: 24px !important;
  padding-right: 0 !important;
}

html[dir="rtl"] .nf-actions,
html[dir="rtl"] .nf-utility-inner,
html[dir="rtl"] .nf-utility-actions,
html[dir="rtl"] .nf-header-inner,
html[dir="rtl"] .nf-header-actions,
html[dir="rtl"] .nf-demo-preview-head,
html[dir="rtl"] .nf-console-top {
  direction: rtl;
}

html[dir="rtl"] input,
html[dir="rtl"] textarea,
html[dir="rtl"] select {
  direction: rtl;
  text-align: right;
}

html[dir="rtl"] input[type="email"],
html[dir="rtl"] input[type="url"],
html[dir="rtl"] input[type="tel"],
html[dir="rtl"] input[type="number"] {
  direction: ltr;
  text-align: right;
}

html[dir="rtl"] table {
  direction: rtl;
}

html[dir="rtl"] th,
html[dir="rtl"] td {
  text-align: right;
}

html[dir="rtl"] .nf-kicker,
html[dir="rtl"] .nf-eyebrow,
html[dir="rtl"] .nf-mega-title,
html[dir="rtl"] .nf-mobile-account > span {
  letter-spacing: 0;
  text-transform: none;
}

html[dir="rtl"] .nf-skip-link {
  left: auto;
  right: -9999px;
}
html[dir="rtl"] .nf-skip-link:focus {
  left: auto;
  right: 10px;
}

/* General logical safeguards for platform cards/workspaces. */
html[dir="rtl"] [class*="sidebar"],
html[dir="rtl"] [class*="workspace"],
html[dir="rtl"] [class*="portal"],
html[dir="rtl"] [class*="dashboard"],
html[dir="rtl"] [class*="panel"],
html[dir="rtl"] [class*="card"] {
  direction: rtl;
}

html[dir="rtl"] svg,
html[dir="rtl"] img {
  direction: ltr;
}

/* Prevent direction rules from creating page-level horizontal overflow. */
html[dir="rtl"],
html[dir="rtl"] body {
  max-width: 100%;
  overflow-x: clip;
}

@supports not (overflow: clip) {
  html[dir="rtl"],
  html[dir="rtl"] body { overflow-x: hidden; }
}

@media (max-width: 820px) {
  html[dir="rtl"] .nf-desktop-nav { margin: 0 !important; }
  html[dir="rtl"] .nf-mobile-panel,
  html[dir="rtl"] .nf-mobile-panel .nf-wrap { text-align: right; }
}
