/* mcres/static/css/components/toast.css
   全站统一的 Toast 通知组件。
   用法：Toast.show('消息', 'success' | 'error' | 'warning' | 'info') */

.toast-container {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  pointer-events: none;
  max-width: min(560px, 92vw);
}

.toast-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border-radius: 12px;
  background: rgba(28, 33, 40, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #e8ecf0;
  font-size: 14px;
  line-height: 1.5;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55);
  pointer-events: auto;
  max-width: 100%;
  word-break: break-word;
  opacity: 0;
  transform: translateY(-12px) scale(0.98);
  transition:
    opacity 0.25s ease,
    transform 0.25s ease;
}

.toast-item.toast-show {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.toast-item.toast-hide {
  opacity: 0;
  transform: translateY(-8px) scale(0.98);
}

.toast-item .toast-icon {
  font-size: 16px;
  flex-shrink: 0;
  line-height: 1;
  align-self: flex-start;
  margin-top: 2px;
}

.toast-item .toast-msg {
  flex: 1;
  min-width: 0;
  white-space: pre-line;
}

/* ===== 各类型配色 ===== */
.toast-item.toast-success {
  border-color: rgba(85, 216, 139, 0.35);
  background: rgba(20, 40, 30, 0.96);
}
.toast-item.toast-success .toast-icon {
  color: #55d88b;
}

.toast-item.toast-error {
  border-color: rgba(255, 107, 107, 0.35);
  background: rgba(42, 22, 22, 0.96);
}
.toast-item.toast-error .toast-icon {
  color: #ff6b6b;
}

.toast-item.toast-warning {
  border-color: rgba(245, 166, 35, 0.35);
  background: rgba(40, 32, 20, 0.96);
}
.toast-item.toast-warning .toast-icon {
  color: #f5a623;
}

.toast-item.toast-info {
  border-color: rgba(85, 153, 216, 0.35);
  background: rgba(20, 30, 42, 0.96);
}
.toast-item.toast-info .toast-icon {
  color: #55a9d8;
}

/* ===== 移动端 ===== */
@media (max-width: 600px) {
  .toast-container {
    top: 68px;
    left: 12px;
    right: 12px;
    transform: none;
    max-width: none;
  }
  .toast-item {
    padding: 10px 16px;
    font-size: 13.5px;
    width: 100%;
  }
}
