/* Persian text inside an admin that is laid out left to right.
 *
 * LANGUAGE_CODE is "en-us", so every page is a left-to-right paragraph. The
 * bidi algorithm keeps Persian words in the right order inside one, but the
 * NEUTRAL characters at the edges -- «.» «:» «،» «؟», parentheses, quotes, a
 * dash, an English word or a number -- belong to the paragraph, not to the
 * Persian run, so they are pushed to the left end. That is the whole bug:
 * «تحلیل زمانی (گن) روی نمودار.» renders with its brackets mirrored and its
 * period at the wrong side the moment anything non-Persian is in the line.
 *
 * `unicode-bidi: plaintext` gives every paragraph its own base direction,
 * taken from its first strong character exactly like `dir="auto"` does, so a
 * Persian line reads right-to-left and an English one still reads left to
 * right -- on the same page, without picking a direction for the admin. Only
 * the ORDER is touched here; alignment is left alone so no existing screen
 * moves. Fields you type into get the real `dir="auto"` in admin_bidi.js,
 * where alignment should follow the text.
 */

#content,
#content caption,
#content h1,
#content h2,
#content h3,
#content th,
#content td,
#content label,
#content p,
#content li,
#content dt,
#content dd,
#content .readonly,
#content .help,
#content .helptext,
#content .errornote,
#content .errorlist li,
#content option,
#content optgroup,
.breadcrumbs,
ul.messagelist li,
#header #site-name,
.object-tools a {
  unicode-bidi: plaintext;
}

/* A submit button's label is a paragraph of its own and hits the same bug
 * («ثبت تیکت» beside an English word, «حذف؟»). */
#content .button,
#content input[type="submit"],
#content input[type="button"],
#content .submit-row a {
  unicode-bidi: plaintext;
}
