/* =============================================================================
 * RTL — LAYOUT
 * =============================================================================
 * Loaded only when is_rtl() returns true.
 * Rules for global layout elements: back-to-top button, cart drawer items,
 * and cart drawer header and footer.
 * ============================================================================= */


/* -----------------------------------------------------------------------------
 * Back-to-top button
 * -----------------------------------------------------------------------------
 * Bottom-left of the viewport.
 * --------------------------------------------------------------------------- */
body.rtl .rbt-progress-parent.rbt-backto-top-active {
    left: 30px;
    right: auto;
}


/* -----------------------------------------------------------------------------
 * Cart drawer item row
 * -----------------------------------------------------------------------------
 * Product thumbnail at the right, close button at the left.
 * --------------------------------------------------------------------------- */
body.rtl .rbt-cart-side-menu .minicart-item,
body.rtl .rbt-cart-side-menu .rbt-minicart-wrapper > .minicart-item {
    flex-direction: row-reverse;
}

body.rtl .rbt-cart-side-menu .minicart-item .product-content {
    text-align: right;
}


/* -----------------------------------------------------------------------------
 * Cart drawer item spacing and thumbnail margin
 * -----------------------------------------------------------------------------
 * The thumbnail sits at the right in RTL, so the gap goes to its left.
 * --------------------------------------------------------------------------- */
body.rtl .rbt-cart-side-menu .minicart-item .thumbnail {
    margin-left: 12px !important;
    margin-right: 0 !important;
}


/* -----------------------------------------------------------------------------
 * Cart drawer header and footer
 * -----------------------------------------------------------------------------
 * Close button at the left of the header. Totals right-aligned in the footer.
 * --------------------------------------------------------------------------- */
body.rtl .rbt-cart-side-menu .cart-header,
body.rtl .rbt-cart-side-menu .rbt-minicart-header {
    flex-direction: row-reverse;
}

body.rtl .rbt-cart-side-menu .cart-footer,
body.rtl .rbt-cart-side-menu .rbt-minicart-footer {
    text-align: right;
}