.language {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  margin: 0 15px;
  @media (max-width: $maxSm) {
    margin: 0 7px;
  }
  a {
    @extend %transition;
    padding: 10px !important;
  }

  button {
    position: relative;
    font-size: 14px;
    height: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 0;
    box-shadow: none;
    &:focus {
      border: none;
      box-shadow: none;
    }

    h6 {
      display: inline-block;
      margin-bottom: 0;
      font-size: 16px;
      font-weight: bold;
      margin: 0 4px;
    }

    span {
      width: 30px;
      height: 30px;
      border-radius: 50%;
      display: block;
      margin: 5px;
      background-position: center;
      background-size: cover;
    }
    svg {
      font-size: 16px;
      margin: 0 2px;
    }
  }

  .dropdown-toggle::after {
    margin-right: 0.455em;
    margin-left: 0;
    left: -5px;
  }
  .dropdown-menu.show {
    display: block;
  }
  .dropdown-menu {
    top: 50px;
    padding: 20px 15px 30px;
    margin: 0;
    text-align: right;
    min-width: 350px;

    a {
      justify-content: normal !important;
      padding: 5px 10px !important;
      height: 35px !important;
      align-items: center;
      display: flex;
      font-size: 14px;

      svg {
        margin-left: 5px;
        font-size: 14px;
      }
    }
    h6 {
      font-size: 16px;
      font-weight: bold;
      margin-bottom: 10px;
    }
    .form-check {
      display: inline-flex;
      align-items: center;
      flex-shrink: 0;
      width: 50%;
      padding: 0;
      input {
        height: 16px;
        width: 16px;
      }
      .form-check-label {
        margin-bottom: 0;
        margin-right: 16px;
        img {
          width: 30px;
          height: 20px;
          margin: 0 3px;
        }
        span {
          margin: 5px 2px;
          font-size: 15px;
        }
      }
    }
    .dropdown-divider {
      margin: 0.2rem 0;
    }
    @media (max-width: $maxSm) {
      padding: 10px;
      min-width: 300px;
      left: -50px;
      .form-check {
        .form-check-label {
          margin-right: 18px;
          img {
            width: 25px;
            height: 17px;
          }
          span {
            font-size: 13px;
          }
        }
      }
    }
  }
  &:hover {
    .dropdown-menu {
      display: block;
    }
  }
}

.ltr {
  .language {
    .dropdown-toggle::after {
      margin-right: 0;
      margin-left: 0.455em;
      left: initial;
      right: -5px;
    }

    .dropdown-menu {
      text-align: left;
      right: 0;
      left: initial;

      a {
        svg {
          margin-left: 0;
          margin-right: 5px;
        }
      }

      .form-check {
        left: 20px;
      }
      @media (max-width: $maxSm) {
        right: -50px;
        left: initial;
        .form-check {
          .form-check-label {
            margin-right: initial;
            margin-left: 18px;
          }
        }
      }
    }
  }
}
