
@import "variables";

body {
  margin: 0;
  font-family: 'Source Sans Pro', 'Helvetica Neue', Arial, sans-serif;
  font-size: 20px;
  overflow: hidden;
}

.sidebar-wrapper {
  width: 400px;
  position: relative;
}

.sidebar {
  position: fixed;
  left: 0;
  width: 400px;
  height: 100vh;

  overflow: auto;
  box-sizing: border-box;
  box-shadow: 0 0 3px rgba(0, 0, 0, 0.3);
  z-index: 200;
}

.sidebar .sidebar-content {
  padding: 55px 30px 120px;
}

.sidebar .title {
  white-space: nowrap;

  > span {
    cursor: pointer;
  }

  > span.disabled {
    cursor: default;
    &:hover {
      color: inherit;
    }
  }
}

.sidebar .level {
  .title {
    margin: 10px 0;
  }

  &[data-level='0'] {
    color: #8d92a1;
    font-size: 1em;

    > .title .expanding-status {
      display: none;
    }

    > .title .title-content {
      display: inline-block;
      margin-left: 23px;
      margin-bottom: 5px;
      font-size: 1.4em;
    }
  }

  &[data-level='1'] .level {
    font-size: 16px;
    color: #243348;
    margin-left: 20px;
  }

  .title-content:hover,
  .expanding-status:hover .fa {
    color: @color-highlight;
  }

  .title.selected {
    color: #42b983;
  }

  .title-content {
    white-space: nowrap;
  }
}
/* content & iframe */
.content {
  padding-left: 400px;
  position: relative;
  z-index: 50;
  box-sizing: border-box;
  width: 100vw;
  height: 100vh;
}

.content iframe {
  border: none;
  width: 100%;
  height: 100%;
}

/* expanding & collapsing */
.expanding-status {
  width: 20px;
  margin-right: 4px;
  text-align: center;
  display: inline-block;
}

.expanding-status .fa,
.level.no-child > .title .expanding-status .fa {
  display: none;

  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;

  color: #999;
}

.level.no-child > .title .expanding-status .icon-none,
.level[data-expanding-status=expanded] > .title .icon-down,
.level[data-expanding-status=collapsed] > .title .icon-right {
  display: inline-block;
}

.level.no-child > .title .expanding-status .icon-none {
  font-size: 8px;
  color: #ddd;
  vertical-align: 2px;
}

.level[data-expanding-status=collapsed] > .children {
  display: none;
}

/* read & unread status */

.read-status.fa {
  position: absolute;
  right: 0;
  font-size: 12px;
  color: #999;
  opacity: 0.1;
  margin-top: 5px;

  transition: right 400ms, opacity 400ms, color 400ms;
  background: #fff;
  /*border-radius: 50%;*/
  padding: 5px 10px 5px 5px;
  margin-top: -1px;
}

.read-status.read.fa {
  opacity: 0.9;
  color: #42b983;
}

[data-level='0'] {
  > .title .read-status {
    display: none;
  }
}

.read-status {
  display: none; // 在功能完备前, 先隐藏...
}

/* page filtering */
.page-filter-container {
  position: absolute;
  width: 100%;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  z-index: 2000;
  top: 0;
  padding: 20px 30px 10px 20px;

  transition: opacity 400ms;
}

.page-filter-container .fa-filter {
  position: absolute;
  top: 28px;
  font-size: 12px;
  left: 30px;
  color: #999;
  transition: color 400ms;
}

.page-filter-container.focused .fa-filter {
  color: #555;
}

.page-filter-container input {
  width: 100%;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  outline: none;
  color: #555;
}

#page-filter {
  border: 1px #ccc solid;
  line-height: 24px;
  padding: 0 5px 0 25px;
  border-radius: 12px;
  font-size: 14px;
}

.page-filter-container.fixed {
  opacity: 0.5;
}

.page-filter-container.fixed.focused {
  opacity: 1;
}

/* filtering */

.filtering .level {
  display: none;
}

.filtering .level.filtered {
  display: block;
}

.filtering .level.filtered > .title {
  opacity: 0.4;
}

.filtering .level.filtered.filtered-hit > .title {
  opacity: 1;
}

.search-wrap{
  position: fixed;
  width: 300px;
  padding-top: 20px;
  .input-wrap{
    width: 280px;
    height: 30px;
    margin-left: 45px;
    border: solid 1px @color-border-gray;
    border-radius: 20px;
    padding: 0 3px 0 10px;
    input{
      width: 210px;
      border: none;
      outline: none;
    }
    input:focus{
      border-color: @color-tag-color;
    }
    em{
      margin-top: 3px;
      float: right;
      display: inline-block;
      width: 22px;
      height: 22px;
      background: url("../images/search.png");
      background-size: 22px 22px;
    }
  }
  ul{
    background-color: @color-background-white;
    border: solid 1px @color-border-gray;
    width: 280px;
    display: block;
    margin: 5px 50px;
    border-radius: 5px;
    padding: 0;
    overflow: hidden;
    max-height: 400px;
    overflow-y: auto;
    li{
      list-style: none;
      color: @color-tag-color;
      padding: 5px 10px;
      font-size: 14px;
      cursor: pointer;
      em{
        color: @color-highlight;
      }
    }
    li:nth-child(odd){
      background-color: @color-background-light-grey;
    }
    .li-hover,li:hover{
      color: @color-highlight;
    }
  }
}