/* layout-menu */

@media (min-width: 1200px) {

  .layout-menu-fixed .layout-menu,
  .layout-menu-fixed-offcanvas .layout-menu {
    position: fixed;
    top: 0;
    bottom: 0;
    right: 0;
    left: unset;
    margin-right: 0 !important;
    margin-left: 0 !important;
  }
}

/* Make sidebar attach to the right in RTL */
@media (max-width: 1199.98px) {
  html[dir="rtl"] .layout-menu {
    right: 0 !important;
    left: auto !important;
    transform: translate3d(100%, 0, 0);
    /* hidden off the right side */
  }

  html[dir="rtl"].layout-menu-expanded .layout-menu,
  html[dir="rtl"] body.layout-menu-expanded .layout-menu {
    transform: translate3d(0, 0, 0) !important;
    /* slide in from the right */
  }
}

@media (min-width: 1200px) {

  /* Pin menu to the right instead of left */
  html[dir="rtl"].layout-menu-fixed .layout-menu,
  html[dir="rtl"].layout-menu-fixed-offcanvas .layout-menu {
    right: 0;
    left: auto;
  }

  /* Move page content to the left to make space for menu on the right */
  html[dir="rtl"].layout-menu-fixed:not(.layout-menu-collapsed) .layout-page,
  html[dir="rtl"].layout-menu-fixed-offcanvas:not(.layout-menu-collapsed) .layout-page {
    padding-right: 16.25rem;
    padding-left: 0;
  }
}

/* RTL: put the round menu toggle on the inner-left side of the sidebar */
html[dir="rtl"] .app-brand .layout-menu-toggle {
  left: auto;
  /* cancel the original LTR positioning */
  right: 15rem;
  /* same distance but from the right side of the menu */
}

/* layout-page */

@media (min-width: 1200px) {

  .layout-menu-fixed:not(.layout-menu-collapsed) .layout-page,
  .layout-menu-fixed-offcanvas:not(.layout-menu-collapsed) .layout-page {
    padding-right: 16.25rem;
    padding-left: unset;
  }
}

/* app-brand */

.menu .app-brand.demo {
  direction: rtl;
}

/* menu */

.menu-icon {
  margin-left: 0.5rem;
  margin-right: unset;
}

.menu-vertical .menu-item .menu-toggle {
  padding-left: calc(1rem + 1.26em);
  padding-right: 1rem;
}

.menu-vertical .menu-item .menu-toggle::after {
  left: 1rem;
  right: unset;
  transform: translateY(-50%) rotate(225deg);
}

.menu-vertical .menu-sub .menu-link {
  padding-right: 3rem;
  padding-left: 1rem;
}

.bg-menu-theme .menu-sub>.menu-item>.menu-link:before {
  right: 1.4375rem;
  left: unset;
}

.bg-menu-theme .menu-header:before {
  right: 0;
  left: unset;
}

.menu-header {
  text-align: right;
}

/* layout-navbar */

.dropdown-menu-end[data-bs-popper] {
  right: auto;
  left: 0;
}

.flex-grow-1 {
  text-align: right;
}

.dropdown-item {
  text-align: right;
}

/* content-wrapper */

/* card */

.align-items-end {
  flex-direction: row-reverse;
}

.card-body {
  direction: rtl;
}

/* account-settings-account */

.nav {
  padding-right: 0;
  padding-left: unset;
}

.input-group {
  flex-direction: row-reverse;
}

.form-select {
  padding: 0.4375rem 0.875rem 0.4375rem 1.875rem;
  background-position: left 0.875rem center;
}

.layout-wrapper:not(.layout-horizontal) .bg-menu-theme .menu-inner>.menu-item.active:before {
  right: unset;
  left: 0;
}

.modal-header .btn-close {
  margin: calc(-0.5 * var(--bs-modal-header-padding-y)) auto calc(-0.5 * var(--bs-modal-header-padding-y)) calc(-0.5 * var(--bs-modal-header-padding-x));
}