/* 项目统一 SweetAlert2 toast 样式（主站 / embed / 独立页共用） */

.swal2-container .swal2-popup.swal2-toast {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 8px !important;
  width: auto !important;
  min-width: 180px !important;
  max-width: 280px !important;
  min-height: 44px !important;
  padding: 8px 12px !important;
  border-radius: 8px !important;
  font-size: 13px !important;
  grid-template-columns: none !important;
  grid-template-rows: none !important;
  overflow: hidden !important;
  box-shadow: 0 0 1px rgba(0, 0, 0, 0.075), 0 1px 2px rgba(0, 0, 0, 0.075),
    1px 2px 4px rgba(0, 0, 0, 0.075), 1px 3px 8px rgba(0, 0, 0, 0.075),
    2px 4px 16px rgba(0, 0, 0, 0.075) !important;
}

.swal2-container .swal2-popup.swal2-toast > *,
.swal2-container .swal2-popup.swal2-toast .swal2-icon,
.swal2-container .swal2-popup.swal2-toast .swal2-title,
.swal2-container .swal2-popup.swal2-toast .swal2-html-container,
.swal2-container .swal2-popup.swal2-toast .swal2-timer-progress-bar-container {
  grid-column: auto !important;
  grid-row: auto !important;
}

.swal2-container .swal2-popup.swal2-toast .swal2-icon {
  flex: 0 0 24px !important;
  width: 24px !important;
  height: 24px !important;
  min-width: 24px !important;
  margin: 0 !important;
  border-width: 3px !important;
  align-self: center !important;
  position: relative !important;
}

.swal2-container .swal2-popup.swal2-toast .swal2-x-mark {
  width: 24px !important;
  height: 24px !important;
}

.swal2-container .swal2-popup.swal2-toast .swal2-x-mark-line-left,
.swal2-container .swal2-popup.swal2-toast .swal2-x-mark-line-right {
  top: 10px !important;
  width: 15px !important;
  height: 3px !important;
}

.swal2-container .swal2-popup.swal2-toast .swal2-success-ring {
  width: 24px !important;
  height: 24px !important;
}

.swal2-container .swal2-popup.swal2-toast .swal2-success-line-tip {
  top: 14px !important;
  left: 3px !important;
  width: 8px !important;
  height: 3px !important;
}

.swal2-container .swal2-popup.swal2-toast .swal2-success-line-long {
  top: 12px !important;
  right: 2px !important;
  width: 15px !important;
  height: 3px !important;
}

.swal2-container .swal2-popup.swal2-toast .swal2-html-container,
.swal2-container .swal2-popup.swal2-toast .swal2-title {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  color: #1f2937 !important;
  font-size: 13px !important;
  font-weight: 400 !important;
  line-height: 20px !important;
  text-align: left !important;
}

/* 与 adminlte 主站一致的图标配色（embed 等轻量页无 adminlte 时靠此处对齐） */
.swal2-container .swal2-popup.swal2-toast .swal2-icon.swal2-info {
  border-color: #17a2b8 !important;
  color: #17a2b8 !important;
}

.swal2-container .swal2-popup.swal2-toast .swal2-icon.swal2-warning {
  border-color: #f39c12 !important;
  color: #f39c12 !important;
}

.swal2-container .swal2-popup.swal2-toast .swal2-icon.swal2-error {
  border-color: #dc3545 !important;
  color: #dc3545 !important;
}

.swal2-container .swal2-popup.swal2-toast .swal2-icon.swal2-question {
  border-color: #6c757d !important;
  color: #6c757d !important;
}

.swal2-container .swal2-popup.swal2-toast .swal2-icon.swal2-success {
  border-color: #28a745 !important;
  color: #28a745 !important;
}

.swal2-container .swal2-popup.swal2-toast .swal2-icon.swal2-success .swal2-success-ring {
  border-color: rgba(40, 167, 69, 0.3) !important;
}

.swal2-container .swal2-popup.swal2-toast .swal2-icon.swal2-success [class^='swal2-success-line'] {
  background-color: #28a745 !important;
}

/* embed / iframe 内 toast 不被裁切 */
body.im-embed .swal2-container {
  z-index: 20000;
}
