/* Article-level WeChat QR sharing. Kept separate so the widget stays reusable. */
.wechat-share-entry {
  display: flex;
  align-items: center;
  margin-top: 18px;
}

.wechat-share-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 9px 15px;
  border: 1px solid #b9e9cb;
  border-radius: 999px;
  background: #f1fbf5;
  color: #087c3e;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, transform .15s ease;
}

.wechat-share-trigger:hover {
  background: #e5f7ec;
  border-color: #77d69a;
}

.wechat-share-trigger:active {
  transform: translateY(1px);
}

.wechat-share-trigger:focus-visible,
.wechat-share-close:focus-visible,
.wechat-share-copy:focus-visible {
  outline: 3px solid rgba(7, 193, 96, .35);
  outline-offset: 3px;
}

.wechat-share-trigger svg {
  width: 21px;
  height: 21px;
  flex: 0 0 21px;
  fill: currentColor;
}

.wechat-share-trigger svg circle {
  fill: #fff;
}

.wechat-share-trigger svg .wechat-share-bubble {
  fill: #f1fbf5;
  stroke: currentColor;
  stroke-width: 1.35;
  stroke-linejoin: round;
}

.wechat-share-trigger svg .wechat-share-eye {
  fill: currentColor;
}

.wechat-share-overlay[hidden] {
  display: none !important;
}

.wechat-share-overlay:not([hidden]) {
  position: fixed;
  z-index: 10000;
  inset: 0;
  display: grid;
  place-items: center;
  overflow-y: auto;
  padding: 20px;
  background: rgba(14, 25, 35, .58);
}

.wechat-share-dialog {
  box-sizing: border-box;
  width: min(100%, 440px);
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  padding: 24px;
  border: 1px solid rgba(20, 40, 55, .08);
  border-radius: 20px;
  background: #fff;
  color: #1d2935;
  box-shadow: 0 22px 70px rgba(0, 0, 0, .22);
}

.wechat-share-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.wechat-share-heading h2 {
  margin: 0;
  font-size: 1.22rem;
  line-height: 1.35;
}

.wechat-share-close {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #f1f4f6;
  color: #405160;
  font: inherit;
  font-size: 27px;
  line-height: 1;
  cursor: pointer;
}

.wechat-share-instructions {
  margin: 14px 0 18px;
  color: #526271;
  font-size: .94rem;
  line-height: 1.65;
}

.wechat-share-code {
  display: grid;
  place-items: center;
  box-sizing: border-box;
  width: 248px;
  min-height: 248px;
  max-width: 100%;
  margin: 0 auto 14px;
  padding: 11px;
  overflow: hidden;
  border: 1px solid #e5ebef;
  border-radius: 14px;
  background: #fff;
  color: #526271;
  text-align: center;
  overflow-wrap: anywhere;
}

.wechat-share-code canvas,
.wechat-share-code img {
  display: block;
  max-width: 100%;
  height: auto;
}

.wechat-share-url {
  margin: 0;
  color: #687887;
  font-size: .8rem;
  line-height: 1.45;
  text-align: center;
  overflow-wrap: anywhere;
}

.wechat-share-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 18px;
}

.wechat-share-copy {
  min-height: 40px;
  padding: 8px 15px;
  border: 0;
  border-radius: 999px;
  background: #07c160;
  color: #fff;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}

.wechat-share-copy:hover {
  background: #06a953;
}

.wechat-share-copy-status {
  min-height: 1.4em;
  color: #087c3e;
  font-size: .88rem;
}

@media (max-width: 480px) {
  .wechat-share-overlay:not([hidden]) {
    padding: 14px;
  }
  .wechat-share-dialog {
    max-height: calc(100vh - 28px);
    padding: 20px 16px;
    border-radius: 16px;
  }
  .wechat-share-code {
    width: 232px;
    min-height: 232px;
  }
}
