.cnv-wechat-modal[hidden] {
  display: none;
}

.cnv-wechat-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px;
}

.cnv-wechat-modal__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(3, 12, 25, .72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: default;
}

.cnv-wechat-modal__panel {
  position: relative;
  z-index: 1;
  width: min(420px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  padding: 28px;
  border: 1px solid rgba(29, 67, 112, .16);
  border-radius: 8px;
  color: #0f2340;
  background: #fff;
  box-shadow: 0 28px 80px rgba(3, 12, 25, .38);
  text-align: center;
}

.cnv-wechat-modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid #dbe5ef;
  border-radius: 6px;
  color: #153556;
  background: #f6f9fc;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.cnv-wechat-modal__panel h2 {
  margin: 0 40px 8px;
  color: #0b2342;
  font-size: 25px;
  line-height: 1.25;
  letter-spacing: 0;
}

.cnv-wechat-modal__panel p {
  max-width: 330px;
  margin: 0 auto 18px;
  color: #53647e;
  font-size: 14px;
  line-height: 1.7;
}

.cnv-wechat-modal__qr {
  display: block;
  width: min(220px, 80vw);
  height: auto;
  aspect-ratio: 1;
  margin: 0 auto 18px;
  border: 1px solid #dbe5ef;
  border-radius: 8px;
  object-fit: contain;
  background: #fff;
}

.cnv-wechat-modal__id {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 14px;
  padding: 11px 13px;
  border: 1px solid #dce7f1;
  border-radius: 7px;
  color: #31506f;
  background: #f5f9fc;
  font-size: 13px;
  text-align: left;
}

.cnv-wechat-modal__id strong {
  color: #0b2342;
  font-size: 14px;
  white-space: nowrap;
}

.cnv-wechat-modal__copy,
.cnv-wechat-inline,
.cnv-footer-wechat,
.cnv-section-wechat button {
  font: inherit;
}

.cnv-wechat-modal__copy {
  width: 100%;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid #66b53f;
  border-radius: 7px;
  color: #071d0c;
  background: linear-gradient(135deg, #8bd65d, #66b53f);
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

.cnv-wechat-inline {
  cursor: pointer;
}

.cnv-footer-wechat {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  font-size: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.cnv-wechat-fab {
  position: fixed;
  left: 26px;
  bottom: 86px;
  z-index: 94;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 112px;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid rgba(116, 201, 73, .48);
  border-radius: 999px;
  color: #fff;
  background: rgba(7, 31, 55, .94);
  box-shadow: 0 12px 34px rgba(3, 13, 26, .28);
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.cnv-wechat-fab:hover,
.cnv-wechat-inline:hover,
.cnv-footer-wechat:hover {
  border-color: #79c64d;
  color: #79c64d;
}

.cnv-section-wechat {
  display: flex;
  justify-content: center;
  margin-top: 24px;
}

.cnv-section-wechat button {
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid #b7c9dd;
  border-radius: 7px;
  color: #123b67;
  background: #fff;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

body.cnv-modal-open {
  overflow: hidden;
}

@media (max-width: 768px) {
  .cnv-wechat-modal {
    padding: 16px;
  }

  .cnv-wechat-modal__panel {
    width: min(100%, 390px);
    padding: 24px 18px 20px;
  }

  .cnv-wechat-modal__panel h2 {
    font-size: 22px;
  }

  .cnv-wechat-fab {
    display: none;
  }

  .cnv-section-wechat button {
    width: 100%;
  }
}
