@mainColor: #00BC9B;

@font-face {
  font-family: 'iconfont';  /* project id 359250 */
  src: url('//at.alicdn.com/t/font_359250_ag0szrwe259g4x6r.eot');
  src: url('//at.alicdn.com/t/font_359250_ag0szrwe259g4x6r.eot?#iefix') format('embedded-opentype'),
  url('//at.alicdn.com/t/font_359250_ag0szrwe259g4x6r.woff') format('woff'),
  url('//at.alicdn.com/t/font_359250_ag0szrwe259g4x6r.ttf') format('truetype'),
  url('//at.alicdn.com/t/font_359250_ag0szrwe259g4x6r.svg#iconfont') format('svg');
}

.iconfont {
  font-family: "iconfont" !important;
  font-style: normal;
  -webkit-font-smoothing: antialiased;
  -webkit-text-stroke-width: 0.2px;
  -moz-osx-font-smoothing: grayscale;
}

@import "../../../../../resources/assets/lib/css/pager";

// MUI改造部分
body {

  input,
  textarea,
  select {
    font-size: 14px;
  }
  select,
  textarea,
  input[type='text'],
  input[type='search'],
  input[type='password'],
  input[type='datetime'],
  input[type='datetime-local'],
  input[type='date'],
  input[type='month'],
  input[type='time'],
  input[type='week'],
  input[type='number'],
  input[type='email'],
  input[type='url'],
  input[type='tel'],
  input[type='color'] {
    font-size: 14px;
  }

  .mui-btn {
    font-size: 14px;
    padding: 10px 0;
  }

  .mui-btn-primary {
    background: @mainColor !important;
    border-color: @mainColor;
    &:link, &:focus, &:active, &:hover {
      color: #FFF;
      background: darken(@mainColor, 5%);
    }
  }

  .mui-title {
    color: @mainColor;
    img {
      height: 30px;
    }
  }

  .mui-input-group-title {
    padding: 0 17px 0 17px;
    background: none;
  }

  .mui-input-group {
    margin: 10px 0;
  }

  .mui-bar-tab {
    .mui-tab-item {
      text-decoration: none;
      &.mui-active {
        color: @mainColor;
      }
    }
  }

  .mui-bar-nav.mui-bar {
    a {
      color: @mainColor;
      font-size: 16px;
    }
    .mui-icon {
      color: @mainColor;
      text-decoration: none;
    }
  }

  .mui-content {
    > .mui-table-view {
      margin-top: 10px;
      &:first-child {
        margin-top: 10px;
      }
    }
    .mui-table-view {
      margin-top: 10px;
      &:first-child {
        margin-top: 10px;
      }
    }
  }

  .mui-radio input[type='radio']:checked:before, .mui-checkbox input[type='checkbox']:checked:before {
    color: @mainColor;
  }

  .mui-segmented-control {
    border: none;
    border-radius: 0px;
    background: #FFF;
    .mui-control-item {
      border: none;
      color: #999;
      &.mui-active {
        color: @mainColor;
        border-bottom: 2px solid @mainColor;
        background: #FFF;
      }
    }
  }

  .mui-table-view-cell {
    overflow: hidden;
    .name {
      float: left;
      color: #999;
    }
    .value {
      float: right;
    }
  }

  .mui-search.mui-active:before {
    top: 25px;
  }

  .mui-input-row {
    .mui-active {
      color: @mainColor !important;
    }
    .value {
      line-height: 1.1;
      padding: 11px 15px;
      color: #666;
    }
    &.image {
      height: auto;
      padding: 10px 0;
    }
    &.captcha {
      position: relative;
      input {
        width: 30%;
        margin-right: 35%;
      }
      .mui-icon {
        margin-right: 30%;
      }
      img {
        position: absolute;
        height: 30px;
        width: 100px;
        border: 1px solid #EEE;
        border-radius: 3px;
        right: 5px;
        top: 5px;
      }
      .btn {
        position: absolute;
        right: 5px;
        top: 5px;
        button {
          height: 30px;
          line-height: 30px;
          width: 100px;
          padding: 0;
          text-align: center;
        }
      }
    }
  }

}

// MUI改造部分

// 公共部分

html, body {
  background: #EEE;
  color: #333;
  font-size: 14px;
}

// 公共部分

.pb {
  background: #FFF;
  margin: 10px 0;
  & > .head {
    padding: 10px;
    color: #333;
    border-bottom: 1px solid #EEE;
    h2 {
      border-left: 3px solid @mainColor;
      padding: 0 0 0 6px;
      font-size: 14px;
      color: #333;
    }
  }
  & > .body {
    padding: 10px;
    color: #666;
  }
}

.pb-form {
  .submit {
    padding: 0 10px;
  }
}

.pb-center-link {
  text-align: center;
  padding: 20px 0;
}

