/* =========================================================
   Anzo RTL refinements (loaded for RTL languages only, after
   the generated rtl-nexus.css / rtl-cart.css overrides).
   ========================================================= */

html[dir="rtl"] body { text-align: right; }

/* Latin-only values stay left-to-right */
[dir="rtl"] input[type="email"],
[dir="rtl"] input[type="url"],
[dir="rtl"] input[type="tel"],
[dir="rtl"] input[type="password"],
[dir="rtl"] input[name="domain"],
[dir="rtl"] input[name="sld"],
[dir="rtl"] input[name^="ns"],
[dir="rtl"] input[name="code"],
[dir="rtl"] code, [dir="rtl"] pre, [dir="rtl"] kbd { direction: ltr; text-align: left; }
[dir="rtl"] input[type="email"]::placeholder,
[dir="rtl"] input[type="password"]::placeholder { direction: rtl; text-align: right; }
[dir="rtl"] .iti input[type="tel"] { text-align: left; }

/* Directional icons */
[dir="rtl"] .fa-chevron-right, [dir="rtl"] .fa-chevron-left,
[dir="rtl"] .fa-angle-right, [dir="rtl"] .fa-angle-left,
[dir="rtl"] .fa-angle-double-right, [dir="rtl"] .fa-angle-double-left,
[dir="rtl"] .fa-long-arrow-right, [dir="rtl"] .fa-long-arrow-left,
[dir="rtl"] .fa-caret-right, [dir="rtl"] .fa-caret-left,
[dir="rtl"] .fa-sign-out-alt, [dir="rtl"] .fa-sign-out, [dir="rtl"] .fa-sign-in, [dir="rtl"] .fa-sign-in-alt,
[dir="rtl"] .fa-reply, [dir="rtl"] .fa-share { transform: scaleX(-1); }

/* Bootstrap pieces the generated overrides cannot know */
[dir="rtl"] .modal-header .close { margin: -1rem auto -1rem -1rem; }
[dir="rtl"] .custom-select { padding-right: .9rem; padding-left: 2rem; background-position: left .75rem center; }
[dir="rtl"] .input-group > .input-group-prepend > .btn,
[dir="rtl"] .input-group > .input-group-prepend > .input-group-text { border-radius: 0 10px 10px 0; }
[dir="rtl"] .input-group > .input-group-append > .btn,
[dir="rtl"] .input-group > .input-group-append > .input-group-text { border-radius: 10px 0 0 10px; }
[dir="rtl"] .input-group > .form-control:not(:first-child) { border-radius: 10px 0 0 10px; }
[dir="rtl"] .input-group > .form-control:not(:last-child) { border-radius: 0 10px 10px 0; }
[dir="rtl"] .input-group > .form-control:not(:first-child):not(:last-child) { border-radius: 0; }
[dir="rtl"] .table th, [dir="rtl"] .table td { text-align: right; }
[dir="rtl"] .table .text-center, [dir="rtl"] .table th.text-center, [dir="rtl"] .table td.text-center { text-align: center; }
[dir="rtl"] .dataTables_wrapper .dataTables_filter { text-align: left; }
[dir="rtl"] .dataTables_wrapper .dataTables_paginate { text-align: left; }
[dir="rtl"] .dropdown-menu { text-align: right; }
[dir="rtl"] .list-group { padding-right: 0; }

/* Persian copy looks better with a little more leading */
[dir="rtl"] .az-hero h1 { line-height: 1.55; }

/* Phone number input and toggle switches are always left-to-right */
[dir="rtl"] .intl-tel-input, [dir="rtl"] .iti { direction: ltr; text-align: left; }
[dir="rtl"] .intl-tel-input input, [dir="rtl"] .iti input,
[dir="rtl"] input[name="phonenumber"], [dir="rtl"] input[name^="phonenumber"] { direction: ltr !important; text-align: left !important; }
[dir="rtl"] .intl-tel-input .country-list { text-align: left; }
[dir="rtl"] .bootstrap-switch, [dir="rtl"] .bootstrap-switch * { direction: ltr; text-align: left; }

/* Popper.js positions popovers, tooltips and dropdowns from left:0 with a
   transform; the generic RTL flip (right:0) throws them off screen. */
[dir="rtl"] .popover, [dir="rtl"] .tooltip, [dir="rtl"] .dropdown-menu[x-placement] { right: auto !important; }
[dir="rtl"] .popover .arrow { right: auto; }
