@import "../../node_modules/twitter-bootstrap-3.0.0/less/bootstrap.less";
@import "./variables.less";

navbar {
  position: absolute;
  left: 0;
  top: 0;
}

.typeahead-container {
  ul {
    width: 288px;
    overflow: hidden;
    left: 0;
    border: 0;
    background-color: @scene-background;
    border-radius: 0;
    box-shadow: none;
    li {
      a {
        white-space: normal;
        color: @primary-color;
        padding: 3px 12px;
        cursor: pointer;
      }
      &.active {
        a, a:hover, a:focus {
          background-color: transparent;
          color: @link-color;
        }
      }
    }
  }
}

.search {
  width: 288px;
  margin: 12px;
  input {
    border: 0;
    border-radius: 0;
  }
  button {
    background: @button-color;
  }
}

button.btn {
  border-radius: 0;
}

div.infoBox {
  background-color: @scene-background;
  width: 315px;
  position: absolute;
  top: 0;
  height: 100%;
  padding: 52px 12px 12px 12px;
  color: @primary-color;
  border-right: 1px solid @border-color;
  overflow-y: auto;

  a {
    color: @link-color;
    font-size: 18px;
  }

  hr {
    display: block; height: 1px;
    border: 0; border-top: 1px solid @border-color;
    margin: 1em 0; padding: 0;
  }
  .description {
    margin-top: 10px;
  }

  .maintainerBox {
    float: left;
    margin-right: 4px;
    position: relative;
    overflow: visible;
    .border {
      display: none;
      position: absolute;
      width: 35px;
      height: 36px;
      border: 2px solid @acent-color;
      top: -4px;
      left: -5px;
      z-index: 1;
    }

    &.selected {
      .border {
        display: block;
      }
    }
  }


  .nodes {
    float: left;
    width: 50%;
    border-right: 1px solid @border-color;
    margin-right: 9px;
  }

  .number {
    font-size: 28px;
    line-height: 24px;
  }

  .packagesCount {
    top: 29px;
    right: -12px;
    font-size: 21px;
    position: absolute;
    z-index: 1;
    overflow: visible;
    white-space: nowrap;
    background: #36394A;
    width: 47px;
    height: 25px;
    text-align: center;
    color: @link-color;
  }

  .header {
    margin: 12px 0;
    a {
      color: @secondary-color;
      font-size: 22px;
    }
    a.selected {
      color: @primary-color;
      text-decoration: none;
      cursor: default;
    }
  }

  .license-container {
    a {
      display: block;
      width: 100%;
      color: @primary-color;
      font-size: 14px;
      font-family: helvetica;
      &:hover, &:focus {
        color: @link-color;
        text-decoration: none;
        span {
          text-decoration: none;
        }
      }
      &.selected {
        color: @acent-color;
      }
    }

    .license-row {
      border-bottom: 1px solid @border-color;
    }
  }

  .last {
    float:right;
  }

  ::-moz-selection { /* Code for Firefox */
      color: @link-color;
      background: @acent-color;
  }

  ::selection {
      color: @link-color;
      background: @acent-color;
  }

  div.packageInfo {
    .version {
      color: @secondary-color;
      float: right;
    }
  }
}

.full  {
  width: 100%;
  height: 100%;
}

.failed {
  position: absolute;
  width: 315px;
  top: 57px;
  padding: 12px;
  color: @error-color;
}

.graph-progress {
  position: absolute;
  width: 315px;
  top: 57px;
  padding: 12px;
  color: @primary-color;
  span {
    color: @acent-color;
  }
}

pre {
  border-radius: 0;
  background-color: transparent;
  border: 0;
  color: @secondary-color;
}

body {
  background-color: @scene-background;
  position: absolute;
  overflow: hidden;
  margin: 0;
  padding: 0;
}

.graphView {
  position: absolute;
  top: 0;
  left: 0;
  right: 0px;
  height: 100%;
  &.d2d {
    left: 315px;
    svg {
      .full;
    }
  }
}

.sidebar {
  position: absolute;
  top: 50px;
  left: 20;
  width: 320px;
  height: 200px;
  overflow-y: auto;
}

.divider {
  margin-top: 8px;
  margin-bottom: 8px;
}

.no-shadow {
  box-shadow: none;
}

.switchMode {
  position: absolute;
  bottom: 15px;
  left: 30px;
  &.d2d {
    left: 330px;
  }
}

.share {
  position: absolute;
  right: 12px;
  font-size: 12px;
  top: 12px;

  p {
    margin-bottom: 2px;
    text-align: right;
    a {
      color: @secondary-color;
    }
    a:hover, a:focus {
      color: @link-color;
      text-decoration: none;
    }
  }
}

a.hide-info-box {
  display: none;
  text-align: center;
  width: 100%;
}

@media only screen and (max-width : 630px) {
  .switchMode {
    display: none;
  }

  .share {
    bottom: 0;
    right: 0;
    font-size: 12px;
    width: 100%;
    text-align: center;
    top: inherit;
    padding-left: 19px;
    background-color: @scene-background;

    p {
      display: inline-block;
      padding-right: 7px;
    }
  }
  navbar {
    background: @scene-background;
    right: 0;
    form.search {
      width: auto;
      .typeahead-container ul {
        width: auto;
      }
    }
  }

  div.infoBox {
    width: 100%;
    top: inherit;
    bottom: 16px;
    height: 56px;
    padding: 0 12px 12px 12px;
    border-right: 0px;
    overflow-y: hidden;
    .header {
      a.selected {
        color: @secondary-color;
        &:hover {
          text-decoration: underline;
          cursor: pointer;
        }
      }
    }
    &.responsive-open {
      top: 50px;
      height: inherit;
      bottom: 0;
      overflow-y: auto;
      .header {
        a.selected {
          color: @primary-color;
        }
      }

      a.hide-info-box {
        display: block;
      }
    }
  }
  .graphView.d2d {
    left: 0;
  }

  .graph-progress {
    top: inherit;
    bottom: 27px;
    left: 50%;
    margin-left: -100px;
  }
}
