body {
  font-size: 14px;
  font-family: PingFangSC-Regular, Microsoft YaHei, Helvetica, Arial, sans-serif;
  line-height: 20px;
  color: $base;
  background-color: $background;
  overflow: auto;
}

.danger {
  color: $danger;
}

.success {
  color: $success;
}

.warning {
  color: $warning;
}

.primary {
  color: $primary;
}

.transition-none {
  -webkit-transition: none !important;
  transition: none !important;
  * {
    -webkit-transition: none !important;
    transition: none !important;
  }
}


/* 定义滚动条高宽及背景 高宽分别对应横竖滚动条的尺寸 */

*::-webkit-scrollbar {
  width: 5px;
  height: 5px;
  background-color: $background;
}


/* 定义滚动条轨道 内阴影+圆角 */

*::-webkit-scrollbar-track {
  border-radius: 5px;
  background-color: $white;
}


/* 定义滑块 内阴影+圆角 */

*::-webkit-scrollbar-thumb {
  border-radius: 5px;
  background-color: $shadow;
}

*[ui-view] {
  position: relative;
}

*[ma-ui-transition] {
  opacity: 0;
}

*.fade-in[ma-ui-transition] {
  opacity: 1;
  -webkit-animation: fadeIn 0.3s ease forwards;
  animation: fadeIn 0.3s ease forwards;
}

*.fade-in[ma-ui-transition="left"] {
  opacity: 1;
  -webkit-animation: fadeInLeftSmall 0.3s ease forwards;
  animation: fadeInLeftSmall 0.3s ease forwards;
}

*.fade-in[ma-ui-transition="right"] {
  opacity: 1;
  -webkit-animation: fadeInRightSmall 0.3s ease forwards;
  animation: fadeInRightSmall 0.3s ease forwards;
}

*.fade-in[ma-ui-transition="up"] {
  opacity: 1;
  -webkit-animation: fadeInUpSmall 0.3s ease forwards;
  animation: fadeInUpSmall 0.3s ease forwards;
}

*.fade-in[ma-ui-transition="down"] {
  opacity: 1;
  -webkit-animation: fadeInDownSmall 0.3s ease forwards;
  animation: fadeInDownSmall 0.3s ease forwards;
}

.clearfix:after {
  content: "\200B";
  display: block;
  height: 0;
  clear: both;
}

.clearfix {
  *zoom: 1;
}

.center {
  text-align: center;
}

.left {
  text-align: left;
}

.right {
  text-align: right;
}

.fl {
  float: left;
}

.fr {
  float: right;
}

.ellipsis {
  @include ellipsis();
}

a {
  color: $link;
  text-decoration: none;
}

*:before,
*:after,
* {
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
}

$paddings: (pb: bottom, pl: left, pt: top, pr: right);
$margins: (mb: bottom, ml: left, mt: top, mr: right);
@each $header,
$size in $paddings {
  .#{$header}-30 {
    padding-#{$size}: 30px;
  }
  .#{$header}-25 {
    padding-#{$size}: 25px;
  }
  .#{$header}-20 {
    padding-#{$size}: 20px;
  }
  .#{$header}-15 {
    padding-#{$size}: 15px;
  }
  .#{$header}-10 {
    padding-#{$size}: 10px;
  }
  .#{$header}-5 {
    padding-#{$size}: 5px;
  }
  .#{$header}-0 {
    padding-#{$size}: 0px;
  }
}

@each $header,
$size in $margins {
  .#{$header}-30 {
    margin-#{$size}: 30px;
  }
  .#{$header}-25 {
    margin-#{$size}: 25px;
  }
  .#{$header}-20 {
    margin-#{$size}: 20px;
  }
  .#{$header}-15 {
    margin-#{$size}: 15px;
  }
  .#{$header}-10 {
    margin-#{$size}: 10px;
  }
  .#{$header}-5 {
    margin-#{$size}: 5px;
  }
  .#{$header}-0 {
    margin-#{$size}: 0px;
  }
  .#{$header}--30 {
    margin-#{$size}: -30px;
  }
  .#{$header}--25 {
    margin-#{$size}: -25px;
  }
  .#{$header}--20 {
    margin-#{$size}: -20px;
  }
  .#{$header}--15 {
    margin-#{$size}: -15px;
  }
  .#{$header}--10 {
    margin-#{$size}: -10px;
  }
  .#{$header}--5 {
    margin-#{$size}: -5px;
  }
}

