@charset "utf-8";
@mixin border-width($width:1px,$pos:'',$normal:false){
  @if $pos!='' {
    border-#{$pos}-width:$width !important;
    @if $normal == false {
      @media screen and (-webkit-min-device-pixel-ratio: 2) {
        border-#{$pos}-width: $width/2 !important;
      }
      @media screen and (-webkit-min-device-pixel-ratio: 3) {
        border-#{$pos}-width: $width/2 !important;
      }
    }
  }@else{
    border-width:$width !important;
    @if $normal == false{
      @media screen and (-webkit-min-device-pixel-ratio: 2) {
        border-width:$width/2 !important;
      }
      @media screen and (-webkit-min-device-pixel-ratio: 3) {
        border-width:$width/2 !important;
      }
    }

  }
}

@mixin border($width,$style,$color,$pos:'',$normal:false){
  @if $pos!=''{
    @include border-width($width,$pos,$normal);
    border-#{$pos}-style:$style !important;
    border-#{$pos}-color: $color !important;
  }@else{
    @include border-width($width,$pos,$normal);
    border-style:$style !important;
    border-color: $color !important;
  }
}

// 创建边框线，包括颜色、宽度、类型
@mixin border-style($colorName:'',$color:$border-color){
  @if $colorName == ''{  //默认为浅色#e6e6e6
    @for $i from 1 through 2 {
      @each $posName, $posValue in $pos {
        @each $typeName, $typeValue in $border-styles {
          @if $i == 1 {
            .bd {
              @include border(1px,solid,$color);
              .platform-android4 &,.platform-android5 &,.platform-android6 &{
                @include border(1px,solid,$color,'',true);
              }
            }
            .bd-#{$typeName} {
              @include border(1px,$typeValue,$color);
              .platform-android4 &,.platform-android5 &,.platform-android6 &{
                @include border(1px,$typeValue,$color,'',true);
              }
            }
            .bd#{$posName} {
              @include border(1px,solid,$color,$posValue);
              .platform-android4 &,.platform-android5 &,.platform-android6 &{
                @include border(1px,solid,$color,$posValue,true);
              }
            }
            .bd#{$posName}-#{$typeName} {
              @include border(1px,$typeValue,$color,$posValue);
              .platform-android4 &,.platform-android5 &,.platform-android6 &{
                @include border(1px,$typeValue,$color,$posValue,true);
              }
            }
          }@else{
            .bd-#{$i} {
              @include border($i * 1px,solid,$color);
              .platform-android4 &,.platform-android5 &,.platform-android6 &{
                @include border($i * 1px,solid,$color,'',true);
              }
            }
            .bd-#{$typeName}-#{$i} {
              @include border($i * 1px,$typeValue,$color);
              .platform-android4 &,.platform-android5 &,.platform-android6 &{
                @include border($i * 1px,$typeValue,$color,'',true);
              }
            }
            .bd#{$posName}-#{$i} {
              @include border($i * 1px,solid,$color,$posValue);
              .platform-android4 &,.platform-android5 &,.platform-android6 &{
                @include border($i * 1px,solid,$color,$posValue,true);
              }
            }
            .bd#{$posName}-#{$typeName}-#{$i} {
              @include border($i * 1px,$typeValue,$color,$posValue);
              .platform-android4 &,.platform-android5 &,.platform-android6 &{
                @include border($i * 1px,$typeValue,$color,$posValue,true);
              }
            }
          }
        }
      }
    }
  } @else {
    @for $i from 1 through 2 {
      @each $posName, $posValue in $pos {
        @each $typeName, $typeValue in $border-styles {
          @if $i == 1 {
            .bd-#{$colorName}{
              @include border(1px,solid,$color);
              .platform-android4 &,.platform-android5 &,.platform-android6 &{
                @include border(1px,solid,$color,'',true);
              }
            }
            .bd-#{$colorName}-#{$typeName} {
              @include border(1px,$typeValue,$color);
              .platform-android4 &,.platform-android5 &,.platform-android6 &{
                @include border(1px,$typeValue,$color,'',true);
              }
            }
            .bd#{$posName}-#{$colorName} {
              @include border(1px,solid,$color,$posValue);
              .platform-android4 &,.platform-android5 &,.platform-android6 &{
                @include border(1px,solid,$color,$posValue,true);
              }
            }
            .bd#{$posName}-#{$colorName}-#{$typeName} {
              @include border(1px,$typeValue,$color,$posValue);
              .platform-android4 &,.platform-android5 &,.platform-android6 &{
                @include border(1px,$typeValue,$color,$posValue,true);
              }
            }
          }@else {
            .bd-#{$colorName}-#{$i}{
              @include border($i * 1px,solid,$color);
              .platform-android4 &,.platform-android5 &,.platform-android6 &{
                @include border($i * 1px,solid,$color,'',true);
              }
            }
            .bd-#{$colorName}-#{$typeName}-#{$i} {
              @include border($i * 1px,$typeValue,$color);
              .platform-android4 &,.platform-android5 &,.platform-android6 &{
                @include border($i * 1px,$typeValue,$color,'',true);
              }
            }
            .bd#{$posName}-#{$colorName}-#{$i} {
              @include border($i * 1px,solid,$color,$posValue);
              .platform-android4 &,.platform-android5 &,.platform-android6 &{
                @include border($i * 1px,solid,$color,$posValue,true);
              }
            }
            .bd#{$posName}-#{$colorName}-#{$typeName}-#{$i} {
              @include border($i * 1px,$typeValue,$color,$posValue);
              .platform-android4 &,.platform-android5 &,.platform-android6 &{
                @include border($i * 1px,$typeValue,$color,$posValue,true);
              }
            }
          }
        }
      }
    }
  }
}

