@charset "UTF-8";
@import "./common/var.css";

@component-namespace el {

  @b message {
    box-shadow: var(--message-shadow);
    min-width: var(--message-min-width);
    padding: var(--message-padding);
    box-sizing: border-box;
    border-radius: var(--border-radius-small);
    position: fixed;
    left: 50%;
    top: 20px;
    transform: translateX(-50%);
    background-color: var(--color-white);
    transition: opacity 0.3s, transform .4s;
    overflow: hidden;

    @e group {
      margin-left: 38px;
      position: relative;
      height: 20px;
      line-height: 20px;
      display: flex;
      align-items: center;

      @when with-icon {
        margin-left: 0;
      }

      & p {
        font-size: var(--font-size-base);
        margin: 0 34px 0 0;
        white-space: nowrap;
        color: var(--message-content-color);
        text-align: justify;
      }
    }

    @e img {
      size: 40px;
      position: absolute;
      left: 0;
      top: 0;
    }

    @e icon {
      vertical-align: middle;
      margin-right: 8px;
    }

    @e closeBtn {
      position: absolute 3px 0 * *;
      cursor: pointer;
      color: var(--message-close-color);
      font-size: var(--font-size-base);

      &:hover {
        color: var(--message-close-hover-color);
      }
    }

    & .el-icon-circle-check {
      color: var(--message-success-color);
    }

    & .el-icon-circle-cross {
      color: var(--message-danger-color);
    }

    & .el-icon-information {
      color: var(--message-info-color);
    }

    & .el-icon-warning {
      color: var(--message-warning-color);
    }
  }

  .el-message-fade-enter,
  .el-message-fade-leave-active {
    opacity: 0;
    transform: translate(-50%, -100%);
  }
}
