@import (less) "../../themes/common.less";
@import "./prism.css";


.clearfix() {
  &::after {
    content: "";
    display: block;
    clear: both;
  }
}

body {
  font-family: Monospaced Number,Chinese Quote,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,PingFang SC,Hiragino Sans GB,Microsoft YaHei,Helvetica Neue,Helvetica,Arial,sans-serif;
  color: #34495e;
  font-size: 13px;
  margin: 0px;
  overflow: hidden;
}

h2,
h3,
h4 {
  font-weight: 600;
  color: #2c3e50;
  letter-spacing: 1px;
}

h4 {
  font-size: 17px;
  margin: 30px 0 10px;
}

h3 {
  font-size: 19px;
  margin: 50px 0 10px;
}

h2 {
  margin: 10px 0;
  font-size: 26px;
}

.comm-header {
  position: fixed;
  // color: @white-color;
  height: 60px;
  padding: 0 40px 0 25px;
  left: 0;
  right: 0;
  z-index: 3;
  background: rgba(255, 255, 255, 0.8);
  .change-lang {
    margin-top: 19px;
    margin-right: -10px;
    >.h-btn{
      height: 26px;
    }
  }
  .logo {
    line-height: 60px;
    font-weight: 100;
    font-size: 30px;
    font-family: 'Dosis', 'Source Sans Pro', 'Helvetica Neue', Arial, sans-serif;
    img {
      height: 30px;
      width: 30px;
      margin-right: 10px;
      display: inline-block;
      vertical-align: middle;
    }
    .header-logo {
      position: relative;
      display: inline-block;
      height: 26px;
      width: 30px;
      box-sizing: content-box;
      margin-right: 10px;
      >span {
        position: absolute;
        display: inline-block;
        width: 5px;
        height: 30px;
        background-color: @primary-color;
      }
      &::before {
        content: "";
        top: 13px;
        position: absolute;
        background-color: @white-color;
        transform: scaleX(0);
        transform-origin: left;
        width: 30px;
        height: 5px;
        transition: .3s;
      }
      &::after {
        content: "";
        background-color: @white-color;
        position: absolute;
        right: 0;
        width: 5px;
        height: 30px;
        transform: scaleY(0);
        transition: .3s;
      }
    }
    &:hover>.header-logo {
      &::before {
        background-color: @yellow-color;
        transform: scaleY(1);
      }
      &::after {
        background-color: @green-color;
        transform: scaleX(1);
      }
    }
  }

  .change-language{
    display: inline-block;
    float: right;
    line-height: 60px;
  }
  .h-autocomplete {
    display: inline-block;
    position: absolute;
    top: 16px;
    margin-left: 25px;
    .h-autocomplete-show {
      border: none;
      box-shadow: none;
      background: none;
      .h-autocomplete-input {
        background: none;
      }
    }
  }
  .header-nav-list {
    float: right;
    >a {
      // opacity: 0.7;
      display: inline-block;
      float: left;
      padding: 0 15px;
      margin-right: 10px;
      font-size: 15px;
      line-height: 60px;
      text-align: center;
      cursor: pointer;
      // color: inherit;
      &:hover {
        color: @primary-color;
      }
      &.router-link-active {
        opacity: 1;
        background-color: @primary-color;
        color: @white-color;
        border-radius: 0 0 @border-radius @border-radius;
      }
    }
  }
}

.comm-footer {
  // background-color: @white-color;
  color: @gray-color;
  text-align: center;
  padding: 0 0 5px 0px;
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
}

.page-body {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0px;
  top: 0px;
}

