/* 文章/产品内嵌：默认展示微信、朋友圈、QQ、微博，其余收入「更多」 */
.nova-social-share {
  position: relative;
  margin: 1.25rem 0 0;
  padding: 0;
  background: transparent;
  border: none;
}

.nova-social-share--tags-inline {
  margin: 0;
}

.nova-social-share--action-inline {
  margin: 0;
  display: inline-flex;
  align-items: center;
  align-self: center;
}

.nova-social-share--action-inline .nova-social-share__more-wrap--action {
  display: inline-flex;
  align-items: center;
}

.nova-social-share--action-inline .nova-social-share__trigger {
  min-width: 3.5rem;
}

.nova-social-share--action-inline .article-action__icon {
  color: var(--primary-color, #3b82f6);
  background: color-mix(in srgb, var(--primary-color, #3b82f6) 10%, #fff);
}

.nova-social-share--action-inline .nova-social-share__more-dropdown--action {
  left: 50%;
  right: auto;
  transform: translate(-50%, 0.75rem);
}

.nova-social-share--action-inline .nova-social-share__more-wrap--action:hover .nova-social-share__more-dropdown--action,
.nova-social-share--action-inline .nova-social-share__more-wrap--action:focus-within .nova-social-share__more-dropdown--action,
.nova-social-share--action-inline.is-more-open .nova-social-share__more-dropdown--action {
  transform: translate(-50%, 0);
}

.nova-social-share--action-inline.is-dropdown-suppressed .nova-social-share__more-dropdown--action,
.nova-social-share--action-inline.is-dropdown-suppressed .nova-social-share__more-wrap--action:hover .nova-social-share__more-dropdown--action,
.nova-social-share--action-inline.is-dropdown-suppressed .nova-social-share__more-wrap--action:focus-within .nova-social-share__more-dropdown--action {
  transform: translate(-50%, 0.75rem) !important;
}

.nova-social-share__bar {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.nova-social-share__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  width: 100%;
  min-width: 0;
  padding: 0.45rem 0.25rem;
  font-size: 0.6875rem;
  line-height: 1.25;
  text-align: center;
  color: var(--text-color, #374151);
  background: transparent;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease;
}

.nova-social-share__item span {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nova-social-share__item i {
  flex-shrink: 0;
  font-size: 1.125rem;
  line-height: 1;
  text-align: center;
}

.nova-social-share__item:hover {
  background: var(--gray-50, #f1f5f9);
}

.nova-social-share__item--compact {
  flex-direction: row;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border-radius: 50%;
}

.nova-social-share__item--compact:hover {
  background: var(--gray-100, #e2e8f0);
}

.nova-social-share__item--more i {
  color: var(--text-muted, #64748b);
  font-size: 1rem;
}

.nova-social-share__item--poster i { color: #07c160; }
.nova-social-share__item--wechat i { color: #07c160; }
.nova-social-share__item--wechat_moments i { color: #07c160; }
.nova-social-share__item--weibo i { color: #e6162d; }
.nova-social-share__item--qq i,
.nova-social-share__item--qzone i { color: #12b7f5; }
.nova-social-share__item--facebook i { color: #1877f2; }
.nova-social-share__item--twitter i { color: #0f172a; }
.nova-social-share__item--linkedin i { color: #0a66c2; }
.nova-social-share__item--telegram i { color: #26a5e4; }
.nova-social-share__item--whatsapp i { color: #25d366; }

.nova-social-share__more-wrap {
  position: relative;
  display: inline-flex;
}

.nova-social-share__more-dropdown {
  position: absolute;
  left: 50%;
  bottom: 100%;
  z-index: 40;
  padding-bottom: 0.5rem;
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 0.75rem);
  pointer-events: none;
  transition:
    opacity 0.28s ease,
    transform 0.28s ease,
    visibility 0.28s ease;
}

.nova-social-share__more-dropdown::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 0.5rem;
}

.nova-social-share__more-wrap:hover .nova-social-share__more-dropdown,
.nova-social-share__more-wrap:focus-within .nova-social-share__more-dropdown,
.nova-social-share.is-more-open .nova-social-share__more-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
  pointer-events: auto;
}

.nova-social-share--tags-inline .nova-social-share__more-dropdown {
  left: auto;
  right: 0;
  transform: translate(0, 0.75rem);
}

.nova-social-share--tags-inline .nova-social-share__more-wrap:hover .nova-social-share__more-dropdown,
.nova-social-share--tags-inline .nova-social-share__more-wrap:focus-within .nova-social-share__more-dropdown,
.nova-social-share--tags-inline.is-more-open .nova-social-share__more-dropdown {
  transform: translate(0, 0);
}

.nova-social-share__more-dropdown-inner {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.35rem;
  padding: 0.5rem;
  width: 15.75rem;
  max-width: min(15.75rem, calc(100vw - 2rem));
  background: #fff;
  border: 1px solid var(--gray-200, #e2e8f0);
  border-radius: var(--border-radius, 8px);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.12);
}

.nova-social-share__dropdown-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10040;
  background: rgba(15, 23, 42, 0.45);
  border: none;
  padding: 0;
  margin: 0;
  cursor: default;
}

@media (max-width: 767.98px), (hover: none) {
  .nova-social-share.is-more-open .nova-social-share__dropdown-backdrop {
    display: block;
  }
}

/* 海报弹窗打开时强制收起「更多」菜单 */
.nova-social-share.is-dropdown-suppressed .nova-social-share__more-dropdown,
.nova-social-share.is-dropdown-suppressed .nova-social-share__more-wrap:hover .nova-social-share__more-dropdown,
.nova-social-share.is-dropdown-suppressed .nova-social-share__more-wrap:focus-within .nova-social-share__more-dropdown {
  opacity: 0 !important;
  visibility: hidden !important;
  transform: translate(-50%, 0.75rem) !important;
  pointer-events: none !important;
}

.nova-social-share--tags-inline.is-dropdown-suppressed .nova-social-share__more-dropdown,
.nova-social-share--tags-inline.is-dropdown-suppressed .nova-social-share__more-wrap:hover .nova-social-share__more-dropdown,
.nova-social-share--tags-inline.is-dropdown-suppressed .nova-social-share__more-wrap:focus-within .nova-social-share__more-dropdown {
  transform: translate(0, 0.75rem) !important;
}

.nova-social-share__toast--global {
  position: fixed;
  top: 1.25rem;
  left: 50%;
  z-index: 10100;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: min(24rem, calc(100vw - 2rem));
  padding: 0.75rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.4;
  color: #065f46;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 999px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.14);
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%) translateY(calc(-100% - 0.75rem));
  transition:
    opacity 0.32s ease,
    transform 0.32s ease,
    visibility 0.32s ease;
}

.nova-social-share__toast--global.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.nova-social-share__toast--global.is-leaving {
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%) translateY(calc(-100% - 0.75rem));
}

.nova-social-share__toast--global.is-error {
  color: #991b1b;
  background: #fef2f2;
  border-color: #fecaca;
}

@media (max-width: 575.98px) {
  .nova-social-share__toast--global {
    top: 0.875rem;
    max-width: calc(100vw - 1.5rem);
    padding: 0.625rem 1rem;
    font-size: 0.8125rem;
  }
}

/* 弹窗：淡入 + 遮罩 + 内容上滑 */
.nova-share-modal,
.nova-share-wechat-modal {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.nova-share-modal.is-open,
.nova-share-wechat-modal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.nova-share-modal[hidden]:not(.is-open),
.nova-share-wechat-modal[hidden]:not(.is-open) {
  display: none !important;
}

.nova-share-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.nova-share-modal.is-open .nova-share-modal__backdrop,
.nova-share-wechat-modal.is-open .nova-share-modal__backdrop {
  opacity: 1;
}

.nova-share-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 420px);
  max-height: 92vh;
  overflow: auto;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
  opacity: 0;
  transform: translateY(1.25rem) scale(0.97);
  transition: opacity 0.32s ease, transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

.nova-share-modal.is-open .nova-share-modal__dialog,
.nova-share-wechat-modal.is-open .nova-share-wechat-modal__dialog {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.nova-share-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #e5e7eb;
}

.nova-share-modal__heading {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.nova-share-modal__close {
  width: 2rem;
  height: 2rem;
  padding: 0;
  color: #6b7280;
  background: transparent;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease;
}

.nova-share-modal__close:hover {
  color: #1f2937;
  background: #f3f4f6;
}

.nova-share-modal__dialog--poster {
  width: min(100%, 360px);
  max-height: none;
  overflow: visible;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
}

.nova-share-modal__dialog--poster.nova-share-modal__dialog {
  padding: 0;
}

.nova-share-modal__poster-actions {
  display: flex;
  justify-content: center;
  margin-top: 1rem;
}

.nova-share-modal__poster-actions .btn {
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.18);
}

.nova-share-poster-wrap {
  position: relative;
  display: block;
  margin: 0;
}

.nova-share-poster__close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  color: #fff;
  background: rgba(15, 23, 42, 0.45);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  backdrop-filter: blur(4px);
  transition: background 0.2s ease, transform 0.2s ease;
}

.nova-share-poster__close:hover {
  background: rgba(15, 23, 42, 0.65);
  transform: scale(1.05);
}

.nova-share-poster {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
}

.nova-share-poster__cover {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  flex-shrink: 0;
  overflow: hidden;
  background: #f1f5f9;
}

.nova-share-poster__cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 0 !important;
}

.nova-share-poster__cover-img[hidden],
.nova-share-poster__logo[hidden] {
  display: none !important;
}

.nova-share-poster__cover-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  color: #64748b;
  background: linear-gradient(145deg, #e2e8f0, #cbd5e1);
}

.nova-share-poster__cover-placeholder[hidden] {
  display: none !important;
}

.nova-share-poster__cover-meta {
  position: absolute;
  left: 0;
  bottom: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  max-width: calc(100% - 1.5rem);
  padding: 1.75rem 1rem 0.875rem;
}

.nova-share-poster__cover-meta:has(.nova-share-poster__weekday:empty):has(.nova-share-poster__date:empty) {
  display: none;
}

.nova-share-poster__weekday {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.3;
  color: #fff;
  margin-bottom: 0.25rem !important;
}

.nova-share-poster__weekday:empty {
  display: none;
}

.nova-share-poster__date {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.9);
}

.nova-share-poster__date:empty {
  display: none;
}

.nova-share-poster__body {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  padding: 1rem 1.125rem 1.125rem;
  background: #fff;
}

.nova-share-poster__title {
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.45;
  color: #0f172a;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 0rem !important;
  border-bottom:none !important;
  margin-bottom: 0rem !important;
  padding-bottom: 0rem !important;
}

.nova-share-poster__desc {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.55;
  color: #475569;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}

.nova-share-poster__desc:empty {
  display: none;
}

.nova-share-poster__title:empty {
  display: none;
}

.nova-share-poster__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.nova-share-poster__brand {
  display: flex;
  align-items: center;
  min-width: 0;
  flex: 1;
}

.nova-share-poster__logo {
  width: auto;
  height: 30px;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.nova-share-poster__qr-wrap {
  flex-shrink: 0;
}

.nova-share-poster__qr {
  width: 72px;
  height: 72px;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
}

.nova-share-poster__qr canvas,
.nova-share-poster__qr img {
  display: block;
  width: 100% !important;
  height: 100% !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.nova-share-wechat-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 320px);
  padding: 1.5rem 1.25rem 1.25rem;
  text-align: center;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
  opacity: 0;
  transform: translateY(1rem) scale(0.97);
  transition: opacity 0.32s ease, transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

.nova-share-wechat-modal__close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  color: #6b7280;
  background: transparent;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease;
}

.nova-share-wechat-modal__close:hover {
  color: #1f2937;
  background: #f3f4f6;
}

.nova-share-wechat-modal__title {
  margin: 0 2rem 0.75rem;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.5;
  color: #1f2937;
}

.nova-share-wechat-modal__hint {
  margin: 0 0 1rem;
  font-size: 0.875rem;
  color: #6b7280;
}

.nova-share-wechat-modal__qr {
  display: inline-flex;
  justify-content: center;
  padding: 0.75rem;
  background: #f8fafc;
  border-radius: 8px;
}

html.nova-share-scroll-lock,
body.nova-share-scroll-lock {
  overflow: hidden;
  overscroll-behavior: none;
}

body.nova-share-scroll-lock {
  position: fixed;
  left: 0;
  right: 0;
  width: 100%;
}

@media (max-width: 767.98px), (hover: none) {
  .nova-social-share:not(.nova-social-share--tags-inline):not(.nova-social-share--action-inline) {
    display: flex;
    justify-content: center;
  }

  .nova-social-share__more-wrap:hover .nova-social-share__more-dropdown,
  .nova-social-share__more-wrap:focus-within .nova-social-share__more-dropdown {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }

  .nova-social-share__more-dropdown {
    position: fixed;
    top: 50%;
    left: 50%;
    right: auto;
    bottom: auto;
    z-index: 10045;
    padding-bottom: 0;
    transform: translate(-50%, calc(-50% + 0.75rem));
  }

  .nova-social-share.is-more-open .nova-social-share__more-dropdown {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate(-50%, -50%);
  }

  .nova-social-share--tags-inline .nova-social-share__more-dropdown {
    left: 50%;
    right: auto;
  }

  .nova-social-share.is-dropdown-suppressed .nova-social-share__more-dropdown {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transform: translate(-50%, calc(-50% + 0.75rem)) !important;
  }

  .nova-social-share__dropdown-backdrop {
    touch-action: none;
  }
}

@media (max-width: 575.98px) {
  .nova-social-share__more-dropdown-inner {
    width: 14.25rem;
  }

  .nova-social-share__item {
    font-size: 0.625rem;
    padding: 0.4rem 0.15rem;
  }

  .nova-social-share__item i {
    font-size: 1rem;
  }

  .nova-social-share__item--compact {
    width: 1.875rem;
    height: 1.875rem;
  }

  .nova-share-modal,
  .nova-share-wechat-modal {
    align-items: center;
    justify-content: center;
    padding: 1rem;
    padding-bottom: max(1rem, env(safe-area-inset-bottom, 0px));
  }

  .nova-share-modal.is-open .nova-share-modal__dialog--poster,
  .nova-share-wechat-modal.is-open .nova-share-wechat-modal__dialog {
    max-height: calc(100dvh - 1.5rem - env(safe-area-inset-bottom, 0px));
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }

  .nova-share-wechat-modal.is-open .nova-share-wechat-modal__dialog {
    width: 100%;
    max-width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nova-social-share__more-dropdown,
  .nova-share-modal,
  .nova-share-wechat-modal,
  .nova-share-modal__backdrop,
  .nova-share-modal__dialog,
  .nova-share-wechat-modal__dialog {
    transition-duration: 0.01ms;
  }
}
