/* Pedia fetch_summary hover 摘要卡片（Figma 477:4532）；正文链接样式保持 CMS 原有样式 */
.pedia-fetch-summary-popover {
  position: fixed;
  z-index: 1200;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  width: 360px;
  max-width: calc(100vw - 24px);
  padding: 17px;
  border: 1px solid #e5e5e5;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s ease, visibility 0.15s ease;
}

.pedia-fetch-summary-popover.is-visible {
  pointer-events: auto;
  opacity: 1;
  visibility: visible;
}

.pedia-fetch-summary-popover__title {
  margin: 0;
  color: #333;
  font-size: 16px;
  font-weight: 500;
  line-height: 28px;
  word-break: break-word;
}

.pedia-fetch-summary-popover__summary-wrap {
  position: relative;
  width: 100%;
}

.pedia-fetch-summary-popover__summary {
  margin: 0;
  color: #666;
  font-size: 14px;
  font-weight: 400;
  line-height: 22px;
  word-break: break-word;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  line-clamp: 4;
  overflow: hidden;
}

.pedia-fetch-summary-popover__summary.is-expanded {
  display: block;
  -webkit-line-clamp: unset;
  line-clamp: unset;
  overflow: visible;
}

.pedia-fetch-summary-popover__summary-more {
  display: none;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  color: #666;
  font-size: 14px;
  line-height: 22px;
  cursor: pointer;
}

.pedia-fetch-summary-popover__summary-wrap.is-clamped .pedia-fetch-summary-popover__summary-more {
  display: inline-block;
}

.pedia-fetch-summary-popover__summary-wrap.is-expanded .pedia-fetch-summary-popover__summary {
  display: block;
  -webkit-line-clamp: unset;
  line-clamp: unset;
  overflow: visible;
}

.pedia-fetch-summary-popover__summary-wrap.is-expanded .pedia-fetch-summary-popover__summary-more {
  display: none;
}

.pedia-fetch-summary-popover__action {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--pedia-accent);
  font-size: 14px;
  font-weight: 500;
  line-height: 22px;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.pedia-fetch-summary-popover__action:hover,
.pedia-fetch-summary-popover__action:focus-visible {
  color: var(--pedia-accent);
  text-decoration: none;
}

.pedia-fetch-summary-popover__action-label {
  color: inherit;
}

.pedia-fetch-summary-popover__action:hover .pedia-fetch-summary-popover__action-label,
.pedia-fetch-summary-popover__action:focus-visible .pedia-fetch-summary-popover__action-label {
  color: inherit;
  text-decoration: underline;
}

.pedia-fetch-summary-popover__icon {
  display: block;
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  color: inherit;
}

.pedia-fetch-summary-popover__icon path {
  stroke: currentColor;
}

.pedia-fetch-summary-popover__loading {
  margin: 0;
  color: #999;
  font-size: 14px;
  line-height: 22px;
}
