/* No base partials are imported here. global.min.css already carries _reset, _typography,
   _elements, _links and _grid; re-emitting them in this sheet, which loads last, let those
   base rules beat every later sheet on RTL sites only (for example the token button text,
   so input[type=submit] read #505050 on the Theme Color). */

/*--------------------------------------------------------------
# Basic
--------------------------------------------------------------*/

body,
html {
    direction: rtl;
}

body:not(.block-editor-page):not(.wp-core-ui),
body:not(.block-editor-page):not(.wp-core-ui) pre {
    unicode-bidi: embed;
    text-align: right !important;
}

input:not([type="submit"]),
optgroup,
select,
textarea {
    text-align: right !important;
}

.wp-block-quote {
    border-left: 0;
    border-right: 4px solid var(--color-quote-border);
    padding-left: 0;
    padding-right: 1em;
}

.entry-content>blockquote {
    padding-left: 0;
    padding-right: 1em;
    margin-left: 0;
    margin-right: 1.5rem;
}

.entry-content>.wp-block-quote,
.entry-content>.wp-block-quote.is-style-large {
    margin-left: 0;
    margin-right: 1.5rem;
}

@media screen and (min-width: 48em) {
    .entry-content>.wp-block-quote,
    .entry-content>.wp-block-quote.is-style-large {
        margin-left: 0;
        margin-right: auto;
    }
}

.user-link-wrap .bp-user {
    padding-left: 15px;
    padding-right: 0;
}

.user-link-wrap .bp-user::after {
    left: -5px;
    right: auto;
}

.buddypress-icons-wrapper {
    margin-right: 15px;
    margin-left: 0;
}

.buddypress-icons-wrapper .user-link-wrap {
    margin-left: 0;
    margin-right: 10px;
}

.buddypress-icons-wrapper .bp-msg sup,
.buddypress-icons-wrapper .user-notifications sup,
.menu-icons-wrapper .cart sup {
    right: auto;
    left: -4px;
}

#user-profile-menu,
.bp-header-submenu {
    left: 0;
    right: auto;
}

.menu-icons-wrapper #searchform::before {
    left: 15px;
    right: auto;
}

.menu-icons-wrapper #searchform input[type="submit"] {
    left: 0;
    right: auto;
}

body .main-navigation a,
body .main-navigation ul li a,
body .nav--toggle-sub li.menu-item-has-children,
body .nav--toggle-small .menu-toggle,
body .site-sub-header .entry-header .entry-title,
body .site-sub-header .page-header .page-title,
body .site-sub-header .entry-header,
body .site-sub-header .page-header,
body .site-sub-header .entry-title,
body .site-sub-header .page-title {
    text-align: right;
}

.buddypress-wrap #notification-select,
.buddypress-wrap .select-wrap select,
.buddypress-wrap .standard-form select,
body #buddypress.buddypress-wrap form#whats-new-form #whats-new-options select,
body .buddypress-wrap .subnav-filters .component-filters select,
body .buddypress-wrap .subnav-filters .last select select,
select.orderby,
select#pa_color,
select#pa_size {
    background-position: left 1rem center !important;
    padding-left: 40px !important;
    padding-right: 12px !important;
}

.site-sub-header {
    margin-left: auto;
    margin-right: -50vw;
    left: auto;
    right: 50%;
}

.site-sub-header .entry-header-title,
.site-sub-header .entry-title,
.site-sub-header .page-header,
.site-sub-header .page-title {
    margin-right: 0;
    margin-left: auto;
}

.menu-icons-wrapper {
    float: right;
}

.entry-meta.entry-meta .posted-by img {
    margin-left: 5px;
    margin-right: 0;
}

.entry-meta .author.vcard {
    margin-right: 5px;
    margin-left: 0;
}

.post-thumbnail+.post-categories {
    right: 10px;
    left: auto;
}

/* Header dropdowns (profile, notifications) and the search popup: navigation.css
 * anchors them to the right at every width, so the mirror is unscoped too. */
.main-navigation .bp-header-submenu {
    left: -8px;
    right: auto;
}

.main-navigation .bp-header-submenu.bp-notify {
    left: -25px;
    right: auto;
}

.bp-header-submenu::before {
    left: 28px;
    right: auto;
}

.main-navigation #user-profile-menu {
    left: 0;
    right: auto;
}

.user-profile-menu::before {
    left: 50px;
    right: auto;
}

.menu-icons-wrapper .top-menu-search-container {
    left: -10px;
    right: auto;
}

