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

  100% {
    transform: rotate(359deg);
  }
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(1turn);
  }
}

@keyframes pSpinMove{to{opacity:1}}
@keyframes pRotate{to{-webkit-transform:rotate(405deg);transform:rotate(405deg)}}


.is-spin {
  animation: spin 2s linear infinite;
}

.#{$ns}Spinner-overlay {
  position: absolute;
  z-index: 10;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--Spinner-overlay-bg);
  transition: ease-out opacity var(--animation-duration);

  opacity: 0;

  &.in {
    opacity: 1;
  }
}

.#{$ns}Spinner {
  transform: translateZ(0);
  display: inline-block;
  background-size: 100%;
  transition: ease-out all var(--animation-duration);

  &--icon {
    background: transparent;
    animation: spin 2s linear infinite;
    width: auto;
    height: auto;
  }
}

// 当启用 overlay 的时候，应该是居中模式。
.#{$ns}Spinner--overlay {
  position: absolute;
  z-index: 11;
  top: 50%;
  left: 50%;
  transform: translate3d(-50%, -50%, 0);
}

.p-spin {
	position: static;
	display: inline-block;
	box-sizing: border-box;
	margin: 0;
	padding: 0;
	color: #1890ff;
	font-size: 14px;
	line-height: 1.5;
	text-align: center;
	list-style: none;
	opacity: 1;
	transition: transform .3s cubic-bezier(.78,.14,.15,.86);
	font-feature-settings: 'tnum'
}

.p-spin-dot {
	position: relative;
	display: inline-block;
	font-size: 20px;
	width: 1em;
	height: 1em;
}

.p-spin-dot i {
	position: absolute;
	display: block;
	width: 9px;
	height: 9px;
	background-color: #1890ff;
	border-radius: 100%;
	transform: scale(.75);
	transform-origin: 50% 50%;
	opacity: .3;
	animation: pSpinMove 1s infinite linear alternate
}

.p-spin-dot i:nth-child(1) {
	top: 0;
	left: 0
}

.p-spin-dot i:nth-child(2) {
	top: 0;
	right: 0;
	animation-delay: .4s
}

.p-spin-dot i:nth-child(3) {
	right: 0;
	bottom: 0;
	animation-delay: .8s
}

.p-spin-dot i:nth-child(4) {
	bottom: 0;
	left: 0;
	animation-delay: 1.2s
}

.p-spin-dot-spin {
	transform: rotate(45deg);
	animation: pRotate 1.2s infinite linear
}


.#{$ns}Spinner--lg {
  .p-spin-dot {
    font-size: 32px;
    i{
      width: 14px;
      height: 14px;
    }
  }
}

.#{$ns}Spinner--sm {
  .p-spin-dot {
    font-size: 14px;
    i{
      width: 6px;
      height: 6px;
    }
  }
}