/* == css/app/success-modal.css · 提交成功结果弹窗（PC + 移动端共用） ==
 *
 * 定位：游客提交成功后「工单编号 + 查询码」必须被看到 —— 这是游客唯一的
 *       后续入口（无账号、无法进「我的工单」）。原先这串信息只是表单下方的
 *       一行提示，用户下滑或切走就丢失；现改为模态层强制呈现。
 *
 * 设计语言对齐 workspace.css / auth-modal.css：
 *   圆角 12px（同 ws-table-card）· 描边 --border-light · 主色 --blue
 *   字号 13px 正文 / 12px 辅助 · 一层浮起投影，遮罩为半透明黑（非模糊）
 *
 * 命名空间 sm-（success modal），与 .am-（登录弹窗）、.mvc-toasts 完全隔离。
 * 两端均加载（不在 PC_ONLY / MOBILE_ONLY 层内），故窄屏下用媒体查询降级为
 * 贴底抽屉形态，保证移动端拇指可达。
 * ========================================================================== */

/* ---------- 遮罩层 ---------- */
.sm-mask {
  position: fixed;
  inset: 0;
  z-index: 320;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(24, 24, 27, 0.45);
  animation: smFade 0.16s ease;
}
.sm-mask[hidden] { display: none; }
@keyframes smFade {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ---------- 弹窗主体 ---------- */
.sm-dialog {
  position: relative;
  width: 100%;
  max-width: 420px;
  max-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 24px 64px -16px rgba(23, 23, 28, 0.28);
  overflow: hidden;
  animation: smRise 0.18s cubic-bezier(0.2, 0, 0, 1);
}
@keyframes smRise {
  from { opacity: 0; transform: translateY(10px) scale(0.985); }
  to { opacity: 1; transform: none; }
}

/* ---------- 关闭按钮 ---------- */
.sm-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-2);
  transition: background 0.12s, color 0.12s;
}
.sm-close:hover { background: var(--fill); color: var(--black); }
.sm-close:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }

/* ---------- 头部 ---------- */
.sm-head {
  flex: none;
  padding: 26px 24px 0;
  text-align: center;
}
.sm-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: #f0fdf4;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sm-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--black);
  line-height: 1.3;
}
.sm-desc {
  margin-top: 6px;
  font-size: 13px;
  color: var(--gray-2);
  line-height: 1.6;
}

/* ---------- 主体 ---------- */
.sm-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 18px 24px 20px;
}

/* ---------- 信息行（编号 / 查询码） ---------- */
.sm-fields {
  border: 1px solid var(--border-light);
  border-radius: 10px;
  overflow: hidden;
}
.sm-field {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
}
.sm-field + .sm-field { border-top: 1px solid var(--border-light); }
.sm-field-label {
  flex: none;
  font-size: 12px;
  color: var(--gray-3);
  width: 56px;
}
.sm-field-value {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  color: var(--black);
  font-weight: 500;
  word-break: break-all;
}
/* 查询码等需要逐位核对的内容用等宽字体 */
.sm-field-value.is-mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.06em;
}
.sm-copy {
  flex: none;
  font-size: 12px;
  color: var(--blue);
  padding: 3px 10px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: #fff;
  transition: all 0.12s;
}
.sm-copy:hover { border-color: var(--blue); background: var(--blue-50); }
.sm-copy:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }
.sm-copy.is-done { color: #15803d; border-color: #15803d; background: #f0fdf4; }

/* ---------- 提示 ---------- */
.sm-notice {
  margin-top: 14px;
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--blue-50);
  color: var(--blue);
  font-size: 12px;
  line-height: 1.65;
}

/* ---------- 底部按钮 ---------- */
.sm-foot {
  flex: none;
  display: flex;
  gap: 10px;
  padding: 14px 24px 18px;
  border-top: 1px solid var(--border-light);
  background: #fafafa;
}
.sm-btn {
  flex: 1;
  min-width: 0;
  height: 38px;
  padding: 0 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--gray-1);
  font-size: 13px;
  font-weight: 500;
  font-family: var(--font);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: all 0.12s;
}
.sm-btn:hover { border-color: var(--gray-3); color: var(--black); }
.sm-btn:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }
.sm-btn-primary {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}
.sm-btn-primary:hover { background: var(--blue-hover); border-color: var(--blue-hover); color: #fff; }

/* ---------- 动效降级 ---------- */
@media (prefers-reduced-motion: reduce) {
  .sm-mask, .sm-dialog { animation: none; }
}

/* ---------- 窄屏：贴底抽屉形态，拇指可达 ---------- */
@media (max-width: 639px) {
  .sm-mask { padding: 0; align-items: flex-end; }
  .sm-dialog {
    max-width: none;
    max-height: 92vh;
    border-radius: 14px 14px 0 0;
  }
  .sm-head { padding: 24px 18px 0; }
  .sm-body { padding: 16px 18px 18px; }
  .sm-foot { padding: 12px 18px calc(14px + env(safe-area-inset-bottom)); }
  .sm-field-label { width: 52px; }
}
