/**
 * 全局请提示/轻提示弹框
 * 与 design-tokens 保持一致
 */

.toast-wrap {
  position: fixed;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  padding: var(--spacing-lg);
  box-sizing: border-box;
}

.toast-box {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-md);
  padding: var(--spacing-md) var(--spacing-lg);
  background: rgba(0, 0, 0, 0.65);
  color: var(--text-inverse);
  border-radius: var(--radius-lg);
  font-size: var(--font-size-base);
  line-height: var(--line-height-normal);
  box-shadow: var(--shadow-xl);
  opacity: 0;
  transform: scale(0.95);
  transition: opacity var(--transition-base) ease-out, transform var(--transition-base) ease-out;
}

.toast-box--in {
  opacity: 1;
  transform: scale(1);
}

.toast-wrap--out .toast-box {
  opacity: 0;
  transform: scale(0.95);
}

.toast-icon {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.toast-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: toast-spin 0.8s linear infinite;
}

@keyframes toast-spin {
  to {
    transform: rotate(360deg);
  }
}

.toast-icon-svg {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: var(--font-weight-bold);
}

.toast-icon--success {
  color: var(--color-success);
}

.toast-icon--error {
  color: var(--color-error);
}

.toast-icon--info {
  color: var(--color-info);
}

.toast-text {
  flex: 1;
  min-width: 0;
}