$colCount: 24;
@for $col from 1 through $colCount {
  .col-#{$col} {
    float: left;
    width: (100%/$colCount*$col);
    min-height: 1px;
  }
}

.container-fluid {
  padding-right: 20px;
  padding-left: 20px;
  margin-right: auto;
  margin-left: auto;
  float: none;
}

.controls {
  @include clearfix();
  .control-tip {
    color: $grey;
    padding-left: 10px;
    &.danger {
      color: $danger;
    }
    &.success {
      color: $success;
    }
    &.warning {
      color: $warning;
    }
  }
  div.control-tip {
    padding-left: 0;
    line-height: normal;
    padding-top: 10px;
  }
}

.form-horizontal {
  .control-group {
    margin-bottom: 20px;
  }
  .control-label {
    float: left;
    width: 160px;
    font-size: $font14;
    font-weight: normal;
    text-align: right;
    color: $base;
    line-height: 32px;
  }
  .controls {
    margin-left: 170px;
    position: relative;
    line-height: 32px;
  }
}

.form-horizontal {
  &.mini {
    .control-group {
      margin-bottom: 10px;
    }
    .control-label {
      width: 50px;
    }
    .controls {
      margin-left: 60px;
    }
    .form-error-text {
      display: none !important;
    }
  }
}

.form-vertical {
  .control-group {
    margin-bottom: 20px;
  }
}

.form-vertical {
  .control-label {
    margin-bottom: 5px;
    color: $base;
  }
}

.form-vertical {
  .controls {
    position: relative;
    line-height: 32px;
  }
}

.form-horizontal,
.form-vertical {
  padding: 10px 0px;
  @include clearfix();
  .control-group {
    @include clearfix();
  }
  .form-buttons {
    padding-top: 10px;
    text-align: center;
    letter-spacing: -0.31em;
    &.left {
      text-align: left;
      padding-left: 160px;
    }
    .ma-button {
      letter-spacing: normal;
      margin: 0px 10px;
    }
  }
  .controls .form-error-text {
    font-size: $font12;
    color: $danger;
    position: absolute;
    left: 0px;
    bottom: -17px;
    line-height: normal;
    font-weight: normal;
    z-index: 1;
    overflow: visible;
    white-space: nowrap;
  }
  .controls.controls-flex.content-three .ma-input-error .form-error-text,
  .controls.controls-flex.content-three .ma-input-error .form-error-text {
    display: none;
  }
}


/* 头部 */

body > .header {
  position: relative;
  z-index: 10;
  background-color: $headerColor;
  min-width: $minWidth;
  > .container-fluid {
    height: $headerHeight;
    .logo {
      display: table;
      color: $white;
      float: left;
      height: 100%;
      min-width: 200px;
      font-size: $font18;
      > div {
        vertical-align: middle;
        display: table-cell;
        > div {
          float: left;
          > div {
            font-size: $font14;
            padding-bottom: 3px;
            line-height: 18px;
          }
        }
      }
      .logo-icon {
        float: left;
        margin-right: 10px;
      }
    }
    .info {
      line-height: $headerHeight;
      float: right;
      font-size: $font16;
      color: $white;
      a {
        display: inline-block;
        color: #ffffff;
      }
      .nickname {
        @include ellipsis();
        display: inline-block;
        max-width: 100px;
        vertical-align: top;
      }
      .head {
        display: inline-block;
        vertical-align: middle;
        border-radius: 48px;
        overflow: hidden;
        width: 48px;
        height: 48px;
        margin-right: 20px;
        position: relative;
        top: -2px;
      }
      .head img {
        width: 100%;
        height: auto;
        vertical-align: top;
      }
    }
  }
}

body > .main {
  /* @include transition(margin 300ms ease);*/
  min-width: $minWidth;
  div.container {
    padding-top: 20px;
    padding-bottom: 20px;
    padding-left: 30px;
    padding-right: 30px;
    background-color: $white;
    -webkit-box-shadow: 0 0 4px 0 rgba($black, 0.1);
    box-shadow: 0 0 4px 0 rgba($black, 0.1);
    border-radius: 2px;
  }
}

.header-fixed {
  > .header {
    position: fixed;
    left: 0px;
    top: 0px;
    width: 100%;
  }
  .nav {
    .second-nav {

    }
  }
  > .main {
    margin-top: $headerHeight;
  }
}