@mixin box-shadow($shadow...) {
  -webkit-box-shadow: $shadow; // iOS <4.3 & Android <4.1
  box-shadow: $shadow;
}

// Clearfix
// --------------------------------------------------

@mixin clearfix {
  &:before,
  &:after {
    display: table;
    content: "";
    line-height: 0;
  }
  &:after {
    clear: both;
  }
}


// Placeholder text
// --------------------------------------------------

@mixin placeholder($color: $input-color-placeholder, $text-indent: 0) {
  &::-moz-placeholder { // Firefox 19+
    color: $color;
    line-height:normal;
  }
  &:-ms-input-placeholder {
    color: $color;
    line-height:normal;
  }
  &::-webkit-input-placeholder {
    color: $color;
    line-height:normal;
    // Safari placeholder margin issue
    text-indent: $text-indent;
  }
}


// Text Mixins
// --------------------------------------------------

@mixin text-size-adjust($value: none) {
  -webkit-text-size-adjust: $value;
     -moz-text-size-adjust: $value;
          text-size-adjust: $value;
}
@mixin tap-highlight-transparent() {
  -webkit-tap-highlight-color: rgba(0,0,0,0);
  -webkit-tap-highlight-color: transparent; // For some Androids
}
@mixin touch-callout($value: none) {
  -webkit-touch-callout: $value;
}


// Font Mixins
// --------------------------------------------------

@mixin font-family-serif() {
  font-family: $serif-font-family;
}
@mixin font-family-sans-serif() {
  font-family: $sans-font-family;
}
@mixin font-family-monospace() {
  font-family: $mono-font-family;
}
@mixin font-shorthand($size: $base-font-size, $weight: normal, $line-height: $base-line-height) {
  font-weight: $weight;
  font-size: $size;
  line-height: $line-height;
}
@mixin font-serif($size: $base-font-size, $weight: normal, $line-height: $base-line-height) {
  @include font-family-serif();
  @include font-shorthand($size, $weight, $line-height);
}
@mixin font-sans-serif($size: $base-font-size, $weight: normal, $line-height: $base-line-height) {
  @include font-family-sans-serif();
  @include font-shorthand($size, $weight, $line-height);
}
@mixin font-monospace($size: $base-font-size, $weight: normal, $line-height: $base-line-height) {
  @include font-family-monospace();
  @include font-shorthand($size, $weight, $line-height);
}
@mixin font-smoothing($font-smoothing) {
  -webkit-font-smoothing: $font-smoothing;
          font-smoothing: $font-smoothing;
}