@media (max-width: 480px) {
    .menu-icons-wrapper .top-menu-search-container {
        left: -80px;
        right: auto;
    }
}

@media (max-width: 440px) {
    .buddypress-icons-wrapper #bp-notify {
        left: -60px;
        right: auto;
    }
    #bp-notify.bp-header-submenu::before {
        left: 63px;
        right: auto;
    }
}

@media (min-width: 768px) {
    .nav--toggle-sub li.menu-item--has-toggle,
    .nav--toggle-sub li.menu-item-has-children {
        padding-left: .7em;
        padding-right: 0;
    }
    #primary-menu .submenu-btn {
        left: 0;
        right: auto;
    }
    .nav--toggle-sub li.menu-item--has-toggle,
    .nav--toggle-sub li.menu-item-has-children {
        padding-left: .7em;
        padding-right: 0;
    }
    .nav--toggle-sub .dropdown,
    .nav--toggle-sub .dropdown-toggle,
    #primary-menu .submenu-btn {
        left: 0;
        right: auto;
    }
    .main-navigation ul ul ul {
        left: 100%;
        right: auto;
    }
    .nav--toggle-sub ul .hideshow ul {
        margin-right: -10px;
        margin-left: auto;
    }
    .nav--toggle-sub ul ul .dropdown,
    .nav--toggle-sub ul ul .dropdown-toggle {
        left: 12px;
        right: auto;
    }
    .nav--toggle-sub li.menu-item--has-toggle .sub-menu li::after,
    .nav--toggle-sub li.menu-item-has-children .sub-menu li::after {
        right: auto;
        left: 10px;
    }
    /* Dropdowns hang from the start edge of their menu item, as in LTR from the end. */
    .nav--toggle-sub ul ul {
        left: 0;
        right: auto;
    }
    .menu-item--has-toggle>ul.sub-menu::before,
    .nav--toggle-sub ul.user-profile-menu .sub-menu::before {
        left: 28px;
        right: auto;
    }
    .hideshow.menu-item--has-toggle>ul.sub-menu::before {
        left: 24px;
        right: auto;
    }
    .nav--toggle-sub ul.user-profile-menu .sub-menu::before,
    .sub-menu li.menu-item--has-toggle>ul.sub-menu::before {
        top: 30px;
        right: auto;
        left: 0;
        transform: rotate(-130deg);
    }
    .nav--toggle-sub ul.user-profile-menu .sub-menu {
        top: 0;
        left: auto;
        right: -100%;
        margin-left: auto;
    }
}

@media (max-width: 767px) {
    #primary-menu .submenu-btn {
        right: auto;
        left: 0;
    }
    .user-profile-menu::before {
        left: 24px;
        right: auto;
    }

    /* The mobile drawer opens from the start edge, next to its toggle. */
    .main-navigation .primary-menu-container {
        right: auto;
        left: 0;
        transform: translate3d(-340px, 0, 0);
    }
    .mobile-menu-opened .main-navigation .primary-menu-container {
        transform: none;
    }
}

@media (min-width: 768px) {
    .nav--toggle-sub li.menu-item--has-toggle::after,
    .nav--toggle-sub li.menu-item-has-children::after {
        left: 0;
        right: auto;
    }
}

.buddypress-icons-wrapper .btn-login .bx-icon,
.buddypress-icons-wrapper .btn-register .bx-icon {
    margin-right: 0;
    margin-left: 6px;
}


/*--------------------------------------------------------------
# Blog
--------------------------------------------------------------*/

.entry-meta .entry-meta__content {
    text-align: right;
}

.entry-meta.entry-meta .posted-by img {
    float: none;
    position: absolute;
    top: 0;
    right: 0;
    left: auto;
    margin-right: 0;
    margin-left: 0;
}

.buddyx-article-list-thumbnail.buddyx-article-list-thumbnail {
    margin-right: 0;
    margin-left: 20px;
}

.entry-meta.entry-meta .entry-cat-links::before,
.entry-meta.entry-meta .entry-comments-link a::before,
.entry-meta.entry-meta .entry-edit-link a::before,
.entry-meta.entry-meta .entry-featured::before {
    margin-right: 0;
    margin-left: 4px;
}

.buddyx-content--small .buddyx-post-section.buddyx-post-section .entry-media-image {
    margin-left: 0;
    margin-right: 50%;
    transform: translateX(50%);
}

@media (min-width: 992px) {
    .buddyx-section-half.has-featured-image {
        margin-right: 50%;
        margin-left: 0;
        transform: translateX(50%);
    }
}


