* {
  box-sizing: border-box;
}

.octotree_sidebar {
  position: fixed !important;
  overflow: visible;
  top: 0;
  right: 0;
  left: 0;
  bottom: 0;
  border-right: 1px solid #ddd;
  z-index: 1000001;
  transition: transform .2s ease;
  transform: translate3d(-100%, 0, 0);

  .ui-resizable-e {
    position: absolute;
    cursor: col-resize;
    width: 5px;
    right: 0;
    top: 0;
    bottom: 0;
  }
}

.octotree_views {
  height: 100%;
  overflow: auto;

  .octotree_view {
    display: none;

    &.current {
      display: block;
    }

    .octotree_view_header {
      width: 100%;
      position: absolute;
      top: 0;
      left: 0;
      font-size: 16px;
      line-height: 2.6;
      margin: 0;
      text-shadow: 0 1px 0 #fff;
      z-index: 1000002;
    }

    .octotree_help {
      outline: 0;
      cursor: pointer;
      text-decoration: none;
    }
  }

  .octotree_treeview {
    .octotree_view_header {
      padding-left: 13px;
    }
    .octotree_header_repo, .octotree_header_branch {
      width: 100%;
      padding-right: 55px;
      overflow: hidden;
      white-space: nowrap;
      text-overflow: ellipsis;
    }
    .octotree_header_repo {
      font-weight: bold;
    }
    .octotree_header_repo:before {
      color: #bbb;
      margin-right: 6px;
      line-height: 28px;
    }
    .octotree_header_branch {
      line-height: 1;
      margin-top: -10px;
      margin-bottom: 5px;
      margin-left: -1px;
      font-size: 12px;
      margin-top: -6px;
      font-size: 13px;
    }
    .octotree_header_branch:before {
      margin-right: 8px;
      margin-left: 3px;
    }
    .jstree-anchor {
      text-decoration: none;
      outline: none;
      padding-right: 0;
    }
    .jstree-anchor:hover {
      text-decoration: none !important;
    }
    .jstree-default {
      .jstree-wholerow {
        height: auto;
      }
      .jstree-node {
        line-height: 24px;
        margin-left: 12px;
      }
      .jstree-icon.jstree-ocl {
        margin-right: -6px;
        margin-top: -1px;
      }
    }

    .jstree-icon.tree, .jstree-icon.blob, .jstree-icon.commit {
      display: inline-block;
      margin-right: 3px;
      text-decoration: none;
      font-smoothing: antialiased;
    }
    .jstree-default .jstree-icon, .jstree-default .jstree-icon:empty, .jstree-default .jstree-anchor {
      line-height: 24px !important;
      font-style: normal;
    }
  }

  .octotree_errorview {
    .octotree_view_header {
      padding-left: 5px;
      padding-top: 5px;
    }
    & > form {
      div {
        margin: 6px;
      }
      input {
        width: 100%;
      }
      .error {
        color: #900;
      }
      .button {
        margin-right: 5px;
      }
    }
  }

  .octotree_optsview {
    .octotree_view_header {
      padding-left: 5px;
      padding-top: 5px;
    }
    & > form {
      margin: 6px;
      & > div {
        padding-top: 5px;
        padding-bottom: 12px;
        a {
          display: inline-block;
          float: right;
        }
      }
      label {
        font-weight: normal !important;
      }
      label.disabled {
        color: gray;
      }
      input[type=text], textarea {
        width: 100%;
      }
      textarea {
        resize: vertical;
        height: 60px;
      }
    }

    .octotree_opts_disclaimer {
      color: gray;
      display: block;
      font-size: 12px;
      margin-left: 17px;
    }

    .octotree_opts_backing {
      color: gray;
      font-size: 12px;
      margin-left: 2px;
      a {
        float: none;
      }
    }
  }
}

.octotree-show {
  .octotree_sidebar {
    transform: translate3d(0, 0, 0);
  }
}

a.octotree_toggle, a.octotree_opts {
  position: absolute !important;
  text-align: center;
  line-height: 1;
  cursor: pointer;
  z-index: 1000003;

  & > span {
    line-height: 1;
    display: inline-block;
    text-decoration: none;
  }
}

a.octotree_opts {
  width: 15px;
  height: 15px;
}

a.octotree_toggle {
  width: 30px;
  height: 30px;
  padding: 6px 6px !important;

  &.octotree_loading {
    & > span:after {
      content: '';
    }

    .loader {
      border-radius: 50%;
      border: 2px solid #000;
      border-top: 2px solid rgba(0,0,0,0);
      border-left: 2px solid rgba(0,0,0,0);
      width: 16px;
      height: 16px;
      animation: loading .5s infinite linear;
    }
  }

  @keyframes loading {
    0%   { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
  }

  .popup {
    position: absolute;
    left: 0;
    top: calc(~"100% + 2px");
    cursor: pointer;
    opacity: 0;
    z-index: 1000004;
    width: 260px;
    text-align: left;
    text-transform: none;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid rgba(0,0,0,0.15);
    border-radius: 5px;
    box-shadow: 0 3px 12px rgba(0,0,0,0.25);
    white-space: normal;
    transition: opacity .3s linear;
    font-weight: 400;
    line-height: 20px;

    &:hover {
      color: black;
    }
    &.show {
      opacity: 1;
    }
    & > .arrow, & > .arrow:after {
      position: absolute;
      display: block;
      width: 0;
      height: 0;
      border-color: transparent;
      border-style: solid;
    }
    & > .arrow {
      left: 15px;
      top: -6px;
      border-width: 6px;
      margin-left: -6px;
      border-top-width: 0;
      border-bottom-color: rgba(0, 0, 0, .25);
    }
    & > .arrow:after {
      border-width: 5px;
      content: '';
      top: 1px;
      margin-left: -5px;
      border-top-width: 0;
      border-bottom-color: #fff;
    }
    & > .content {
      padding: 9px 14px;
      font-size: 13px;
    }
  }
}

@media print {
   a.octotree_toggle {
     display: none;
   }
  .octotree_sidebar {
     display: none;
  }
}