// Appearance
// --------------------------------------------------

@mixin appearance($val) {
  -webkit-appearance: $val;
     -moz-appearance: $val;
          appearance: $val;
}

// Border Radius Mixins
// --------------------------------------------------

@mixin border-radius($radius) {
  -webkit-border-radius: $radius !important;
          border-radius: $radius !important;
}

// Single Corner Border Radius
@mixin border-top-left-radius($radius) {
  -webkit-border-top-left-radius: $radius !important;
          border-top-left-radius: $radius !important;
}
@mixin border-top-right-radius($radius) {
  -webkit-border-top-right-radius: $radius !important;
          border-top-right-radius: $radius !important;
}
@mixin border-bottom-right-radius($radius) {
  -webkit-border-bottom-right-radius: $radius !important;
          border-bottom-right-radius: $radius !important;
}
@mixin border-bottom-left-radius($radius) {
  -webkit-border-bottom-left-radius: $radius !important;
          border-bottom-left-radius: $radius !important;
}

// Single Side Border Radius
@mixin border-top-radius($radius) {
  @include border-top-right-radius($radius);
  @include border-top-left-radius($radius);
}
@mixin border-right-radius($radius) {
  @include border-top-right-radius($radius);
  @include border-bottom-right-radius($radius);
}
@mixin border-bottom-radius($radius) {
  @include border-bottom-right-radius($radius);
  @include border-bottom-left-radius($radius);
}
@mixin border-left-radius($radius) {
  @include border-top-left-radius($radius);
  @include border-bottom-left-radius($radius);
}


// Transition Mixins
// --------------------------------------------------

@mixin transition($transition...) {
  -webkit-transition: $transition;
          transition: $transition;
}
@mixin transition-delay($transition-delay) {
  -webkit-transition-delay: $transition-delay;
          transition-delay: $transition-delay;
}
@mixin transition-duration($transition-duration) {
  -webkit-transition-duration: $transition-duration;
          transition-duration: $transition-duration;
}
@mixin transition-timing-function($transition-timing) {
   -webkit-transition-timing-function: $transition-timing;
           transition-timing-function: $transition-timing;
 }
 @mixin transition-property($property) {
  -webkit-transition-property: $property;
          transition-property: $property;
}
@mixin transition-transform($properties...) {
  // special case cuz of transform vendor prefixes
  -webkit-transition: -webkit-transform $properties;
          transition: transform $properties;
}


// Animation Mixins
// --------------------------------------------------

@mixin animation($animation) {
 -webkit-animation: $animation;
         animation: $animation;
}
@mixin animation-duration($duration) {
 -webkit-animation-duration: $duration;
         animation-duration: $duration;
}
@mixin animation-direction($direction) {
 -webkit-animation-direction: $direction;
         animation-direction: $direction;
}
@mixin animation-timing-function($animation-timing) {
 -webkit-animation-timing-function: $animation-timing;
         animation-timing-function: $animation-timing;
}
@mixin animation-fill-mode($fill-mode) {
 -webkit-animation-fill-mode: $fill-mode;
         animation-fill-mode: $fill-mode;
}
@mixin animation-name($name...) {
 -webkit-animation-name: $name;
         animation-name: $name;
}
@mixin animation-iteration-count($count) {
 -webkit-animation-iteration-count: $count;
         animation-iteration-count: $count;
}


// Transformation Mixins
// --------------------------------------------------