/*--------------------------------------------------------------
# Comments
--------------------------------------------------------------*/

/* comments.css is printed in the page body, after this sheet, so these rules carry
 * the .rtl body class to win. Spacing there is logical and mirrors on its own. */
.rtl .comment .avatar,
.rtl .review .avatar {
    left: auto;
    right: -70px;
}

.rtl .reply,
.rtl .comment-form .form-submit {
    text-align: left;
}

.rtl #respond .comment-form .form-submit {
    text-align: right;
}

.rtl .comment-form-author,
.rtl .comment-form-email,
.rtl .comment-form-url {
    float: right;
}

/*--------------------------------------------------------------
# BuddyPress
--------------------------------------------------------------*/

.activity-update-form #whats-new-avatar {
    text-align: right;
}

.buddypress-wrap .bp-messages,
.buddypress-wrap .bp-feedback {
    padding: 0.615em 0.7em 0.615em 2.25em;
}

@media screen and (min-width: 46.8em) {
    .bp-list li .item-avatar {
        float: right;
        margin-left: 15px;
        margin-right: 0;
    }
    .bp-list:not(.grid) li .item .item-block {
        float: right;
        margin-left: 0;
    }
    .bp-list li .action div.generic-button:last-child,
    .bp-list li .action li.generic-button:last-child {
        margin-left: 0;
        margin-right: 10px;
    }
    .bp-single-vert-nav .item-body:not(#group-create-body) #subnav:not(.tabbed-links) li a {
        border-left: 0;
    }
}

/* Online dot: buddypress.css pins it to the top-right of the avatar; mirror to top-left. */
.member-status {
    right: auto;
    left: -4px;
}

.round-avatars .member-status {
    right: auto;
    left: 2px;
}

.grid .member-status {
    right: auto;
    left: 18px;
}

.round-avatars #buddypress #item-header-cover-image #item-header-avatar .member-status {
    right: auto;
    left: 15px;
}

body:not(.round-avatars) .grid .member-status {
    right: auto;
    left: -2px;
}

#buddypress.buddypress-wrap form#whats-new-form #whats-new-submit {
    margin-left: 0;
    margin-right: auto;
}

.activity-update-form.modal-popup #whats-new-content {
    margin-right: 0;
}

#buddypress input#aw-whats-new-submit,
form.ac-form .ac-reply-content input {
    margin-right: 10px;
    margin-left: 0;
}

.activity-list.item-list .activity-item .activity-avatar {
    margin: 0 0 0 15px;
}

.activity-list .activity-item .activity-meta.action {
    text-align: right;
}

.activity-list.bp-list .activity-item .activity-meta.action .generic-button {
    margin-left: 11px;
    margin-right: 0;
}

#buddypress #item-header-cover-image #item-header-avatar {
    float: right;
}

#buddypress div#item-header #item-header-cover-image #item-header-content {
    margin-left: 0;
    margin-right: 152px;
}

.single-headers li.generic-button,
body.bp-nouveau.media #buddypress div#item-header div#item-header-content ul div,
body.bp-nouveau.media #buddypress div#item-header div#item-header-content ul li {
    margin: 10px 0 0 10px;
}

@media screen and (max-width: 782px) {
    #buddypress div#item-header #item-header-cover-image #item-header-content,
    body.single-item.groups #buddypress div#item-header #item-header-cover-image #item-actions,
    body.single-item.groups #buddypress div#item-header #item-header-cover-image #item-header-content {
        margin-right: 0;
        padding: 0;
    }
}

@media screen and (max-width: 46.8em) {
    .buddypress-wrap .bp-subnavs ul li {
        float: right;
    }
}

.buddypress-wrap .select-wrap select {
    margin-left: 0;
}

.bp-nouveau.media #buddypress div#item-header div#item-header-content ul li,
.bp-nouveau.media #buddypress div#item-header div#item-header-content ul div {
    float: right;
}

.groups-header .desc-wrap .group-description {
    text-align: right;
}

@media screen and (min-width: 782px) {
    body.single-item.groups #buddypress div#item-header #item-header-cover-image #item-actions {
        float: left;
        margin-right: auto;
        margin-left: 0;
    }
    body.single-item.groups #buddypress div#item-header #item-header-cover-image #item-header-content {
        float: right;
        margin-right: 0;
    }
}

.buddypress .bp-invites-content ul.item-list li .action {
    margin-right: auto;
    margin-left: 0;
}

#buddypress .bp-invites-content li .item-avatar {
    margin-left: 15px;
    margin-right: 0;
    ;
}