.com-frame {
  .left-frame {
    position: fixed;
    z-index: 2;
    overflow: auto;
    bottom: 0;
    top: 0;
    width: 280px;
    padding: 80px 0px 10px 0px;
    line-height: 2.5;
    >div>ul {
      >li.title {
        font-size: 18px;
        margin: 15px 0;
        padding-left: 30px;
        color: @primary-color;
      }
      >ul {
        padding-left: 25px;
        >.title {
          padding: 18px 0;
          color: @primary-color;
          padding-left: 10px;
        }
        >li{
          line-height: 1;
          a {
            font-size: 14px;
            padding: 12px 0;
            padding-left: 20px;
            border-left: 5px solid transparent;
            display: block;
          }
        }
      }
    }
    a {
      line-height: 1;
      padding: 2px 4px;
      color: #495060;
      &:hover{
        color: @primary-color;
      }
      &.router-link-active {
        opacity: 1;
        position: relative;
        &::before{
          content: '';
          position: absolute;
          height: 14px;
          left: -5px;
          border-left: 5px solid @primary-color;
          top: 12px;
        }
        color: @primary-color;
      }
    }
    .h-badge-count-dot {
      top: 6px;
    }
  }
  .right-frame {
    position: absolute;
    left: 310px;
    right: 0;
    bottom: 0;
    top: 0px;
    padding: 80px 300px 100px 100px;
    overflow: auto;
    z-index: 1;
  }
}
.page-home {
  .comm-header{
    background: none;
  }
  .page-body {
    /* bottom: 26px; */
    padding-bottom: 0;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    // background: #000;
    overflow: hidden;
    // animation: skygradient 180s ease infinite;
    .part{
      text-align: center;
      position: absolute;
      // width: 800px;
      // left: 50%;
      // margin-left: -400px;
      width: 100%;
      top: 50%;
      margin-top: -150px;
      h1 {
        font-weight: 200;
        font-size: 40px;
        color: @primary-color;
        margin: 1%;
      }
    }
    .github-icon{
      margin: 30px auto 0;
      width: 100px;
      height: 30px;
    }
  }
}
@keyframes skygradient {
  0% {
    background-position: 50% 0%;
  }
  50% {
    background-position: 50% 100%;
  }
  100% {
    background-position: 50% 0%;
  }
}

.doc {
  font-size: 14px;
  p {
    margin: 6px 0;
    word-break: break-word;
  }
  code {
    color: #e96900;
    background-color: #f9f9f9;
    margin: 0 4px;
    display: inline-block;
    padding: 1px 5px;
    border-radius: 3px;
    white-space: pre-wrap;
  }
  pre {
    code {
      color: inherit;
      background-color: transparent;
      font-size: 14px;
    }
  }
  blockquote {
    padding: 5px 5px 3px 10px;
    line-height: 1.5;
    font-weight: bold;
    border-left: 4px solid @primary-color;
    font-size: 14px;
    margin: 20px 0;
  }
  .table {
    border-spacing: 0;
    width: 100%;
    td,
    th {
      text-align: left;
      padding: 8px 8px;
      border-bottom: @border;
    }
    th {
      background-color: @gray3-color;
    }
  }

  ul.text-ul{
    list-style: circle;
    margin-left: 30px;
    padding: 5px;
    li{
      margin: 10px 0;
    }
  }
  a {
    font-weight: 600;
  }
  .tip, .component-name-tip{
    padding: 12px 24px 12px 20px;
    margin: 2em 0;
    border-left-width: 4px;
    border-left-style: solid;
    background-color: #f8f8f8;
    position: relative;
    border-bottom-right-radius: 2px;
    border-top-right-radius: 2px;
    border-left-color: #f66;
    &:before{
      content: "!";
      background-color: #f66;
      position: absolute;
      top: 14px;
      left: -12px;
      color: #fff;
      width: 20px;
      height: 20px;
      border-radius: 100%;
      text-align: center;
      line-height: 20px;
      font-weight: bold;
    }
  }
  .component-name-tip{
    border-left: none;
    border-radius: 5px;  
    padding: 8px 24px 8px 40px;
    margin: 1.5em 0;
    &:before{
      top: 8px;
      left: 11px;
    }
  }

  h2,h3 {
    .hash-link {
      color: @primary-color;
      display: none;
      margin-left: 5px;
      cursor: pointer;
    }
    &:hover .hash-link{
      display: inline;
    }
  }

}

.demo-box {
  border: 1px solid @gray2-color;
  border-radius: @border-radius * 2;
  margin-bottom: 20px;
  margin-top: 3px;
  position: relative;
  transition: all 0.2s ease-in-out;
  &:hover {
    box-shadow: 0 2px 7px rgba(0, 0, 0, 0.33);
    border-color: transparent;
    position: relative;
  }
  >.demo {
    padding: 15px 15px;
    position: relative;
    border-bottom: 2px dashed @border-color;
  }
  >.desc {
    border-bottom: @border;
    padding: 10px 15px;
  }
  >pre {
    transition: all 0.4s;
    padding: 18px 5px;
    margin: 0;
    overflow: hidden;
    max-height: 15px;
    &.expand {
      max-height: 10000px;
      overflow-x: auto;
      &:hover+.expand-button {
        opacity: 1;
      }
      margin-bottom: 35px;
    }
  }
  >.expand-button {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 36px;
    line-height: 36px;
    text-align: center;
    opacity: 0;
    transition: opacity 0.2s;
    &:hover {
      opacity: 1;
      background-color: rgba(0, 0, 0, 0.02);
    }
  }
}