@mixin rotate($degrees) {
  @include transform( rotate($degrees) );
}
@mixin scale($ratio) {
  @include transform( scale($ratio) );
}
@mixin translate($x, $y) {
  @include transform( translate($x, $y) );
}
@mixin skew($x, $y) {
  @include transform( skew($x, $y) );
  -webkit-backface-visibility: hidden;
}
@mixin translate3d($x, $y, $z) {
  @include transform( translate3d($x, $y, $z) );
}
@mixin translateZ($z) {
  @include transform( translateZ($z) );
}
@mixin transform($val) {
  -webkit-transform: $val;
          transform: $val;
}

@mixin transform-origin($left, $top) {
  -webkit-transform-origin: $left $top;
          transform-origin: $left $top;
}


// Backface visibility
// --------------------------------------------------
// Prevent browsers from flickering when using CSS 3D transforms.
// Default value is `visible`, but can be changed to `hidden

@mixin backface-visibility($visibility){
  -webkit-backface-visibility: $visibility;
          backface-visibility: $visibility;
}


// Background clipping
// --------------------------------------------------

@mixin background-clip($clip) {
  -webkit-background-clip: $clip;
          background-clip: $clip;
}


// Background sizing
// --------------------------------------------------

@mixin background-size($size) {
  -webkit-background-size: $size;
          background-size: $size;
}


// Box sizing
// --------------------------------------------------

@mixin box-sizing($boxmodel) {
  -webkit-box-sizing: $boxmodel;
     -moz-box-sizing: $boxmodel;
          box-sizing: $boxmodel;
}


// User select
// --------------------------------------------------

@mixin user-select($select) {
  -webkit-user-select: $select;
     -moz-user-select: $select;
      -ms-user-select: $select;
          user-select: $select;
}


// Content Columns
// --------------------------------------------------

@mixin content-columns($columnCount, $columnGap: $grid-gutter-width) {
  -webkit-column-count: $columnCount;
     -moz-column-count: $columnCount;
          column-count: $columnCount;
  -webkit-column-gap: $columnGap;
     -moz-column-gap: $columnGap;
          column-gap: $columnGap;
}


// Flexbox Mixins
// --------------------------------------------------
// http://philipwalton.github.io/solved-by-flexbox/
// https://github.com/philipwalton/solved-by-flexbox

@mixin display-flex {
  display: -webkit-box;
  display: -webkit-flex;
  display: -moz-box;
  display: -moz-flex;
  display: -ms-flexbox;
  display: flex;
}

@mixin display-inline-flex {
  display: -webkit-inline-box;
  display: -webkit-inline-flex;
  display: -moz-inline-flex;
  display: -ms-inline-flexbox;
  display: inline-flex;
}

@mixin flex-direction($value: row,$important:null) {
  @if $important == important {
    @if $value == row-reverse {
      -webkit-box-direction: reverse !important;
      -webkit-box-orient: horizontal !important;
    } @else if $value == column {
      -webkit-box-direction: normal !important;
      -webkit-box-orient: vertical !important;
    } @else if $value == column-reverse {
      -webkit-box-direction: reverse !important;
      -webkit-box-orient: vertical !important;
    } @else {
      -webkit-box-direction: normal !important;
      -webkit-box-orient: horizontal !important;
    }
    -webkit-flex-direction: $value !important;
    -moz-flex-direction: $value !important;
    -ms-flex-direction: $value !important;
    flex-direction: $value !important;
  } @else {
    @if $value == row-reverse {
      -webkit-box-direction: reverse;
      -webkit-box-orient: horizontal;
    } @else if $value == column {
      -webkit-box-direction: normal;
      -webkit-box-orient: vertical;
    } @else if $value == column-reverse {
      -webkit-box-direction: reverse;
      -webkit-box-orient: vertical;
    } @else {
      -webkit-box-direction: normal;
      -webkit-box-orient: horizontal;
    }
    -webkit-flex-direction: $value;
    -moz-flex-direction: $value;
    -ms-flex-direction: $value;
    flex-direction: $value;
  }

}

