/**
 * Message Component Style for uxcore
 * @author eternaslky
 *
 * Copyright 2014-2015, Uxcore Team, Alinw.
 * All rights reserved.
 */

@__notificationPrefixCls: kuma-message;

.@{__notificationPrefixCls} {
  position: fixed;
  margin-bottom: -45px;
  bottom: 50%;
  z-index: 1070;
  max-width: 300px;
  &-content {
    margin-left: 30px;
    font-size: 14px;
    color: @normal-alpha-2;
    line-height: 24px;
  }

  &-notice {
    position: relative;
    margin: 10px 0;
    padding: 23px 38px;
    border-radius: @global-border-radius;
    box-shadow: @box-shadow-3;
    background: #fff;
    line-height: 1.5;

    &-closable {
      padding-right: 20px;
    }

    &-close {
      position: absolute;
      right: 5px;
      top: 3px;
      color: #000;
      cursor: pointer;
      outline: none;
      font-size: 16px;
      font-weight: 700;
      line-height: 1;
      text-shadow: 0 1px 0 #fff;
      filter: alpha(opacity=20);
      opacity: 0.2;
      text-decoration: none;

      &-x:after {
        content: "×";
      }

      &:hover {
        opacity: 1;
        filter: alpha(opacity=100);
        text-decoration: none;
      }
    }
  }

  .kuma-icon,
  .uxcore-icon {
    float: left;
    font-size: 24px;
    line-height: 1;

    &.kuma-icon-caution {
      color: @brand-warning;
    }
    &.kuma-icon-information,
    &.uxicon-tishi-full {
      color: @brand-info;
    }
    &.kuma-icon-success,
    &.uxicon-chenggong-full {
      color: @brand-success;
    }
    &.kuma-icon-error,
    &.uxicon-biaodanlei-tongyongqingchu {
      color: @brand-danger;
    }
    &.uxicon-loading-icon-round {
      color: @brand-primary;
      animation: msgIconRotate 1s infinite linear;
    }
  }
  .kuma-loading {
    width: 24px;
    height: 24px;
    float: left;
  }
  &-small {
    padding: 12px 24px;
    .@{__notificationPrefixCls}-content {
      font-size: 12px;
      line-height: 16px;
      margin-left: 24px;
    }
    .uxcore-icon {
      font-size: 16px;
    }
  }
}

@keyframes msgIconRotate {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes msgMoveUpIn {
  0% {
    transform-origin: 0 0;
    transform: translateY(100%);
    opacity: 0;
  }

  100% {
    transform-origin: 0 0;
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes msgMoveUpOut {
  0% {
    transform-origin: 0 0;
    transform: translateY(0);
    opacity: 1;
  }

  100% {
    transform-origin: 0 0;
    transform: translateY(100%);
    opacity: 0;
  }
}

.message-moveUp-enter,
.message-moveUp-appear {
  transform-origin: 0 0;
  transform: translateY(100%);
  opacity: 0;
  animation-timing-function: @transition-ease;
  animation-duration: 0.3s;
}
.message-moveUp-enter-active,
.message-moveUp-appear-active {
  animation-name: msgMoveUpIn;
}

.message-moveUp-leave {
  transform-origin: 0 0;
  transform: translateY(0);
  opacity: 1;
  animation-timing-function: @transition-ease;
  animation-duration: 0.3s;
}

.message-moveUp-leave-active {
  animation-name: msgMoveUpOut;
}