.h-backtop-custom{
  .h-backtop-inner {
    background-color: @primary-color;
    border-radius: 2px;
    color: @white-color;
    padding: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .2);
    transition: all @transition-time ease-in-out;
    &:hover {
      background-color: lighten(@primary-color, 10%);
    }
  }
}

.code-box{
  padding: 10px;
  background: @gray4-color;
  overflow: auto;
}



@menu-prefix: ~"@{prefix}menu";
.@{menu-prefix}-custom {
  background: @white-color;
  .@{menu-prefix} {
    &-show {
      &:hover {
        color: @red-color;
      }
    }
    &-li {
      &-selected {
        color: @red-color;
      }
    }
  }
}

.h-tabs-custom {
  >div {
    display: block;
    padding: 12px 16px;
    line-height:1;
    font-size: 15px;
    .li-hover();
    &.h-tabs-selected{
      color: @white-color;
      background-color: @primary-color;
    }
  }
}


.readme {
  // font-size: 16px;
  h1, h2, h3 {
    margin: 40px 0 20px;
    font-weight: 600;
    color: #2c3e50;
    letter-spacing: 1px;
  }
  h1{
    font-size: 30px;
    margin: 10px 0px;
    border-bottom: 1px solid #eee;
  }
  h2 {
    font-size: 23px;
    margin: 50px 0px 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
  }
  h3 {
    font-size: 19px;
  }

  code.javascript.hljs[class*=lang] {
    margin: 5px 0;
    padding: 15px 20px;
    background: #f8f8f8;
    border-radius: 5px;
    display: block;
  }
  ul{
    list-style: inherit;
    padding-left: 20px;
  }

  table{
    border: 1px solid #EEE;
    border-collapse: collapse;
    border-spacing: 0;
    word-break: keep-all;
    th, td{
      padding: 5px 10px;
      border: 1px solid #EEE;
    }
    th {
      background: #EEE;
    }
    tr:nth-child(2n){
      background-color: #f8f8f8;
    }
  }
}



::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

::-webkit-scrollbar-thumb {
  background-color: rgba(113, 113, 113, 0.06);
  border-radius: 12px;
}

::-webkit-scrollbar-thumb:hover {
  background-color: @primary-color;
  border-radius: 12px;
}

@media (max-width: 1500px) {
  .com-frame .right-frame {
    padding-right: 200px;
    left: 220px;
  }
}

@media (max-width: 992px) {
  body{
    overflow: auto;
  }
  .com-frame {
    display: block;
    position: static;
    .left-frame {
      position: static;
      width: auto;
      padding-top: 30px;
      >div>ul {
        >ul {
          .clearfix();
          >li {
            &.title {
              float: none;
            }
            float: left;
            margin-right: 10px;
            a{
              padding-left: 0;
              &.router-link-active {
                &:before{
                  content: none;
                }
              }
            }
          }
        }
      }
    }

    .right-frame {
      padding-right: 30px;
      position: static;
      padding-left: 30px;
    }
    .right-frame-menu {
      display: none;
    }
  }
  .page-component {
    position: static;
  }
  .comm-header {
    position: static;
    height: auto;
    padding: 0 10px;
    .header-nav-list {
      .clearfix();
      float: none;
      >a {
        padding: 0 10px;
        &.router-link-active {
          border-radius: 4px;
        }
      }
    }
  }
  .page-home .comm-header{
    position: absolute;
  }
  .comm-footer {
    position: static;
  }
  .page-home .page-body .part{
    margin-top: -100px !important;
    h1 {
      font-size: 25px !important;
    }
  }
  .page-home {
    .page-body {
      top: 120px;
    }
    .comm-footer {
      position: absolute;
    }
  }
}
.weixin-modal.h-modal .h-notify-container {
  header{
    font-size: 18px;
    padding: 20px 34px 0;
  }
  .weixin-image {
    margin: 0 20px;
    img {
      width: 320px;
      height: 320px;
    }
  }
}