@mixin flex-wrap($value: nowrap,$important:null) {
  @if $important == important {
    -webkit-flex-wrap: $value !important;
    -moz-flex-wrap: $value !important;
    @if $value == nowrap {
      -ms-flex-wrap: none !important;
    } @else {
      -ms-flex-wrap: $value !important;
    }
    flex-wrap: $value !important;
  } @else {
    -webkit-flex-wrap: $value;
    -moz-flex-wrap: $value;
    @if $value == nowrap {
      -ms-flex-wrap: none;
    } @else {
      -ms-flex-wrap: $value;
    }
    flex-wrap: $value;
  }

}

@mixin flex($fg: 1, $fs: null, $fb: null,$important:null) {
  @if $important == important {
    -webkit-box-flex: $fg !important;
    -webkit-flex: $fg $fs $fb !important;
    -moz-box-flex: $fg !important;
    -moz-flex: $fg $fs $fb !important;
    -ms-flex: $fg $fs $fb !important;
    flex: $fg $fs $fb !important;
  } @else {
    -webkit-box-flex: $fg;
    -webkit-flex: $fg $fs $fb;
    -moz-box-flex: $fg;
    -moz-flex: $fg $fs $fb;
    -ms-flex: $fg $fs $fb;
    flex: $fg $fs $fb;
  }
}

@mixin flex-default($fg: 1, $fs: 1,$important:null) {
  @if $important == important {
    -webkit-box-flex: $fg !important;
    -webkit-flex: $fg $fs !important;
    -moz-box-flex: $fg !important;
    -moz-flex: $fg $fs !important;
    -ms-flex: $fg $fs !important;
    flex: $fg $fs !important;
  } @else {
    -webkit-box-flex: $fg;
    -webkit-flex: $fg $fs;
    -moz-box-flex: $fg;
    -moz-flex: $fg $fs;
    -ms-flex: $fg $fs;
    flex: $fg $fs;
  }
}


@mixin flex-flow($values: (row nowrap),$important:null) {
  // No Webkit Box fallback.
  @if $important == important {
    -webkit-flex-flow: $values !important;
    -moz-flex-flow: $values !important;
    -ms-flex-flow: $values !important;
    flex-flow: $values !important;
  } @else {
    -webkit-flex-flow: $values;
    -moz-flex-flow: $values;
    -ms-flex-flow: $values;
    flex-flow: $values;
  }


}

@mixin align-items($value: stretch,$important:null) {
  @if $important == important {
    @if $value == flex-start {
      -webkit-box-align: start !important;
      -ms-flex-align: start !important;
    } @else if $value == flex-end {
      -webkit-box-align: end !important;
      -ms-flex-align: end !important;
    } @else {
      -webkit-box-align: $value !important;
      -ms-flex-align: $value !important;
    }
    -webkit-align-items: $value !important;
    -moz-align-items: $value !important;
    align-items: $value !important;
  } @else {
    @if $value == flex-start {
      -webkit-box-align: start;
      -ms-flex-align: start;
    } @else if $value == flex-end {
      -webkit-box-align: end;
      -ms-flex-align: end;
    } @else {
      -webkit-box-align: $value;
      -ms-flex-align: $value;
    }
    -webkit-align-items: $value;
    -moz-align-items: $value;
    align-items: $value;
  }
}

@mixin align-self($value: auto,$important:null) {
  @if $important == important {
    -webkit-align-self: $value !important;
    -moz-align-self: $value !important;
    @if $value == flex-start {
      -ms-flex-item-align: start !important;
    } @else if $value == flex-end {
      -ms-flex-item-align: end !important;
    } @else {
      -ms-flex-item-align: $value !important;
    }
    align-self: $value !important;
  } @else {
    -webkit-align-self: $value;
    -moz-align-self: $value;
    @if $value == flex-start {
      -ms-flex-item-align: start;
    } @else if $value == flex-end {
      -ms-flex-item-align: end;
    } @else {
      -ms-flex-item-align: $value;
    }
    align-self: $value;
  }
}