#item-body #group-invites-container .bp-invites-content .list-title,
.buddypress .bp-invites-content ul.item-list>li .item .list-title {
    text-align: right;
}

/* The @handle is Latin: let it resolve its own direction so the @ stays in front of the name. */
p.user-nicename {
    unicode-bidi: plaintext;
}

.dashicons-arrow-right,
.dashicons-arrow-left {
    -webkit-transform: rotate(180deg);
    transform: rotate(180deg);
}

/* Post and comment navigation: the angle icons point toward the previous / next edge, and
   their gap sits between icon and title. */
.nav-previous a::before {
    margin-right: 0;
    margin-left: 10px;
    transform: scaleX(-1);
}

.nav-next a::after {
    margin-left: 0;
    margin-right: 10px;
    transform: scaleX(-1);
}

.groups-header #buddypress #header-cover-image,
.groups-header #cover-image-container,
.users-header #buddypress #header-cover-image,
.users-header #cover-image-container {
    margin-left: auto;
    margin-right: -50vw;
    left: auto;
    right: 50%;
}


/*--------------------------------------------------------------
# WooCommerce
--------------------------------------------------------------*/

a.page-numbers[title="←"],
a.page-numbers[title="→"],
a.next.page-numbers,
a.prev.page-numbers {
    -webkit-transform: rotate(180deg);
    transform: rotate(180deg);
}

.nav-links a.prev.page-numbers,
.nav-links a.next.page-numbers,
.woocommerce-pagination a.prev.page-numbers,
.woocommerce-pagination a.next.page-numbers {
    -webkit-transform: rotate(0deg);
    transform: rotate(0deg);
}

.woocommerce ul.products li.product .onsale {
    left: 0;
    right: auto;
}

.woocommerce #respond input#submit.added::after,
.woocommerce a.button.added::after,
.woocommerce button.button.added::after,
.woocommerce input.button.added::after {
    margin-left: .53em;
    margin-right: 0;
}

.woocommerce-page div.product form.cart div.quantity,
.woocommerce div.product form.cart div.quantity {
    margin: 0 0 0 15px;
}

.woocommerce-error,
.woocommerce-info,
.woocommerce-message,
.woocommerce-page .entry-content .woocommerce-error,
.woocommerce-page .entry-content .woocommerce-info,
.woocommerce-page .entry-content .woocommerce-message,
.woocommerce .entry-content .woocommerce-error,
.woocommerce .entry-content .woocommerce-info,
.woocommerce .entry-content .woocommerce-message {
    padding: 1em 3.5em 1em 2em !important;
}

.woocommerce-account .woocommerce-MyAccount-navigation li.woocommerce-MyAccount-navigation-link a {
    padding: 10px 30px 10px 0;
}

.woocommerce-account .woocommerce-MyAccount-navigation li.woocommerce-MyAccount-navigation-link a::after {
    right: 10px;
    left: auto;
}

.woocommerce ul.products li.product .price del,
.woocommerce div.product p.price del,
.woocommerce div.product span.price del {
    margin-right: 0;
    margin-left: 4px;
}

.woocommerce span.onsale {
    right: 2px;
    left: auto;
}
/* Select arrows are painted with a physical background-position; mirror them to the start side. */
:root {
    --bx-select-arrow-x: left;
}

/* Select2 (WooCommerce country, state and sorting selects): woocommerce.css pins the
 * arrow to the right edge at the same specificity as Select2's own [dir="rtl"] rule
 * and loads later, so in RTL the arrow sat on top of the first characters. */
:root .select2-container--default .select2-selection--single .select2-selection__arrow {
    right: auto;
    left: 1px;
}

/* Product tab panel lists: woocommerce.css adds a physical 20px left indent. */
.woocommerce div.product .woocommerce-tabs .panel ul,
.woocommerce-page div.product .woocommerce-tabs .panel ol {
    padding-left: 0;
    padding-right: 20px;
}

/*--------------------------------------------------------------
# bbPress
--------------------------------------------------------------*/

/* bbpress.css floats the forum search to the right, overriding bbPress's own RTL
 * float: left; keep it at the end edge like the LTR layout. Below 768px bbpress.css
 * unfloats it to full width, so the mirror stops there too. */
@media only screen and (min-width: 768px) {
    #bbpress-forums div.bbp-search-form {
        float: left;
    }
}

@media only screen and (max-width: 320px) {

    #bbpress-forums li.bbp-header li.bbp-forum-info,
    #bbpress-forums li.bbp-header li.bbp-topic-title {
        text-align: right;
    }
}