.pb-oauth {
  text-align: center;
  padding: 20px 0;
  .title {
    color: #999;
  }
  .body {
    padding: 10px 0 0 0;
    a {
      display: inline-block;
      width: 50px;
      height: 50px;
      background: #999;
      color: #FFF;
      border-radius: 50%;
      text-align: center;
      margin: 0 10px;
      i {
        font-size: 36px;
        line-height: 50px;
      }
      &.wechat {
        background: #00bb29;
      }
      &.qq {
        background: #498ad5;
      }
      &.weibo {
        background: #e05244;
      }
    }
  }
}

.pb-member-home-head {
  padding: 0;
  margin: 0;
  .body {
    padding: 40px 0;
    background: linear-gradient(@mainColor, darken(@mainColor, 10%));
    position: relative;
    .logout {
      position: absolute;
      right: 10px;
      top: 10px;
      color: #FFF;
    }
    .avatar {
      text-align: center;
      display: block;
      img {
        background: #EEE;
        width: 60px;
        height: 60px;
        border-radius: 50%;
        border: 2px solid #FFF;
        border-color: rgba(255, 255, 255, 0.5);
      }
    }
    .name {
      text-align: center;
      color: #FFF;
      padding-top: 10px;
    }
    .assets {
      color: #FFF;
      font-size: 10px;
      line-height: 16px;
      padding-top: 15px;
      .credit {
        text-align: center;
      }
    }
  }
}

.pb-member-avatar {
  .preview {
    text-align: center;
    img {
      width: 50%;
      padding: 10px 0;
    }
  }
  .upload {
    button {
      position: relative;
      input {
        position: absolute;
        display: block;
        left: 0;
        right: 0;
        bottom: 0;
        top: 0;
        opacity: 0;
      }
    }
  }
  .editor {
    display: none;
    .view {
      border: 1px solid #EEE;
      background: #FFF;
      img {
        max-width: 100%;
        min-height: 300px;
      }
    }
    .tool {
      overflow: hidden;
      margin-top: 10px;
      button {
        display: block;
        width: 50%;
        float: left;
        color: #999;
        font-size: 20px;
        line-height: 40px;
        padding: 0;
      }
    }
  }
}

.pb-home-search {
  padding: 5px;
  .mui-placeholder {
    font-size: 14px;
  }
  input {
    margin-bottom: 0;
  }
}

.pb-home-banner {
  .swiper-slide {
    display: block;
    background-repeat: no-repeat;
    background-size: cover;
    background-color: #FFF;
    background-position: center;
    &:after {
      content: '';
      display: block;
      margin-top: 50%;
    }
  }
  .swiper-pagination {
    .swiper-pagination-bullet-active {
      background: rgba(255, 255, 255, 1);
    }
  }
}

.pb-home-tags {
  margin-top: 10px;
  background: #FFF;
  .head {
    color: @mainColor;
    padding: 10px;
    border-bottom: 1px solid #EEE;
    font-weight: bold;
  }
  .body {
    padding: 10px;
    .box {
      overflow: hidden;
      a {
        color: #333;
        display: inline-block;
        margin: 0 15px 15px 0;
      }
    }
  }
}

.pb-category {
  margin-top: 10px;
  background: #FFF;
  .title {
    color: @mainColor;
    padding: 10px;
    border-bottom: 1px solid #EEE;
    font-weight: bold;
    display: block;
  }
  .title-box {
    padding: 10px;
    a {
      color: #333;
      display: inline-block;
      margin: 0 15px 15px 0;
      &.active {
        color: @mainColor;
      }
    }
  }
}

.pb-question-tag {
  padding: 10px 10px 0 10px;
  background: #FFF;
  .body {
    span {
      display: inline-block;
      line-height: 20px;
      color: #111;
      border: 1px solid @mainColor;
      border-radius: 10px;
      padding: 0 10px;
      position: relative;
      margin: 0 10px 10px 0;
      a {
        display: block;
        position: absolute;
        right: -6px;
        top: -6px;
        width: 14px;
        height: 14px;
        line-height: 14px;
        text-align: center;
        font-size: 10px;
        color: #FFF;
        background: @mainColor;
        border-radius: 50%;
      }
    }
  }
}

.pb-question-list {
  .body {
    .empty {
      text-align: center;
      line-height: 200px;
      color: #999;
    }
    .item {
      border-bottom: 1px solid #EEE;
      padding: 10px;
      margin-top: 10px;
      background: #FFF;
      .title {
        a {
          color: @mainColor;
        }
      }
      .tags {
        padding: 20px 0 10px 0;
        a {
          display: inline-block;
          line-height: 18px;
          color: #999;
          border: 1px solid #EEE;
          border-radius: 9px;
          padding: 0 10px;
          margin: 0 5px 5px 0;
        }
        .right {
          float: right;
          color: #999;
        }
      }
    }
    a.more {
      text-align: center;
      color: #999;
      line-height: 50px;
      display: block;
    }
  }
}

