.octotree-show {
  .octotree_oschina_only {
    display: none;
  }

  .octotree_oschina_sidebar {
    a.octotree_toggle {
      top: 11px;
      right: 12px;
      &:not(.octotree_loading) > span:after {
        content: data-uri('image/svg+xml;charset=UTF-8', './octicons/chevron-left.svg');
      }
      &:not(.octotree_loading):hover > span:after {
        content: data-uri('image/svg+xml;charset=UTF-8', './octicons/chevron-left-hover.svg');
      }
    }
  }

  body.split-diff .container {
    padding-left: 0;
  }
}

.octotree_oschina_sidebar {
  padding-top: 54px;
  background-color: #f7f7f7;
  border-right: none;

  .octotree_oschina_only {
    display: block;
  }

  .octotree_views {
    border-right: 1px solid #ddd;
    background-color: #fff;

    .octotree_view {
      .octotree_view_header {
        font-weight: normal;
        text-shadow: none;
        height: 46px;
        line-height: 2.4;
        background: #303643;
        background: #fafbfc none;
        border-right: 1px solid #e1e4e8;
        border-bottom: 1px solid #e1e4e8;
      }

      .octotree_help {
        & > span:before {
          content: data-uri('image/svg+xml;charset=UTF-8', './octicons/question.svg');
        }
      }
    }

    .octotree_treeview {
      .octotree_header_repo {
        font-size: 13px;
        font-weight: normal;
      }
      .octotree_header_repo:before {
        position: relative;
        top: 2px;
        content: data-uri('image/svg+xml;charset=UTF-8', './octicons/repo.svg');
      }
      .octotree_header_branch {
        font-size: 11px;
      }
      .octotree_header_branch:before {
        position: relative;
        top: 2px;
        content: data-uri('image/svg+xml;charset=UTF-8', './octicons/git-branch.svg');
      }
      .jstree-icon.tree, .jstree-icon.commit, .jstree-icon.blob.file-generic {
        margin-top: 3px;
      }
      .jstree-icon.tree:before {
        content: data-uri('image/svg+xml;charset=UTF-8', './octicons/file-directory.svg');
      }
      .jstree-icon.file-generic:before {
        content: data-uri('image/svg+xml;charset=UTF-8', './octicons/file-text.svg');
      }
      .jstree-node.jstree-leaf:hover {
        .jstree-icon.blob {
          margin-top: 1px;
          &:before {
            content: data-uri('image/svg+xml;charset=UTF-8', './octicons/cloud-download.svg');
          }
        }
      }
      .jstree-icon.commit:before {
        content: data-uri('image/svg+xml;charset=UTF-8', './octicons/file-submodule.svg');
      }
      .jstree-anchor {
        color: #0366d6 !important;
        & > span {
          color: black;
        }
      }
      .jstree-default {
        .jstree-wholerow-hovered {
          background: #eee;
        }
        .jstree-wholerow-clicked {
          background: #dbeeff;
        }
      }
    }
  }

  a.octotree_toggle, a.octotree_opts {
    color: black !important;

    &:hover, &.selected {
      color: #0366d6 !important;
    }
  }

  a.octotree_opts {
    top: 15px;
    right: 48px;
    width: 14px;
    height: 16px;
    background: data-uri('image/svg+xml;charset=UTF-8', './octicons/gear.svg');
    &:hover {
      background: data-uri('image/svg+xml;charset=UTF-8', './octicons/gear-hover.svg');
    }
  }

  a.octotree_toggle {
    top: 11px;
    right: -35px;

    &:not(.octotree_loading) > span:after {
      content: data-uri('image/svg+xml;charset=UTF-8', './octicons/chevron-right.svg');
    }
    &:not(.octotree_loading):hover > span:after {
      content: data-uri('image/svg+xml;charset=UTF-8', './octicons/chevron-right-hover.svg');
    }
    &.btn{
      position: relative;
      display: inline-block;
      padding: 6px 12px;
      font-size: 14px;
      font-weight: 600;
      line-height: 20px;
      white-space: nowrap;
      vertical-align: middle;
      cursor: pointer;
      -webkit-user-select: none;
      -moz-user-select: none;
      -ms-user-select: none;
      user-select: none;
      background-repeat: repeat-x;
      background-position: -1px -1px;
      background-size: 110% 110%;
      border: 1px solid rgba(27,31,35,0.2);
      border-radius: 0.25em;
      -webkit-appearance: none;
      -moz-appearance: none;
      appearance: none;
      height: 23px;
      padding-top: 3px !important;
      background: #FAFBFC;
      &:hover {
        background-color: #e6ebf1;
        background-image: -webkit-linear-gradient(270deg, #f0f3f6 0%, #e6ebf1 90%);
        background-image: linear-gradient(-180deg, #f0f3f6 0%, #e6ebf1 90%);
        background-position: 0 -0.5em;
        border-color: rgba(27,31,35,0.35);
        text-decoration: none;
        background-repeat: repeat-x;
      }
    }
  }
}
