/* =====================================================
 * 报告 / 白皮书「留资后下载」通用样式
 * 与 download-gate.js 配套使用
 * 样式取自 news/ai-content-risk-governance-whitepaper.html，
 * 抽成公共文件以便多个页面复用。
 * ===================================================== */

/* ---------- 留资弹窗 ---------- */
.download-modal {
  position: fixed; inset: 0; z-index: 9999;
  display: none; align-items: center; justify-content: center;
  background: rgba(7, 11, 22, 0.5);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
}
.download-modal.open { display: flex; }
.download-dialog {
  background: #fff; border-radius: 12px; padding: 40px;
  max-width: 480px; width: 90%; position: relative;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.15);
  animation: dlFadeIn .25s;
  font-family: 'Inter', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  max-height: 90vh; overflow-y: auto;
}
@keyframes dlFadeIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
.download-dialog .dl-close {
  position: absolute; top: 16px; right: 16px;
  background: none; border: none; font-size: 20px; color: #64748B;
  cursor: pointer; width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s;
}
.download-dialog .dl-close:hover { background: #F1F5F9; }
.download-dialog h3 { font-size: 20px; font-weight: 600; color: #070B16; margin: 0 0 6px; }
.download-dialog .dl-sub { font-size: 14px; color: #475569; margin: 0 0 24px; line-height: 1.6; }

.dl-form .dl-field { margin-bottom: 16px; }
.dl-form label { display: block; font-size: 12px; font-weight: 600; color: #475569; letter-spacing: 0.05em; margin-bottom: 6px; }
.dl-form input {
  width: 100%; padding: 11px 14px; font-size: 14px; font-family: inherit;
  color: #1E293B; background: #fff;
  border: 1px solid #E2E8F0; border-radius: 6px;
  transition: border-color .15s, box-shadow .15s; box-sizing: border-box;
}
.dl-form input:focus { outline: none; border-color: #0EA5E9; box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1); }
.dl-form .dl-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.dl-form .dl-submit {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 28px; background: linear-gradient(135deg, #0EA5E9, #0284C7);
  color: #fff; border: none; border-radius: 6px;
  font-size: 15px; font-weight: 600; font-family: inherit; cursor: pointer;
  transition: all .25s; box-shadow: 0 4px 14px rgba(14, 165, 233, 0.3);
  width: 100%; justify-content: center; margin-top: 8px;
}
.dl-form .dl-submit:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(14, 165, 233, 0.4); }
.dl-form .dl-submit:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.dl-form .dl-error {
  display: none; margin-top: 10px; padding: 10px 14px;
  background: #FEF2F2; border: 1px solid #FECACA; border-radius: 6px;
  font-size: 13px; color: #DC2626;
}
.dl-form .dl-hint { font-size: 12px; color: #94A3B8; margin-top: 12px; text-align: center; }

@media (max-width: 520px) {
  .download-dialog { padding: 28px 22px; }
  .dl-form .dl-row { grid-template-columns: 1fr; gap: 0; }
}

/* ---------- 已留资后的下载按钮 ---------- */
.dl-done-btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 28px; background: linear-gradient(135deg, #10B981, #059669);
  color: #fff; border-radius: 6px;
  font-size: 15px; font-weight: 600; text-decoration: none;
  transition: all .25s; box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}
.dl-done-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4); color: #fff; }
.dl-done-note { margin: 12px 0 0; font-size: 12px; color: #94A3B8; }
