/* ========== AI 导读 / 思维导图 公共样式 ========== */
/* ---------- AI 摘要悬浮卡片 ---------- */
.ai-summary-container {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 9999;
  width: 380px;
  max-height: 70vh;
  background: #ffffff;
  border: 1px solid #e8e8e8;
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(1, 82, 147, 0.18);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: ai-fade-in 0.25s ease-out;
}
@keyframes ai-fade-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.ai-summary-close {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 26px;
  height: 26px;
  border: 0;
  background: transparent;
  font-size: 22px;
  line-height: 1;
  color: #fff;
  cursor: pointer;
  z-index: 2;
}
.ai-summary-close:hover {
  opacity: 0.8;
}
.ai-summary-wrap {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}
.ai-summary-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 40px 14px 16px;
  background: linear-gradient(135deg, #015293 0%, #2882fe 100%);
  color: #fff;
}
.ai-summary-header p {
  margin: 0;
  font-size: 14px;
  line-height: 1.4;
}
.ai-summary-logo {
  display: inline-block;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  flex: 0 0 22px;
  position: relative;
}
.ai-summary-logo::before {
  content: "AI";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: bold;
  color: #015293;
}
.ai-summary-content {
  flex: 1;
  min-height: 0;
  padding: 12px 16px 16px;
  overflow-y: auto;
  font-size: 14px;
  color: #333;
  line-height: 1.7;
}
.ai-summary-tips {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 10px;
  font-size: 12px;
  color: #999;
}
.ai-summary-tips .ai-summary-logo {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  background: #f0f4fa;
}
.ai-summary-tips .ai-summary-logo::before {
  font-size: 9px;
}
.ai-summary-loading {
  padding: 8px 0;
  font-size: 13px;
  color: #999;
}
.ai-summary-loading::after {
  content: "";
  display: inline-block;
  margin-left: 4px;
  animation: ai-dot 1.2s steps(4, end) infinite;
}
@keyframes ai-dot {
  0% {
    content: "";
  }
  25% {
    content: ".";
  }
  50% {
    content: "..";
  }
  75% {
    content: "...";
  }
  100% {
    content: "";
  }
}
.ai-summary-section {
  padding: 6px 0;
}
.ai-summary-section + .ai-summary-section {
  border-top: 1px dashed #e8e8e8;
  margin-top: 6px;
}
.ai-summary-section p {
  margin: 4px 0;
}
.ai-summary-section ul,
.ai-summary-section ol {
  padding-left: 22px;
  margin: 4px 0;
}
.ai-summary-section strong {
  color: #015293;
}
.ai-summary-typing {
  opacity: 0;
  transition: opacity 0.18s ease-out;
}
.ai-summary-typing.show {
  opacity: 1;
}
/* ---------- 思维导图 ---------- */
.map-container {
  display: none;
  width: 100%;
  height: 100%;
  flex-direction: column;
  background: #fff;
}
.map-container.is-open {
  display: flex;
}
.map-toolbar {
  display: flex;
  gap: 10px;
  padding: 10px 16px;
  border-bottom: 1px solid #e8e8e8;
  background: #fafbfc;
}
.map-btn {
  height: 30px;
  padding: 0 14px;
  font-size: 14px;
  color: #015293;
  background: #fff;
  border: 1px solid #015293;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}
.map-btn:hover {
  background: #015293;
  color: #fff;
}
#mark-map {
  flex: 1;
  min-height: 0;
  width: 100%;
  overflow: hidden;
  touch-action: none;
  /* 交由 d3-zoom 处理触屏手势 */
}
#mark-map svg {
  width: 100%;
  height: 100%;
}
/* ---------- 思维导图弹窗（layui skin: ai-mindmap-layer） ---------- */
.layui-layer-ai-mindmap-layer .layui-layer-content {
  height: calc(100% - 42px) !important;
  padding: 0 !important;
  overflow: hidden !important;
}
.layui-layer-ai-mindmap-layer .map-container {
  height: 100%;
}
/* ---------- AI 免责声明 ---------- */
/* AI导读面板内的「免责声明」链接（位于「内容由AI生成」提示行右侧） */
.ai-disclaimer-link {
  margin-left: auto;
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 12px;
  color: #015293;
  text-decoration: underline;
  white-space: nowrap;
  cursor: pointer;
}
.ai-disclaimer-link:hover {
  opacity: 0.8;
}
/* 思维导图工具栏「免责声明」按钮（靠右） */
.map-disclaimer-btn {
  margin-left: auto;
}
/* 免责声明弹框内容（由 layui.layer type:1 承载） */
.ai-disclaimer-modal {
  width: 560px;
  max-width: 100%;
  padding: 22px 26px 24px;
  box-sizing: border-box;
  background: #fff;
  font-size: 14px;
  color: #333;
  line-height: 1.9;
}
.ai-disclaimer-modal p {
  margin: 0 0 10px;
  text-align: justify;
}
.ai-disclaimer-modal p:last-of-type {
  margin-bottom: 0;
}
.ai-disclaimer-modal .ai-disclaimer-confirm {
  display: block;
  margin: 20px auto 0;
  height: 34px;
  padding: 0 32px;
  font-size: 14px;
  color: #fff;
  background: #015293;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
}
.ai-disclaimer-modal .ai-disclaimer-confirm:hover {
  opacity: 0.9;
}
/* 免责声明弹窗皮肤（layui skin: ai-disclaimer-layer） */
.layui-layer-ai-disclaimer-layer {
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 12px 32px rgba(1, 82, 147, 0.18);
}
.layui-layer-ai-disclaimer-layer .layui-layer-title {
  height: 48px;
  line-height: 48px;
  padding: 0 60px 0 20px;
  font-size: 16px;
  font-weight: 700;
  color: #015293;
  background-color: #fff;
  border-bottom: 1px solid #e8e8e8;
}
.layui-layer-ai-disclaimer-layer .layui-layer-setwin .layui-layer-close:hover {
  color: #015293;
}
/* ========== H5 适配 (≤ 750px) ========== */
@media screen and (max-width: 750px) {
  .ai-summary-container {
    right: 0;
    left: 0;
    bottom: 0;
    width: auto;
    max-height: 70vh;
    border-radius: 12px 12px 0 0;
  }
  .ai-summary-close {
    width: 36px;
    height: 36px;
    font-size: 26px;
  }
  .ai-summary-header {
    padding: 12px 44px 12px 14px;
  }
  .ai-summary-content {
    padding: 10px 14px 14px;
    font-size: 15px;
  }
  .map-toolbar {
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px 10px;
  }
  .map-btn {
    height: 28px;
    padding: 0 10px;
    font-size: 12px;
    border-radius: 4px;
  }
  /* AI 免责声明 H5 适配 */
  .ai-disclaimer-link {
    font-size: 12px;
  }
  .ai-disclaimer-modal {
    width: 100%;
    padding: 16px 16px 18px;
    font-size: 14px;
    line-height: 1.8;
  }
  .ai-disclaimer-modal p {
    margin-bottom: 8px;
  }
  .ai-disclaimer-modal .ai-disclaimer-confirm {
    margin-top: 16px;
    height: 32px;
    padding: 0 28px;
    font-size: 13px;
  }
  .layui-layer-ai-disclaimer-layer .layui-layer-title {
    height: 42px;
    line-height: 42px;
    font-size: 15px;
  }
}
