// =============================================================================
// _RTL.SCSS
// -----------------------------------------------------------------------------
// Site styles.
// =============================================================================

// =============================================================================
// TABLE OF CONTENTS
// -----------------------------------------------------------------------------
//   01. Typography
//   02. Navigation
//   03. Shortcodes
//   04. Forms
//   05. Isotope
//   06. WooCommerce
// =============================================================================

// Typography
// =============================================================================

.rtl {
  ul:not(.x-nav):not(.x-comments-list):not(.products),
  ol:not(.x-nav):not(.x-comments-list):not(.products) {
    margin: 0 1.655em 1.313em 0;
  }
}



// Navigation
// =============================================================================

.rtl {
  &.x-navbar-static-active,
  &.x-navbar-fixed-top-active {
    .desktop {
      .x-nav {
        > li {
          float: right;
        }
      }
    }

    .masthead-inline {
      .x-brand {
        float: right;
      }

      .desktop {
        .x-nav {
          float: left;

          > li:not(.x-megamenu) {
            .sub-menu {
              left: 0;
              right: auto;

              .sub-menu {
                left: $dropdownOffset;
                right: auto;
              }
            }
          }
        }
      }
    }

    .masthead-stacked {
      .desktop {
        .x-nav {
          > li:not(.x-megamenu) {
            .sub-menu {
              left: auto;
              right: 0;

              .sub-menu {
                left: auto;
                right: $dropdownOffset;
              }
            }
          }
        }
      }
    }
  }

  &.x-navbar-fixed-left-active,
  &.x-navbar-fixed-right-active {
    @include break(cubs) {
      .x-brand {
        float: right;
      }
    }
  }

  .x-navbar .x-nav {
    li > a > span {
      display: inline-block;

      &:after {
        margin-left: 0;
        margin-right: 0.35em;
        float: left;
      }
    }
  }

  .x-navbar .mobile .x-nav ul {
    margin: 0 2.25em 0 0;
  }

  .x-sub-toggle {
    left: 0;
    right: auto;
  }

  @include break(cubs) {
    .masthead-inline {
      .x-btn-navbar {
        float: left;
      }
    }
  }
}



// Shortcodes
// =============================================================================

.rtl {
  .x-dropcap {
    float: right;
    margin: 0.2em 0 0 0.215em;
  }

  .x-skill-bar {
    .bar {
      float: right;

      .percent {
        left: 4px;
        right: auto;
      }
    }
  }

  .h-feature-headline span i {
    float: right;
    margin-right: 0;
    margin-left: 0.25em;
  }

  .x-btn [class*="#{$fa-css-prefix}-"] {
    float: right;
    margin-right: 0;
    margin-left: 0.5em;
  }

  .x-ul-icons {
    margin-left: 0;
    margin-right: 1.425em;
  }

  .x-accordion-heading {
    .x-accordion-toggle {
      &:before {
        margin-left: 10px;
        margin-right: 0;
      }
    }
  }

  .close {
    float: left;
  }

  .x-alert,
  .wpcf7-response-output {
    .close {
      top: -10px;
      right: 10px;
    }
  }

  .x-author-box {
    .avatar {
      float: right;
    }

    .x-author-info {
      margin-right: 110px;
      margin-left: 0;
    }
  }

  .x-prompt {
    &.message-left {
      .x-prompt-section.x-prompt-section-message {
        padding-left: 2.25em;
        padding-right: 0;
        text-align: left;
      }
    }

    &.message-right {
      .x-prompt-section.x-prompt-section-message {
        padding-right: 2.25em;
        padding-left: 0;
        text-align: right;
      }
    }
  }

  .x-pricing-column-info {
    ul {
      > li {
        [class*="#{$fa-css-prefix}-"] {
          margin-right: 0.85em;
          margin-left: 0;
        }
      }
    }
  }

  .flex-viewport {
    direction: ltr;
  }
}



// Forms
// =============================================================================

.rtl {
  .form-search:not(.center-text),
  .widget_product_search:not(.center-text) form {
    &:before {
      left: auto;
      right: 0.8em;
    }

    .search-query,
    input[type="text"] {
      padding-right: 2.15em;
      padding-left: 0.8em;
      text-align: right;
    }
  }
}



// Isotope
// =============================================================================

.rtl {
  .isotope .isotope-item {
    -webkit-transition-property: right, top, -webkit-transform, opacity;
       -moz-transition-property: right, top, -moz-transform, opacity;
        -ms-transition-property: right, top, -ms-transform, opacity;
         -o-transition-property: right, top, -o-transform, opacity;
            transition-property: right, top, transform, opacity;
  }
}



// WooCommerce
// =============================================================================

.rtl {
  .woocommerce-MyAccount-navigation {
    ul {
      margin-right: 0 !important;
    }
  }

  .woocommerce-MyAccount-navigation-link {
    a {
      margin-left: 3px;
      margin-right: 0;
    }
  }
}