/* Element UI 风格消息提示框样式 */
.message-toast-container {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  pointer-events: none;
}

.message-toast {
  position: absolute;
  left: 50%;
  transform: translateX(-50%) translateY(-100%);
  min-width: 380px;
  max-width: 500px;
  padding: 15px 19px 15px 15px;
  margin-bottom: 0;
  background: #ffffff;
  border-radius: 4px;
  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
  border: none;
  pointer-events: auto;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.55, 0, 0.1, 1);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  display: flex;
  align-items: center;
}

/* Element UI 风格 - 不同类型的背景色和文字颜色 */
.message-toast.success {
  background-color: rgb(240, 249, 235);
  border: 1px solid rgb(225, 243, 216);
}

.message-toast.warning {
  background-color: rgb(253, 246, 236);
  border: 1px solid rgb(250, 236, 216);
}

.message-toast.info {
  background-color: rgb(244, 244, 245);
  border: 1px solid rgb(233, 233, 235);
}

.message-toast.error {
  background-color: rgb(254, 240, 240);
  border: 1px solid rgb(253, 226, 226);
}

.message-toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.message-toast.hide {
  transform: translateX(-50%) translateY(-20px);
  opacity: 0;
}

/* Element UI 风格 - 不同类型的图标样式 */
.message-toast.success .message-icon {
  background-color: transparent;
  color: rgb(103, 194, 58);
}

.message-toast.warning .message-icon {
  background-color: transparent;
  color: rgb(230, 162, 60);
}

.message-toast.error .message-icon {
  background-color: transparent;
  color: rgb(245, 108, 108);
}

.message-toast.info .message-icon {
  background-color: transparent;
  color: rgb(144, 147, 153);
}

/* Element UI 风格 - 消息内容布局 */
.message-content {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.message-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  line-height: 1;
}

.message-icon svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.message-icon.warning svg {
  width: 16px;
  height: 16px;
}

.message-text {
  font-size: 14px;
  color: #606266;
  margin: 0;
  line-height: 1.5;
  word-wrap: break-word;
  flex: 1;
}

/* Element UI 风格 - 不同类型的文字颜色 */
.message-toast.success .message-text {
  color: #67c23a;
}

.message-toast.warning .message-text {
  color: #e6a23c;
}

.message-toast.info .message-text {
  color: #909399;
}

.message-toast.error .message-text {
  color: #f56c6c;
}

.message-close {
  position: absolute;
  top: 50%;
  right: 15px;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  background: none;
  border: none;
  cursor: pointer;
  color: #c0c4cc;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0;
  transition: color 0.2s ease;
  flex-shrink: 0;
  outline: none;
}

.message-close svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.message-close:hover {
  color: #909399;
}

/* Element UI 风格不需要进度条 */

/* Element UI 风格动画已在 transition 中处理 */

/* Element UI 风格 - 响应式设计 */
@media (max-width: 768px) {
  .message-toast-container {
    left: 50%;
    transform: translateX(-50%);
    right: auto;
    padding: 0 20px;
  }
  
  .message-toast {
    min-width: 300px;
    max-width: calc(100vw - 40px);
    padding: 14px 17px 14px 14px;
  }
  
  .message-text {
    font-size: 13px;
  }
  
  .message-icon {
    width: 18px;
    height: 18px;
  }
  
  .message-icon svg {
    width: 14px;
    height: 14px;
  }
}

@media (max-width: 480px) {
  .message-toast-container {
    left: 50%;
    transform: translateX(-50%);
    right: auto;
    padding: 0 15px;
  }
  
  .message-toast {
    min-width: 280px;
    max-width: calc(100vw - 30px);
    padding: 12px 15px 12px 12px;
  }
  
  .message-text {
    font-size: 12px;
  }
  
  .message-icon {
    width: 16px;
    height: 16px;
  }
  
  .message-icon svg {
    width: 12px;
    height: 12px;
  }
  
  .message-close {
    width: 14px;
    height: 14px;
    right: 12px;
  }
  
  .message-close svg {
    width: 14px;
    height: 14px;
  }
}

/* Element UI 风格 - 深色主题支持 */
@media (prefers-color-scheme: dark) {
  .message-toast {
    background: #2d2d2d;
    color: #e5eaf3;
    box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.3);
  }
  
  .message-text {
    color: #e5eaf3;
  }
  
  .message-close {
    color: #909399;
  }
  
  .message-close:hover {
    color: #c0c4cc;
  }
}

/* Element UI 风格 - 无障碍支持 */
.message-toast:focus {
  outline: 2px solid #409eff;
  outline-offset: 2px;
}

.message-close:focus {
  outline: 2px solid #409eff;
  outline-offset: 1px;
}

/* 打印样式 */
@media print {
  .message-toast-container {
    display: none;
  }
}
