/* ┌────────────────────────────────────────────┐
 * │ 9.4  Toast 提示                             │
 * └────────────────────────────────────────────┘ */

/* ── Toast 基础样式（毛玻璃） ── */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(0);
  /* 毛玻璃 */
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 16px;
  /* 布局 */
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  /* 文字 */
  color: #1e293b;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  /* 阴影 & 层级 */
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
  z-index: 10000;
  pointer-events: auto;
  /* 入场动画 */
  animation: toast-in 0.4s cubic-bezier(0.34, 1.4, 0.64, 1) forwards;
}

/* ── Toast 退场状态 ── */
.toast.toast-out {
  animation: toast-out 0.3s cubic-bezier(0.4, 0, 1, 1) forwards;
  pointer-events: none;
}

/* ── Toast 显示状态 ── */
.toast.show {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* ── Toast 图标 ── */
.toast-icon {
  font-size: 18px;
  flex-shrink: 0;
  line-height: 1;
}

/* ── Toast 文字 ── */
.toast-msg {
  line-height: 1.4;
}

/* ── 暗色模式 Toast ── */
.dark .toast {
  background: rgba(30, 30, 40, 0.55);
  border-color: rgba(255, 255, 255, 0.15);
  color: #e2e8f0;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* ── Toast 入场：从下方弹入 ── */
@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(30px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
  }
}

/* ── Toast 退场：向下滑出 ── */
@keyframes toast-out {
  from {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateX(-50%) translateY(30px) scale(0.95);
  }
}
