/* CodaCV 与 CodaPan 对齐的 SweetAlert2 iframe 弹层样式 */
.swal2-container {
  z-index: 20000;
}
.swal2-popup.nopadding-wrap {
  padding: 0 !important;
  margin: 0;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  color: #151827;
}
.swal2-popup.nopadding-wrap #swal2-html-container {
  margin: 0 !important;
  padding: 0 !important;
}
.swal2-popup.nopadding-wrap > .swal2-close {
  display: none !important;
}

/* ---------- Toast：不用 SWAL 描边动画（易被 overflow 裁成半勾） ---------- */
.swal2-popup.swal2-toast {
  padding: 12px 16px !important;
  overflow: hidden;
  box-sizing: border-box;
  align-items: center;
}
.swal2-popup.swal2-toast .swal2-title {
  margin: 0 0.4em !important;
  font-size: 14px !important;
  line-height: 1.4;
}
.swal2-popup.swal2-toast .swal2-icon {
  width: 1.75em !important;
  height: 1.75em !important;
  min-width: 1.75em;
  margin: 0 0.55em 0 0 !important;
  border: 0 !important;
  position: relative;
}
.swal2-popup.swal2-toast .swal2-icon > * {
  display: none !important;
}

/* 成功：绿底 + CSS 对勾 */
.swal2-popup.swal2-toast .swal2-icon.swal2-success {
  background: #ecfdf3 !important;
  color: #16a34a;
}
.swal2-popup.swal2-toast .swal2-icon.swal2-success::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 45%;
  width: 0.38em;
  height: 0.7em;
  border: solid currentColor;
  border-width: 0 0.16em 0.16em 0;
  transform: translate(-55%, -60%) rotate(45deg);
}

/* 失败：红底 + CSS × */
.swal2-popup.swal2-toast .swal2-icon.swal2-error {
  background: #fef2f2 !important;
  color: #dc2626;
}
.swal2-popup.swal2-toast .swal2-icon.swal2-error::before,
.swal2-popup.swal2-toast .swal2-icon.swal2-error::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0.85em;
  height: 0.16em;
  background: currentColor;
  border-radius: 1px;
}
.swal2-popup.swal2-toast .swal2-icon.swal2-error::before {
  transform: translate(-50%, -50%) rotate(45deg);
}
.swal2-popup.swal2-toast .swal2-icon.swal2-error::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

/* 警告 */
.swal2-popup.swal2-toast .swal2-icon.swal2-warning {
  background: #fff7ed !important;
  color: #d97706;
  font-size: 1.15em;
  font-weight: 800;
  line-height: 1.75em;
  text-align: center;
}
.swal2-popup.swal2-toast .swal2-icon.swal2-warning::after {
  content: "!";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  line-height: 1.75em;
  text-align: center;
  font-size: 1.05em;
  font-weight: 800;
}

.swal2-popup.swal2-toast .swal2-timer-progress-bar {
  background: rgba(79, 70, 229, 0.45);
}

/* 删除等确认框：不用浏览器原生 confirm */
.swal2-popup.cv-swal-confirm {
  width: 26em;
  border-radius: 14px;
  padding: 22px 22px 18px;
}
.swal2-popup.cv-swal-confirm .swal2-title {
  font-size: 16px;
  font-weight: 720;
  color: #151827;
  padding: 0;
}
.swal2-popup.cv-swal-confirm .swal2-html-container {
  font-size: 13px;
  line-height: 1.5;
  color: #64748b;
  margin: 8px 0 0;
}
.swal2-popup.cv-swal-confirm .cv-swal-actions {
  margin-top: 18px;
  gap: 8px;
  flex-direction: row;
  justify-content: flex-end;
}
.swal2-popup.cv-swal-confirm .swal2-confirm {
  order: -1;
}
.cv-swal-btn {
  appearance: none;
  height: 36px;
  padding: 0 14px;
  border-radius: 8px;
  font-weight: 650;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
}
.cv-swal-btn-ghost {
  background: #fff;
  border: 1px solid #e2e8f0;
  color: #334155;
}
.cv-swal-btn-ghost:hover { background: #f8fafc; }
.cv-swal-btn-danger {
  background: #dc2626;
  border: 1px solid #dc2626;
  color: #fff;
}
.cv-swal-btn-danger:hover { background: #b91c1c; }
.cv-swal-btn-primary {
  background: #4f46e5;
  border: 1px solid #4f46e5;
  color: #fff;
}
.cv-swal-btn-primary:hover { background: #4338ca; }
