/* hz-dialog.css —— 海禛云统一弹窗 / 提示（企业级科技风）
 *
 * 目标：把浏览器原生的 alert() 换成与平台一致的模态框。
 * 全部消费主题变量（iam-themes.css 的 --card-bg / --border-color / --accent-color …），
 * 所以 41 套主题 + 深色模式自动跟随，不需要为每套主题单独写样式。
 */

.hz-dlg-mask {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(15, 23, 42, .45);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity .18s ease;
}
.hz-dlg-mask.show { opacity: 1; }

.hz-dlg {
  width: 420px;
  max-width: 92vw;
  max-height: 86vh;
  display: flex;
  flex-direction: column;
  background: var(--card-bg, #fff);
  color: var(--text-primary, #1a1a2e);
  border: 1px solid var(--border-color, #e5e7eb);
  border-radius: 14px;
  box-shadow: 0 24px 64px rgba(15, 23, 42, .28), 0 2px 8px rgba(15, 23, 42, .08);
  transform: translateY(8px) scale(.985);
  opacity: 0;
  transition: transform .2s cubic-bezier(.2, .8, .2, 1), opacity .2s ease;
  overflow: hidden;
}
.hz-dlg-mask.show .hz-dlg { transform: translateY(0) scale(1); opacity: 1; }

/* 顶部色条：按语义区分 info / success / warn / error */
.hz-dlg-bar { height: 3px; flex: 0 0 auto; background: var(--accent-color, #3b82f6); }
.hz-dlg-mask.k-success .hz-dlg-bar { background: #10b981; }
.hz-dlg-mask.k-warn .hz-dlg-bar { background: #f59e0b; }
.hz-dlg-mask.k-error .hz-dlg-bar { background: #ef4444; }

.hz-dlg-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 18px 20px 0;
  flex: 0 0 auto;
}
.hz-dlg-ico {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  line-height: 1;
  background: color-mix(in srgb, var(--accent-color, #3b82f6) 12%, transparent);
  color: var(--accent-color, #3b82f6);
}
.hz-dlg-mask.k-success .hz-dlg-ico { background: rgba(16, 185, 129, .12); color: #059669; }
.hz-dlg-mask.k-warn .hz-dlg-ico { background: rgba(245, 158, 11, .14); color: #b45309; }
.hz-dlg-mask.k-error .hz-dlg-ico { background: rgba(239, 68, 68, .12); color: #dc2626; }

.hz-dlg-titles { min-width: 0; flex: 1 1 auto; padding-top: 1px; }
.hz-dlg-title {
  font-size: 15px;
  font-weight: 650;
  letter-spacing: .2px;
  color: var(--text-primary, #1a1a2e);
  word-break: break-word;
}

.hz-dlg-body {
  padding: 10px 20px 4px;
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--text-secondary, #4b5563);
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
}
/* 长内容（堆栈、批量结果）给个上限并允许滚动，别把整屏撑满 */
.hz-dlg-body.hz-long { max-height: 46vh; }

.hz-dlg-foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 20px 18px;
  flex: 0 0 auto;
}
.hz-dlg-btn {
  min-width: 84px;
  padding: 9px 18px;
  border-radius: 9px;
  border: 1px solid var(--border-color, #e5e7eb);
  background: var(--card-bg, #fff);
  color: var(--text-primary, #1a1a2e);
  font: inherit;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: background .15s, border-color .15s, transform .06s;
}
.hz-dlg-btn:hover { background: var(--bg-secondary, #f3f4f6); }
.hz-dlg-btn:active { transform: translateY(1px); }
.hz-dlg-btn.primary {
  background: var(--accent-color, #3b82f6);
  border-color: var(--accent-color, #3b82f6);
  color: #fff;
  font-weight: 600;
}
.hz-dlg-btn.primary:hover { filter: brightness(.94); }
.hz-dlg-btn:focus-visible { outline: 2px solid var(--accent-color, #3b82f6); outline-offset: 2px; }

/* 输入框（供 hzPrompt 用；原生 prompt 仍保留，这里给新代码用） */
.hz-dlg-input {
  width: 100%;
  margin-top: 10px;
  padding: 9px 12px;
  border: 1px solid var(--border-color, #e5e7eb);
  border-radius: 9px;
  background: var(--bg-secondary, #f9fafb);
  color: var(--text-primary, #1a1a2e);
  font: inherit;
  font-size: 13.5px;
  outline: none;
}
.hz-dlg-input:focus { border-color: var(--accent-color, #3b82f6); }

@media (max-width: 560px) {
  .hz-dlg-mask { padding: 12px; align-items: flex-end; }
  .hz-dlg { width: 100%; max-width: 100%; border-radius: 16px 16px 14px 14px; }
  .hz-dlg-head { padding: 16px 16px 0; }
  .hz-dlg-body { padding: 10px 16px 4px; }
  .hz-dlg-foot { padding: 14px 16px 16px; }
  .hz-dlg-btn { flex: 1 1 auto; min-width: 0; }
}
