/* 统一提示：信息 / 成功 / 警告 / 错误 / 确认（参照复制成功 toast） */

.iar-msg-toast-host {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 20000;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  pointer-events: none;
  max-width: min(420px, calc(100vw - 24px));
}

.iar-msg-toast {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 220px;
  max-width: 100%;
  padding: 12px 16px;
  border-radius: 6px;
  color: #fff;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.22);
  font-size: 14px;
  line-height: 1.45;
  animation: iarMsgToastIn 0.25s ease forwards;
}

.iar-msg-toast.is-leaving {
  animation: iarMsgToastOut 0.28s ease forwards;
}

.iar-msg-toast-icon {
  flex: 0 0 auto;
  margin-top: 1px;
  font-size: 16px;
  opacity: 0.95;
}

.iar-msg-toast-body {
  flex: 1 1 auto;
  white-space: pre-wrap;
  word-break: break-word;
}

.iar-msg-toast-close {
  flex: 0 0 auto;
  border: 0;
  background: transparent;
  color: inherit;
  opacity: 0.75;
  padding: 0 0 0 4px;
  line-height: 1;
  cursor: pointer;
}

.iar-msg-toast-close:hover {
  opacity: 1;
}

.iar-msg-toast-info {
  background-color: #0d6efd;
}

.iar-msg-toast-success {
  background-color: #28a745;
}

.iar-msg-toast-warning {
  background-color: #e0a800;
  color: #212529;
}

.iar-msg-toast-warning .iar-msg-toast-close {
  color: #212529;
}

.iar-msg-toast-error {
  background-color: #dc3545;
}

@keyframes iarMsgToastIn {
  from {
    opacity: 0;
    transform: translateY(-16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes iarMsgToastOut {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-12px);
  }
}

/* 确认对话框 */
.iar-msg-confirm-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20010;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: iarMsgFadeIn 0.15s ease;
}

.iar-msg-confirm-dialog {
  width: min(440px, 100%);
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.28);
  overflow: hidden;
}

.iar-msg-confirm-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid #e9ecef;
  font-weight: 600;
  color: #212529;
}

.iar-msg-confirm-header .iar-msg-confirm-icon {
  color: #e0a800;
  font-size: 18px;
}

.iar-msg-confirm-body {
  padding: 16px;
  color: #343a40;
  font-size: 14px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: min(50vh, 360px);
  overflow-y: auto;
}

.iar-msg-confirm-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 16px 16px;
  border-top: 1px solid #e9ecef;
  background: #f8f9fa;
}

@keyframes iarMsgFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