@mixin align-content($value: stretch,$important:null) {
  @if $important == important {
    -webkit-align-content: $value !important;
    -moz-align-content: $value !important;
    @if $value == flex-start {
      -ms-flex-line-pack: start !important;
    } @else if $value == flex-end {
      -ms-flex-line-pack: end !important;
    } @else {
      -ms-flex-line-pack: $value !important;
    }
    align-content: $value !important;
  } @else {
    -webkit-align-content: $value !important;
    -moz-align-content: $value !important;
    @if $value == flex-start {
      -ms-flex-line-pack: start !important;
    } @else if $value == flex-end {
      -ms-flex-line-pack: end !important;
    } @else {
      -ms-flex-line-pack: $value !important;
    }
    align-content: $value !important;
  }
}

@mixin justify-content($value: stretch,$important:null) {
  @if $important == important {
    @if $value == flex-start {
      -webkit-box-pack: start !important;
      -ms-flex-pack: start !important;
    } @else if $value == flex-end {
      -webkit-box-pack: end !important;
      -ms-flex-pack: end !important;
    } @else if $value == space-between {
      -webkit-box-pack: justify !important;
      -ms-flex-pack: justify !important;
    } @else {
      -webkit-box-pack: $value !important;
      -ms-flex-pack: $value !important;
    }
    -webkit-justify-content: $value !important;
    -moz-justify-content: $value !important;
    justify-content: $value !important;
  } @else {
    @if $value == flex-start {
      -webkit-box-pack: start;
      -ms-flex-pack: start;
    } @else if $value == flex-end {
      -webkit-box-pack: end;
      -ms-flex-pack: end;
    } @else if $value == space-between {
      -webkit-box-pack: justify;
      -ms-flex-pack: justify;
    } @else {
      -webkit-box-pack: $value;
      -ms-flex-pack: $value;
    }
    -webkit-justify-content: $value;
    -moz-justify-content: $value;
    justify-content: $value;
  }

}

@mixin flex-order($n,$important:null) {
  @if $important == important {
    -webkit-order: $n !important;
    -ms-flex-order: $n !important;
    order: $n !important;
    -webkit-box-ordinal-group: $n !important;
  } @else {
    -webkit-order: $n;
    -ms-flex-order: $n;
    order: $n;
    -webkit-box-ordinal-group: $n;
  }

}

// 创建同一种颜色的字体、锚链接、背景和边框色
@mixin color-style($name,$color){
  .#{$name},.text-#{$name}, a.#{$name}, a.text-#{$name} {color: $color !important;}
  .#{$name}-bg,.bg-#{$name} {background-color: $color !important;}
  .#{$name}-border,.bd-#{$name} {border-color: $color !important;}
}




// button

@mixin button-style($bg-color, $border-color, $active-bg-color, $active-border-color, $color) {
  border-color: $border-color;
  background-color: $bg-color;
  color: $color;

  // Give desktop users something to play with
  &:hover {
    color: $color;
    text-decoration: none;
  }
  &.active,
  &.activated {
    //border-color: $active-border-color;
    //background-color: $active-bg-color;
    //box-shadow: inset 0 1px 4px rgba(0,0,0,0.1);
  }
}

@mixin button-clear($color, $font-size:"") {
  &.button-clear {
    border-color: transparent;
    background: none;
    box-shadow: none;
    color: $color;

    @if $font-size != "" {
      font-size: $font-size;
    }
  }
  &.button-icon {
    border-color: transparent;
    background: none;
  }
}

@mixin button-outline($color, $text-color:"") {
  &.button-outline {
    border-color: $color;
    background: transparent;
    @if $text-color == "" {
      $text-color: $color;
    }
    color: $text-color;
    &.active,
    &.activated {
      //background-color: $color;
      box-shadow: none;
      //color: #fff !important;
    }
  }
}


@mixin safe-area($name,$px) {
  #{$name}:$px !important;
  #{$name}:calc(#{$px} + constant(safe-area-inset-top)) !important;
  #{$name}:calc(#{$px} + env(safe-area-inset-top)) !important;
}