//common
@mixin placeholder($color: $input-placeholder-color) {
  // Firefox
  &::-moz-placeholder {
    color: $color;
    @include theme-color($__common-placeholder_font-color);
    opacity: 1; // Override Firefox's unusual default opacity; see https://github.com/twbs/bootstrap/pull/11526
  }
  // Safari and Chrome
  &::-webkit-input-placeholder {
    color: $color;
    @include theme-color($__common-placeholder_font-color);
  }
  // Internet Explorer 10+
  &:-ms-input-placeholder {
    color: $color;
    @include theme-color($__common-placeholder_font-color);
  }
}

// for select and input like component's arrow
@mixin inner-arrow() {
  position: absolute;
  top: 50%;
  right: 8px;
  line-height: 1;
  margin-top: -7px;
  font-size: $font-size-base;
  color: $arrow-color;
  @include theme-color($__common-inner-arrow_font-color);
  transition: all $transition-time $ease-in-out;
}

@mixin verify-tip-inner() {
  background-color: $error-color;
  @include theme-background-color($__common-tip-inner_background-color);
  border-radius: 4px;
  color: #fff;
  @include theme-color($__common-tip-inner_font-color);
  max-width: 200px;
  padding: 0 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
}

@mixin verify-tip-arrow() {
  border-color: transparent;
  border-style: solid;
  height: 0;
  position: absolute;
  width: 0;
}

@mixin verify-tip() {
  display: block;
  font-family: $font-family;
  font-size: $font-size-small;
  font-style: normal;
  font-weight: normal;
  letter-spacing: normal;
  opacity: 100;
  position: absolute;
  text-align: start;
  text-decoration: none;
  text-shadow: none;
  text-transform: none;
  white-space: nowrap;
  word-break: nowrap;
  word-spacing: normal;
  word-wrap: nowrap;
  line-height: $input-height-small;
  z-index: 9;

  &.verify-top {
    top: -31px;
  }

  > .verify-tip-arrow {
    @include verify-tip-arrow();
  }

  &.verify-top > .verify-tip-arrow {
    border-top-color: $error-color;
    @include theme-border-top-color($__common-top-tip-arrow_border-top-color);
    border-width: 5px 5px 0;
    left: 50%;
    margin-left: -5px;
    bottom: -5px;
  }

  &.verify-bottom {
    margin-top: 2px;
    padding: 5px 0;
  }

  > .verify-tip-inner {
    @include verify-tip-inner();
  }

  &.verify-bottom > .verify-tip-arrow {
    border-bottom-color: $error-color;
    @include theme-border-bottom-color($__common-bottom-tip-arrow_border-bottom-color);
    border-width: 0 5px 5px;
    left: 50%;
    margin-left: -5px;
    top: 0;
  }

  &.bottom > .verify-tip-inner {
    background-color: $error-color;
    @include theme-background-color($__common-bottom-tip-inner_background-color);
    border-radius: 4px;
    color: #fff;
    @include theme-color($__common-bottom-tip-inner_font-color);
    max-width: 200px;
    padding: 0 8px;
    text-align: center;
    margin-top: -1px;
  }
}

.verify-tip {
  @include verify-tip();
}

@mixin scrollbar {
  @include theme-scrollbar-face-color($__common-scrollbar-face-color);
  @include theme-scrollbar-track-color($__common-scrollbar-track-color);
  @include theme-scrollbar-shadow-color($__common-scrollbar-face-color);
  &::-webkit-scrollbar {
    @include theme-max-width($__common-scrollbar_width);
    @include theme-max-height($__common-scrollbar_height);
  }
  &::-webkit-scrollbar-track {
    @include theme-background-color($__common-scrollbar_background-color);
  }
  &::-webkit-scrollbar-thumb {
    @include theme-border-radius($__common-scrollbar-thumb_border-radius);
    @include theme-background-color($__common-scrollbar-thumb_background-color);
  }
  &::-webkit-scrollbar-thumb:hover{
    @include theme-background-color($__common-scrollbar-thumb_hover_background-color);
  }
  &::-webkit-scrollbar-corner, &::-webkit-scrollbar-resizer{
    @include theme-background-color($__common-scrollbar_background-color);
  }
}

@mixin handler-disabled() {
  opacity: $inputnumber-mixin-disabled-opacity;
  color: $inputnumber-mixin-disabled-color !important;
  cursor: $cursor-disabled;

  @include theme-font-color($__input-number_disabled_font-color, $--important);
}