.pb-question-comment {
  .item {
    border-bottom: 1px dashed #CCC;
    padding: 10px 0;
    .action {
      text-align: right;
      a {
        display: inline-block;
        margin-left: 10px;
      }
    }
    .content {
      line-height: 2em;
      color: #111;
    }
    .user {
      color: #999;
      line-height: 20px;
      a {
        color: #999;
      }
      .avatar {
        width: 20px;
        height: 20px;
        display: inline-block;
        img {
          width: 20px;
          height: 20px;
          box-sizing: border-box;
          border-radius: 50%;
          vertical-align: middle;
        }
      }
    }
  }
}

.pb-question-nav {
  position: fixed;
  bottom: 0px;
  left: 0px;
  right: 0px;
  background: @mainColor;
  .body {
    text-align: center;
    display: flex;
    a {
      color: #FFF;
      line-height: 50px;
      flex-grow: 1;
      text-align: center;
      &:first-child {
        border-right: 1px solid #FFF;
      }
      &:last-child {
        border-left: 1px solid #FFF;
      }
    }
  }
}

.pb-question-info {
  .tags {
    text-align: center;
    a {
      display: inline-block;
      line-height: 18px;
      color: #999;
      border: 1px solid #EEE;
      border-radius: 9px;
      padding: 0 10px;
    }
  }
  .attr {
    margin: 10px 0 0 0;
    padding: 10px 0 0 0;
    border-top: 1px dotted #EEE;
    text-align: center;
    a {
      color: #999;
    }
  }
}

.pb-question-view {
  .body {
    .empty {
      color: #999;
    }
    & > .question-items .pb-question-view {
      box-shadow: none;
      border: 1px dashed #CCC;
      border-radius: 5px;
      .head {
        border-bottom: none;
        h2 {
          color: @mainColor;
          border-left: none;
          padding: 0 0 0 0;
        }
      }
    }
    & > .question {
      p {
        line-height: 1.5em;
        padding: 0;
        margin: 0;
      }
      &.locked {
        & > .option > .item:hover:not(.selected) {
          border: 1px solid #EEE;
          background: #FFF;
          color: #333;
        }
      }
      & > .question {
        padding: 20px 0 20px 0;
        color: #333;
      }
      & > .option {
        padding: 10px 0 0 0;
        & > .item {
          padding: 5px 5px 5px 25px;
          border: 1px solid #EEE;
          margin: 0 0 10px 0;
          border-radius: 3px;
          cursor: pointer;
          &.selected, &:hover {
            border-color: @mainColor;
            background: #F8F8F8;
            color: @mainColor;
          }
          & > .choice {
            float: left;
            margin: 0 0 0 -20px;
          }
        }
        & > .item-confirm {
          a {
            display: inline-block;
            line-height: 30px;
            padding: 0 10px;
            background: @mainColor;
            color: #FFF;
            border-radius: 3px;
          }
        }
      }
      & > .action {
        padding: 20px 0 0 0;
        a {
          display: inline-block;
          line-height: 30px;
          padding: 0 10px;
          background: @mainColor;
          color: #FFF;
          border-radius: 3px;
        }
      }
      & > .answer {
        display: none;
        margin: 20px 0 0 0;
        padding: 20px 0 0 70px;
        overflow: hidden;
        border-top: 1px dashed #CCC;
        .answer-head {
          color: @mainColor;
          width: 60px;
          float: left;
          border-radius: 3px;
          margin: 0 0 0 -70px;
          line-height: 20px;
        }
        .answer-body {
          line-height: 20px;
        }
      }
      & > .analysis {
        display: none;
        margin: 20px 0 0 0;
        padding: 20px 0 0 70px;
        overflow: hidden;
        border-top: 1px dashed #CCC;
        .analysis-head {
          color: @mainColor;
          width: 60px;
          float: left;
          border-radius: 3px;
          margin: 0 0 0 -70px;
          line-height: 20px;
        }
        .analysis-body {
          line-height: 20px;
        }
      }
      & > .login {
        text-align: center;
        padding: 50px 0;
        color: red;
      }
      & > .answer-result-correct {
        display: none;
        padding: 20px 0;
        text-align: center;
        .result {
          color: @mainColor;
          font-size: 20px;
        }
      }
      & > .answer-result-incorrect {
        display: none;
        padding: 20px 0;
        text-align: center;
        .result {
          color: red;
          font-size: 20px;
        }
      }
    }
  }
}

.pb-search-tab {
  a {
    color: #666;
    font-size: 14px;
    display: inline-block;
    line-height: 30px;
    padding: 0 20px;
    border: 1px solid #EEE;
    border-radius: 3px;
    &:hover {
      color: @mainColor;
    }
    &.active {
      background: @mainColor;
      color: #FFF;
      border-color: @mainColor;
    }
  }
}

.pb-member-home-nav {
  .mui-table-view-cell {
    .iconfont {
      display: inline-block;
      width: 1.5em;
    }
  }
}

.pb-block-action {
  .action {
    display: block;
    text-align: center;
    color: #999;
    border-radius: 3px;
    &.active {
      color: @mainColor;
    }
    &:hover {
      background: #EEE;
    }
    span {
      line-height: 40px;
      font-size: 30px;
      display: block;
    }
    div {
      font-size: 12px;
      line-height: 20px;
    }
  }
}
