//
// Avatar
// --------------------------------------------------
@import '../common/var.scss';      
$avatar-size:                     42px;  
$avatar-size-mini:                24px;  
$avatar-size-small:               32px;  
$avatar-size-large:               48px;  
$avatar-size-xl:                  54px;
$avatar-size-default:             50px;

// Base style
.ibps-avatar {
  display: inline-flex;
  // overflow: hidden;
  width: $avatar-size-default;
  height: $avatar-size-default;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  background-position: center;
  background-size: cover;
  color: $white;
  font-size: 14px;
  img {
    display: block;
    width: 100%;
    height: 100%;
    margin: 0;
  }
  .image{
    display: block;
    position: relative;
  }
  .van-icon,
  .ibps-icon {
    display: block;
    font-size: 24px;
  }
  .van-image__error{
    position: relative
  }
  .text{
    display: block;
    position: relative;
  }
  &--round {
    border-radius:  50%;
  }
  // &--circle{
  //    border-radius: 50%;
  // }

  &__image-badge{
    font-size: .7em;
    top:-.12em;
  }
  &__text-badge{
    font-size: 1.15em;
    top: -.95em;
  }
  
 // Avatar sizes

  &--mini {
    width: $avatar-size-mini;
    height: $avatar-size-mini;
    font-size: 10px;

    > .van-icon,
    > .ibps-icon{ 
      font-size: 14px;
    }
  }

  &--small {
    width: $avatar-size-small;
    height: $avatar-size-small;
    font-size: 12px;

    > .van-icon,
    > .ibps-icon{ 
      font-size: 18px;
    }
  }


  &--large {
    width: $avatar-size-large;
    height: $avatar-size-large;
    font-size: 16px;

    > .van-icon,
    > .ibps-icon{ 
      font-size: 28px;
    }
  }

  &--xl {
    width: $avatar-size-xl;
    height: $avatar-size-xl;
    font-size: 18px;

    > .van-icon,
    > .ibps-icon{ 
      font-size:30px;
    }
  }

  &--default {
    color: $button-default-color;
    background-color: $button-default-background-color;
    border: $button-border-width solid $button-default-border-color;
  }

  &--primary {
    color: $button-primary-color;
    background-color: $button-primary-background-color;
    border: $button-border-width solid $button-primary-border-color;
  }

  &--info {
    color: $button-info-color;
    background-color: $button-info-background-color;
    border: $button-border-width solid $button-info-border-color;
  }
  
  &--danger {
    color: $button-danger-color;
    background-color: $button-danger-background-color;
    border: $button-border-width solid $button-danger-border-color;
  }

  &--warning {
    color: $button-warning-color;
    background-color: $button-warning-background-color;
    border: $button-border-width solid $button-warning-border-color;
  }

  &--plain {
    background-color: $button-plain-background-color;

    &.van-button--primary {
      color: $button-primary-background-color;
    }

    &.van-button--info {
      color: $button-info-background-color;
    }

    &.van-button--danger {
      color: $button-danger-background-color;
    }

    &.van-button--warning {
      color: $button-warning-background-color;
    }
  }
}


