@import '../abstract/_all';
.is-rtl {
  .fl-left {
    float: right;
  }
  .fl-right {
    float: left;
  }
  .text-left {
    text-align: right;
  }
  .text-right {
    text-align: left;
  }
  .xs\:text-right {
    @media (max-width: #{$break-sm - 1}) {
      text-align: left;
    }
  }
  .sm\:text-right {
    @media (max-width: #{$break-sm - 1}) {
      text-align: left;
    }
  }
  .md\:text-right {
    @media (max-width: #{$break-md - 1}) {
      text-align: left;
    }
  }
  .xs\:text-left {
    @media (max-width: #{$break-sm - 1}) {
      text-align: right;
    }
  }
  .sm\:text-left {
    @media (max-width: #{$break-sm - 1}) {
      text-align: right;
    }
  }
  .md\:text-left {
    @media (max-width: #{$break-md - 1}) {
      text-align: right;
    }
  }
  .select select:not([multiple]) {
    padding-right: 0;
    padding-left: 20px;
  }
  .select-size select:not([multiple]) {
    padding-right: 0;
    padding-left: 20px;
  }
  .select:not(.is-multiple, .is-loading)::after {
    right: inherit;
    left: 0;
  }
  .select.select-label select {
    padding-right: 100px;
  }
  .select.select-label label {
    left: inherit;
    right: 0;
  }
  .select:not(.is-multiple, .is-loading).select-box::after {
    left: 8px;
  }
  @for $i from 1 through length($espaciados) {
    $espaciado: nth($espaciados, $i);
    .mr-#{$espaciado} {
      margin-right: 0;
      margin-left: #{$espaciado}px;
    }
    .ml-#{$espaciado} {
      margin-left: 0;
      margin-right: #{$espaciado}px;
    }
    .pr-#{$espaciado} {
      padding-right: 0;
      padding-left: #{$espaciado}px;
    }
    .pl-#{$espaciado} {
      padding-left: 0;
      padding-right: #{$espaciado}px;
    }
  }
  .check-center.check-bleed.checkbox-radio
    [type='radio']:checked
    + label::before,
  .check-center.check-bleed.checkbox-radio
    [type='radio']:not(:checked)
    + label::before {
    left: initial;
    right: 0;
  }
  .check-center.check-bleed.checkbox-radio
    [type='radio']:checked
    + label
    .ico-radio,
  .check-center.check-bleed.checkbox-radio
    [type='radio']:not(:checked)
    + label
    .ico-radio {
    left: initial;
    right: 5px;
  }
  .btn {
    &.btn-world {
      .btn-world-center {
        text-align: right;
      }
      .btn-world-right {
        transform: rotateY(180deg);
      }
    }
  }
  .btn-group {
    & > :not(:first-child, :last-child) {
      border-radius: 0;
      margin-right: -1px;
      margin-left: 0;
    }
    .btn {
      &:first-child {
        border-radius: 0 $btn-radius $btn-radius 0;
      }
      &:last-child {
        border-radius: $btn-radius 0 0 $btn-radius;
      }
    }
  }
  .btn-group [class^='btn--']:last-child,
  .btn-group [class*=' btn--']:last-child {
    margin-right: -1px;
    margin-left: 0;
  }
  .btn-social-login {
    svg {
      margin-right: 0;
      margin-left: 8px;
    }
  }
  .btn-social {
    padding-right: 32px;
    padding-left: 32px;
    svg-icon,
    svg-icon2,
    md-icon {
      right: 16px;
      left: auto;
    }
  }
  .checkbox-item {
    [type='checkbox']:not(:checked),
    [type='checkbox']:checked {
      left: 0;
      right: -9999px;
      position: absolute;
      width: 70px;
    }
    [type='checkbox']:not(:checked) + label::before,
    [type='checkbox']:checked + label::before {
      left: auto;
      right: 0;
      margin: 0 0 0 10px;
    }
    [type='checkbox']:not(:checked) + label,
    [type='checkbox']:checked + label {
      padding-left: 0;
      padding-right: 24px;
    }
    [type='checkbox']:not(:checked) + label span,
    [type='checkbox']:checked + label span {
      &.theta {
        padding-left: 0;
        padding-right: 24px;
      }
    }
    [type='checkbox']:not(:checked) + label .icon,
    [type='checkbox']:checked + label .icon {
      right: 2px;
      left: auto;
      top: 3px;
    }
    .ma-wrapper-terms-inner {
      span,
      span.legal-text {
        padding-right: 0;
        padding-left: 0;
      }
    }
  }
  .check-bleed {
    &.checkbox-radio [type='radio']:checked + label .ico-radio,
    &.checkbox-radio [type='radio']:not(:checked) + label .ico-radio {
      left: 0;
      right: 17px;
    }
    &.checkbox-radio [type='radio']:checked + label::before,
    &.checkbox-radio [type='radio']:not(:checked) + label::before {
      left: auto;
      right: 0;
    }
  }
  .check-center {
    &.checkbox-radio [type='radio']:checked + label::before,
    &.checkbox-radio [type='radio']:not(:checked) + label::before {
      left: auto;
      right: 16px;
      margin: 0;
    }
    &.checkbox-radio [type='radio']:checked + label .ico-radio,
    &.checkbox-radio [type='radio']:not(:checked) + label .ico-radio {
      left: 0;
      right: 21px;
    }
    .box3-content {
      padding-left: 0;
      padding-right: calc(48px);
    }
  }
  .checkbox-radio {
    [type='radio']:not(:checked),
    [type='radio']:checked {
      left: 0;
      right: -9999px;
      position: absolute;
      width: 70px;
    }
  }
  .checkbox-item-text {
    span {
      margin-left: 0;
      margin-right: 40px;
    }
  }
  [type='radio']:not(:checked),
  [type='radio']:checked,
  .checkbox-card [type='radio'] {
    left: 9999px;
  }
  .checkbox-item-2 [type='checkbox']:not(:checked),
  .checkbox-item-2 [type='checkbox']:checked {
    left: 9999px;
  }
  .color-wrap {
    button {
      margin-right: 0;
      margin-left: 8px;
    }
  }
  .form-input-label,
  .form-input-label-2 {
    &.datalist {
      svg {
        right: auto;
        left: 16px;
      }
      .validation-error-messages {
        svg {
          left: auto;
        }
      }
      &::after {
        left: 4px;
      }
    }
  }
  .form-prefix {
    input {
      text-align: right;
    }
  }
  .select {
    &.select-box {
      select {
        padding: 1px 8px 0 20px;
      }
      &::after {
        left: 6px;
        right: inherit;
      }
    }
    &.select-flat {
      label {
        left: auto;
      }
      select {
        padding-right: 0;
      }
      &::after {
        left: 20px;
        right: auto;
      }
    }
  }
  .form-input-label {
    .info-text {
      left: 0;
    }
    &.icon-right {
      .form-text {
        right: auto;
        left: 0;
      }
    }
    &.has-ico-post {
      svg-icon,
      svg-icon2,
      md-icon {
        position: absolute;
        right: 0;
      }
      .validation-error-messages {
        svg-icon,
        svg-icon2,
        md-icon {
          position: relative;
        }
      }
    }
  }
  .form-input-prefix {
    .input-prefix {
      margin-right: 0;
      margin-left: 8px;
    }
  }
  .form-input-label-2 {
    &.icon-right {
      .form-text {
        right: auto;
        left: 0;
      }
    }
    &.has-ico-post {
      .ico-post {
        right: auto;
        left: 0;
      }
      .validation-error-messages {
        svg-icon,
        svg-icon2,
        md-icon {
          position: relative;
        }
      }
    }
    &.has-ico-pre {
      .ico-pre {
        position: absolute;
        right: 0;
        left: auto;
      }
      .validation-error-messages {
        svg-icon,
        svg-icon2,
        md-icon {
          position: relative;
        }
      }
    }
    .info-text {
      left: 0;
      right: initial;
    }
  }
  .has-ico-post {
    &.btn,
    & > input,
    & > label {
      padding-right: 0;
      padding-left: $btn-padding * 2;
    }
  }
  .has-ico-pre {
    &.btn,
    & > input,
    & > label {
      padding-left: 0;
      padding-right: $btn-padding * 2 + 4px;
    }
  }
  .link-svg-pre,
  button.link-line.link-svg-pre {
    padding-left: 0;
    padding-right: 20px;
    &::after {
      left: 0;
    }
    svg-icon,
    svg-icon2,
    md-icon {
      left: auto;
      right: 0;
    }
  }
  .link-svg-post,
  button.link-line.link-svg-post {
    padding-left: 20px;
    padding-right: 0;
    &::after {
      right: 0;
    }
    svg-icon,
    svg-icon2,
    md-icon {
      right: auto;
      left: 0;
    }
  }
  ul.list-disc {
    li {
      &::after {
        right: 0;
      }
    }
  }
  .list-button {
    &.list-secundary,
    &.list-secondary {
      padding-left: 0;
      padding-right: 16px;
    }
    &.list-tertiary {
      padding-left: 0;
      padding-right: 32px;
    }
  }
  .tabs-mini {
    float: left;
    li:first-child a::after {
      left: 0;
      right: auto;
    }
  }
  .header-account-back {
    left: auto;
    right: 0;
    svg-icon,
    svg-icon2,
    md-icon {
      svg {
        transform: rotate(180deg);
      }
    }
  }
  .validation-error-messages {
    svg-icon,
    svg-icon2,
    md-icon {
      padding-right: 0;
      padding-left: 8px;
    }
  }
  .tag-new {
    right: auto;
    left: -30px;
  }
  .box4 {
    ul {
      margin-left: 0;
      margin-right: 16px;
    }
    &::before {
      left: initial;
      top: 47px;
      right: 20px;
    }
  }
  .box3-top {
    padding-right: 16px;
    padding-left: 0;
  }
  .mn-mainmenu .list-check li.is-active a::before {
    margin-right: -8px;
  }
  @media (min-width: 768px) {
    .mn-mainmenu .mn-mainbar .tabs ul.mn-list-item li:first-child a,
    .mn-mainmenu .mn-mainbar .tabs ul.mn-list-item li:first-child span {
      padding: 8px 0 8px 20px;
    }
  }
  .tooltip-sm {
    left: calc(50% - 16px);
    right: auto;
    padding-left: $tooltip-padding + 16px;
    padding-right: $tooltip-padding * 2;
    &::after {
      right: auto;
      left: $tooltip-dist;
    }
    &.tooltip-tr,
    &.tooltip-br {
      right: calc(50% - 16px);
      left: auto;
      &::after {
        left: auto;
        right: $tooltip-dist;
      }
    }
    .close {
      right: auto;
      left: $tooltip-padding;
    }
  }
  .tooltip-sm-temp {
    left: -8px;
    right: auto;
    padding-left: $tooltip-padding + 16px;
    padding-right: $tooltip-padding * 2;
    &::after {
      right: auto;
      left: $tooltip-dist;
    }
    .close-temp {
      right: auto;
      left: $tooltip-padding;
    }
  }
  .toast {
    direction: rtl;
    right: 0;
    left: 0;
    @media (min-width: $break-sm) {
      right: initial;
      left: 50%;
    }
  }
  .md-toggle button,
  .md-toggle-inner {
    direction: rtl;
    text-align: right;
  }
  .md-link button {
    direction: rtl;
    text-align: right;
  }
  .md-link button svg {
    transform: rotate(180deg);
  }
  &.has-icon-pre {
    .md-link-icon-container {
      direction: ltr;
      text-align: left;
    }
  }
  .md-accordion button,
  .md-accordion-content {
    direction: rtl;
    text-align: right;
  }
  .list-state {
    .list-state-item {
      position: relative;
      padding-right: 20px;
      margin-right: 4px;
      &::after {
        right: -5px;
      }
      &::before {
        border-left: none;
        border-right: 1px dashed black;
        top: 12px;
        right: 0;
      }
      &:last-child {
        &::before {
          content: '';
          border: none;
        }
      }
    }
  }
  .bottom-sheet {
    .border-clean-l {
      border-width: var(--line-width) 0 var(--line-width) var(--line-width);
    }
    .border-clean-r {
      border: solid $c-primary;
      border-width: var(--line-width) 0 var(--line-width) 0;
    }
    .bs-group-colors {
      padding-left: 20px;
      padding-right: 16px;
    }
  }
  .tag-product {
    right: 0;
    left: inherit;
  }
  .container-body2 {
    padding-right: 16px;
    padding-left: 0;
    @media (min-width: $break-md) {
      padding-right: 40px;
      padding-left: 0;
    }
  }
}
