@charset "UTF-8";
@import "../../style/function";

// box 样式
$borderColor: #ddd;
$boxShadowColor: rgba(99, 99, 99, .2);
$iconSize: 24px;

.im-message {
  position: relative;
  font-size: $fontSize;
  color: $colorText;

  &-item {
    position: fixed;
    z-index: $zIndexOverlay;

    border: 1px solid $borderColor;
    padding: 8px 30px;
    box-shadow: 0 1px 3px $boxShadowColor;
    background: $colorBg;

    &-default {
      i {
        font-size: $iconSize;
        margin-right: 8px;
      }

      i,
      span {
        vertical-align: middle;
      }

      .im-icon {
        margin-right: 5px;
      }

      .i-info {
        color: $infoIcon;
      }

      .i-success {
        color: $succIcon;
      }

      .i-question {
        color: $questionIcon;
      }

      .i-alert {
        color: $alertIcon;
      }

      .icon-loading {
        display: inline-block;
        width: $iconSize;
        height: $iconSize;
        margin-right: 8px;
        vertical-align: bottom;
        background: url("../../style/image/loading.gif") no-repeat;
        background-size: cover;
      }
    }

    &-center {
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
    }

    &-top {
      left: 50%;
      top: $gap;
      transform: translateX(-50%);
    }

    &-left {
      left: $gap;
      top: 50%;
      transform: translateY(-50%);
    }

    &-right {
      right: $gap;
      top: 50%;
      transform: translateY(-50%);
    }

    &-bottom {
      bottom: $gap;
      left: 50%;
      transform: translateX(-50%);
    }

  }

  &-close {
    position: absolute;
    height: 14px;
    right: 10px;
    top: 50%;
    color: $color9;
    line-height: 14px;
    margin-top: -7px;
    cursor: pointer;

    .i-close {
      font-size: 14px;
    }

    &:hover {
      color: $color6;
    }
  }
}
