/* RTL layout for Arabic */
html[dir="rtl"] body.ghotz-rtl,
html.ghotz-lang-ar body.ghotz-rtl {
  direction: rtl;
  text-align: right;
}

html[dir="rtl"] .ghotz-nav-inner,
html[dir="rtl"] .ghotz-footer-inner,
html[dir="rtl"] .ghotz-hero-actions,
html[dir="rtl"] .ghotz-stat-row {
  direction: rtl;
}

html[dir="rtl"] .ghotz-nav-links {
  flex-direction: row-reverse;
}

html[dir="rtl"] .ghotz-logo {
  flex-direction: row-reverse;
}

html[dir="rtl"] #sidebar .ml-3,
html[dir="rtl"] aside [class*="ml-3"] {
  margin-left: 0 !important;
  margin-right: 0.75rem !important;
}

html[dir="rtl"] #sidebar .mr-2,
html[dir="rtl"] aside [class*="mr-2"] {
  margin-right: 0 !important;
  margin-left: 0.5rem !important;
}

html[dir="rtl"] aside {
  right: auto;
  left: 0;
  border-right: none;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
}

html[dir="rtl"] .ghotz-auth-wrap {
  direction: rtl;
}

html[dir="rtl"] .docs-nav {
  direction: rtl;
}

html[dir="rtl"] input,
html[dir="rtl"] textarea,
html[dir="rtl"] select {
  text-align: right;
}

/* English/code blocks must stay LTR — RTL breaks pre-wrap and truncates prompt text */
html[dir="rtl"] pre,
html[dir="rtl"] pre code,
html[dir="rtl"] code,
html.ghotz-lang-ar pre,
html.ghotz-lang-ar pre code,
html.ghotz-lang-ar code,
.ghotz-ai-prompt-box,
.ghotz-creds-pre,
.ghotz-creds-panel pre,
.ghotz-sdk-code pre {
  direction: ltr !important;
  text-align: left !important;
  unicode-bidi: isolate;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
}

html[dir="rtl"] .ghotz-bi {
  align-items: flex-end;
}

html[dir="rtl"] .inline-flex svg.ml-2 {
  margin-left: 0 !important;
  margin-right: 0.5rem !important;
  transform: scaleX(-1);
}
