/**
 * 接口聚合站 — 统一 Toast 通知样式
 * Design: 极简白底，细边框，克制配色
 */

.toast-container {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 99999;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}

.toast-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 7px;
  font-size: 13px;
  line-height: 1.5;
  color: #2A3547;
  background: #fff;
  box-shadow: rgb(145 158 171 / 20%) 0px 0px 2px 0px, rgb(145 158 171 / 12%) 0px 12px 24px -4px;
  pointer-events: auto;
  animation: toastIn 0.2s ease;
  transition: opacity 0.2s ease;
  max-width: 420px;
  min-width: 160px;
  word-break: break-word;
  border: 1px solid #ebf1f6;
}

.toast-item.toast-out { opacity: 0; }

/* 类型：彩色只用在图标上 */
.toast-success .toast-icon { color: #13DEB9; }
.toast-error   .toast-icon { color: #FA896B; }
.toast-warning .toast-icon { color: #FFAE1F; }
.toast-info    .toast-icon { color: #5A6A85; }
.toast-loading .toast-icon { color: #2A3547; }

.toast-icon {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.toast-icon svg { width: 15px; height: 15px; }

.toast-loading .toast-icon svg { animation: toastSpin 0.8s linear infinite; }

.toast-close {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  margin-left: 6px;
  cursor: pointer;
  color: #7C8FAC;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.12s;
}

.toast-close:hover { color: #2A3547; }
.toast-close svg { width: 12px; height: 12px; }

@keyframes toastIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes toastSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
