/* MTDb Arabic interface. Loaded after the compiled application styles. */
html[dir="rtl"] {
  direction: rtl;
  font-family: "Noto Sans Arabic", Tahoma, Arial, sans-serif;
}

html[dir="rtl"] body,
html[dir="rtl"] #root,
html[dir="rtl"] main,
html[dir="rtl"] nav,
html[dir="rtl"] aside,
html[dir="rtl"] footer {
  direction: rtl;
}

html[dir="rtl"] .text-left { text-align: right; }
html[dir="rtl"] .text-right { text-align: left; }
html[dir="rtl"] .md\\:text-left { text-align: right; }
html[dir="rtl"] :is(input, textarea, select) { text-align: start; }
html[dir="rtl"] input:is([type="email"],[type="url"],[type="tel"],[type="number"],[type="password"]),
html[dir="rtl"] input[autocomplete="one-time-code"] {
  direction: ltr;
  text-align: left;
}

/* Use text direction, not icon mirroring, for media playback and numeric data. */
html[dir="rtl"] :is(video, iframe, audio, canvas, code, pre, .monaco-editor, .ace_editor) {
  direction: ltr;
}

/* Direction is switched by the server, so this also works for non-JS crawlers. */
.mt-ar-language-switch {
  position: fixed;
  inset-inline-start: 14px;
  bottom: 14px;
  z-index: 9999;
  min-width: 53px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid rgba(128,128,128,.35);
  border-radius: 999px;
  background: #fff;
  color: #18181b;
  box-shadow: 0 4px 16px rgba(0,0,0,.16);
  font: 600 13px/1 Tahoma, Arial, sans-serif;
  cursor: pointer;
}
.mt-ar-language-switch:hover { background: #e5e7eb; }
.mt-ar-language-switch:focus-visible {
  outline: 3px solid #2563eb;
  outline-offset: 2px;
}
.mt-ar-language-switch:disabled { opacity: .6; cursor: wait; }
html.dark .mt-ar-language-switch { background: #24242c; color: white; }
html.dark .mt-ar-language-switch:hover { background: #383843; }

@media (max-width: 640px) {
  .mt-ar-language-switch { inset-inline-start: 8px; bottom: 8px; height: 32px; }
}
