/* 客户身份验证 —— 下单额度超限弹窗
 *
 * 必须随 kyc-limit-modal.js 一起发布：脚本会把 layer.msg 的那条提示吞掉
 * （见脚本里 pendingMessage 的逻辑），设计上就是「用弹窗代替 toast」。
 * 一旦这个文件缺失，弹窗会退化成没有样式的普通 div 塞在页面流里，
 * 而 toast 又被吞掉 —— 客户侧表现为「点了提交订单后完全没反应」。
 */
.kyc-modal-mask {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.62);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  animation: kyc-modal-fade 0.18s ease-out;
}

.kyc-modal-mask[hidden] {
  display: none;
}

.kyc-modal {
  width: 100%;
  max-width: 420px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.28);
  padding: 26px 24px 20px;
  text-align: center;
  animation: kyc-modal-pop 0.2s ease-out;
}

.kyc-modal h3 {
  margin: 0 0 12px;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
  color: #0f172a;
}

.kyc-modal p {
  margin: 0 0 10px;
  font-size: 14px;
  line-height: 1.6;
  color: #475569;
  word-break: break-word;
}

.kyc-modal .kyc-amount {
  margin: 0 0 10px;
  font-size: 24px;
  font-weight: 800;
  line-height: 1.2;
  color: #dc2626;
}

.kyc-modal .kyc-amount[hidden] {
  display: none;
}

.kyc-actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

.kyc-modal .kyc-primary,
.kyc-modal .kyc-ghost {
  flex: 1 1 0;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  line-height: 42px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: opacity 0.15s ease, background-color 0.15s ease;
}

.kyc-modal .kyc-primary {
  background: #4f46e5;
  color: #fff;
}

.kyc-modal .kyc-ghost {
  background: #f1f5f9;
  color: #334155;
  border-color: #e2e8f0;
}

.kyc-modal .kyc-primary[hidden] {
  display: none;
}

.kyc-modal .kyc-primary:hover,
.kyc-modal .kyc-ghost:hover {
  opacity: 0.88;
}

.kyc-modal .kyc-primary:focus-visible,
.kyc-modal .kyc-ghost:focus-visible {
  outline: 2px solid #4f46e5;
  outline-offset: 2px;
}

@keyframes kyc-modal-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes kyc-modal-pop {
  from { opacity: 0; transform: translateY(12px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .kyc-modal-mask,
  .kyc-modal {
    animation: none;
  }
}

@media (max-width: 480px) {
  .kyc-modal {
    padding: 22px 18px 16px;
  }

  .kyc-modal .kyc-amount {
    font-size: 21px;
  }

  .kyc-actions {
    flex-direction: column-reverse;
  }
}
