/* Toast 容器样式 */
.toast-container {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  pointer-events: none;
}

/* Toast 基础样式 */
.toast {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  margin-bottom: 10px;
  min-width: 300px;
  max-width: 400px;
  opacity: 0;
  transform: translateY(-20px);
  transition: all 0.3s ease-in-out;
  pointer-events: auto;
  border-left: 4px solid #007bff;
}

/* Toast 显示状态 */
.toast-show {
  opacity: 1;
  transform: translateY(0);
}

/* Toast 隐藏状态 */
.toast-hide {
  opacity: 0;
  transform: translateY(-20px);
}

/* Toast 内容区域 */
.toast-content {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  gap: 10px;
}

/* Toast 图标 */
.toast-icon {
  font-size: 18px;
  font-weight: bold;
  flex-shrink: 0;
}

/* Toast 消息文本 */
.toast-message {
  flex: 1;
  font-size: 14px;
  line-height: 1.4;
  color: #333;
}

/* Toast 关闭按钮 */
.toast-close {
  position: absolute;
  top: 8px;
  right: 8px;
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: #666;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background-color 0.2s;
}

.toast-close:hover {
  background-color: rgba(0, 0, 0, 0.1);
}

/* Toast 动作按钮区域 */
.toast-actions {
  padding: 0 16px 12px;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

/* Toast 动作按钮 */
.toast-action-btn {
  background: none;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 6px 12px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.toast-action-btn:hover {
  background-color: #f5f5f5;
}

/* 成功类型 Toast */
.toast-success {
  border-left-color: #28a745;
}

.toast-success .toast-icon {
  color: #28a745;
}

.toast-success .toast-action-btn {
  border-color: #28a745;
  color: #28a745;
}

.toast-success .toast-action-btn:hover {
  background-color: #28a745;
  color: white;
}

/* 错误类型 Toast */
.toast-error {
  border-left-color: #dc3545;
}

.toast-error .toast-icon {
  color: #dc3545;
}

.toast-error .toast-action-btn {
  border-color: #dc3545;
  color: #dc3545;
}

.toast-error .toast-action-btn:hover {
  background-color: #dc3545;
  color: white;
}

/* 警告类型 Toast */
.toast-warning {
  border-left-color: #ffc107;
}

.toast-warning .toast-icon {
  color: #ffc107;
}

.toast-warning .toast-action-btn {
  border-color: #ffc107;
  color: #856404;
}

.toast-warning .toast-action-btn:hover {
  background-color: #ffc107;
  color: #856404;
}

/* 信息类型 Toast */
.toast-info {
  border-left-color: #17a2b8;
}

.toast-info .toast-icon {
  color: #17a2b8;
}

.toast-info .toast-action-btn {
  border-color: #17a2b8;
  color: #17a2b8;
}

.toast-info .toast-action-btn:hover {
  background-color: #17a2b8;
  color: white;
}

/* 移动端适配 */
@media (max-width: 480px) {
  .toast-container {
    top: 10px;
    left: 10px;
    right: 10px;
    transform: none;
  }

  .toast {
    min-width: auto;
    max-width: none;
    width: 100%;
  }

  .toast-content {
    padding: 10px 12px;
  }

  .toast-message {
    font-size: 13px;
  }
}