// 定义颜色变量
@success-color: #67c23a;
@warning-color: #e6a23c;
@error-color: #f56c6c;
@info-color: #909399;
@text-color: #fff;
@shadow-color: rgba(0, 0, 0, 0.1);

// 基础字体大小和间距
@font-size: 16px;
@padding: 10px 20px;

// 动画渐变定义
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

.alerts-container {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.alert {
  padding: @padding;
  color: @text-color;
  border-radius: 5px;
  box-shadow: 0 2px 8px @shadow-color;
  font-size: @font-size;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 250px;
  animation: fadeIn 0.5s ease-out;

  div:last-child {
    font-size: larger;
    cursor: pointer;
    user-select: none;
    line-height: 100%;
    vertical-align: middle;
    transform: translateX(5px);

    &:hover {
      color: #f4f4f4;
    }
  }
}

.alert-success {
  background-color: @success-color;
}

.alert-warning {
  background-color: @warning-color;
}

.alert-error {
  background-color: @error-color;
}

.alert-info {
  background-color: @info-color;
}
