/* ======================
 * Toast通知模块
 * ====================== */
.toast-container {
  position: fixed;
  bottom: 45px;
  left: 0;
  right: 0;
  z-index: 3200;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 0 20px;
  pointer-events: none;
}

.toast {
  padding: 12px 20px;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  background-color: #fff;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  transform: translateY(20px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  max-width: 100%;
  width: auto;
  min-width: 200px;
  pointer-events: auto;
  word-break: break-word;
  text-align: left;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

.toast-success .toast-icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z'/%3E%3C/svg%3E");
}

.toast-error .toast-icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z'/%3E%3C/svg%3E");
}

.toast-warning .toast-icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M12 5.99L19.53 19H4.47L12 5.99M12 2L1 21h22L12 2zm1 14h-2v2h2v-2zm0-6h-2v4h2v-4z'/%3E%3C/svg%3E");
}

.toast-info .toast-icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z'/%3E%3C/svg%3E");
}

.toast-success {
  background-color: rgba(76, 175, 80, 0.9);
  color: white;
}

.toast-error {
  background-color: rgba(244, 67, 54, 0.9);
  color: white;
}

.toast-warning {
  background-color: rgba(255, 165, 2, 0.9);
  color: white;
}

.toast-info {
  background-color: rgba(33, 150, 243, 0.9);
  color: white;
}

.toast-message {
  flex: 1;
  font-size: 0.9375rem;
  line-height: 1.4;
  min-width: 0;
}

.toast-close {
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  font-size: 1.2rem;
  padding: 0;
  margin-left: 8px;
  opacity: 0.7;
  flex-shrink: 0;
  line-height: 1;
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

.toast-close:hover {
  opacity: 1;
}

/* ======================
 * 确认对话框模块
 * ====================== */
.confirm-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3000;
}

.confirm-box {
  background: #fff;
  border-radius: 8px;
  padding: 20px;
  width: 80%;
  max-width: 420px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  animation: confirm-fadein 0.3s;
}

.confirm-box h3 {
  margin: 0 0 10px;
  color: #333;
  font-size: 18px;
}

.confirm-box p {
  margin: 0 0 20px;
  color: #666;
}

.confirm-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
}

.confirm-cancel,
.confirm-ok {
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
  min-width: 80px;
  text-align: center;
  border: 1px solid transparent;
}

.confirm-cancel {
  background: #f5f5f5;
  color: #595959;
  border-color: #d9d9d9;
}

.confirm-cancel:hover {
  background: #e8e8e8;
  border-color: #bfbfbf;
  color: #262626;
}

.confirm-cancel:active {
  background: #d9d9d9;
}

.confirm-ok {
  background: #1890ff;
  color: white;
  border-color: #1890ff;
}

.confirm-ok:hover {
  background: #40a9ff;
  border-color: #40a9ff;
}

.confirm-ok:active {
  background: #096dd9;
  border-color: #096dd9;
}

.confirm-ok.is-danger {
  background: #ff4d4f;
  border-color: #ff4d4f;
}

.confirm-ok.is-danger:hover {
  background: #ff7875;
  border-color: #ff7875;
}

.confirm-ok.is-danger:active {
  background: #d9363e;
  border-color: #d9363e;
}
