/* WeCom acquisition card from the approved H5 package. */
.wechat-modal {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
  overflow: auto;
}

.wechat-modal__panel {
  display: flex;
  flex-direction: column;
  width: min(420px, 100%);
  max-height: calc(100svh - 32px);
  padding: 0;
  overflow: hidden;
}

.wechat-modal__body {
  overflow: auto;
  padding: 24px 28px 18px;
  -webkit-overflow-scrolling: touch;
}

.wechat-modal__eyebrow {
  margin: 0 0 6px;
  padding: 0 36px;
}

.wechat-modal h2 {
  margin-bottom: 6px;
  font-size: 26px;
}

.wechat-modal__desc {
  width: min(340px, 100%);
  margin-bottom: 14px;
  line-height: 1.45;
  font-weight: 600;
}

.wechat-qr {
  display: grid;
  place-items: center;
  width: 168px;
  aspect-ratio: 1;
  margin: 0 auto;
  color: #1b3762;
  background: #fff;
  border: 8px solid #fff;
  border-radius: 16px;
  box-shadow: 0 8px 18px rgba(39, 85, 145, 0.1), 0 0 0 1px #d5e7f6;
  overflow: hidden;
}

.wechat-qr img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fff;
}

.wechat-qr.has-image span {
  display: none;
}

.wechat-qr span {
  position: relative;
  z-index: 1;
  padding: 6px 12px;
  color: #fff;
  background: rgba(25, 119, 243, 0.94);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 950;
  box-shadow: 0 8px 18px rgba(25, 119, 243, 0.22);
}

.wechat-modal__button {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  margin: 0;
  padding: 10px 48px;
  color: #fff;
  background: #4cbcff;
  border: 0;
  border-radius: 999px;
  box-shadow: 0 12px 26px rgba(57, 163, 240, 0.22);
  font-size: 18px;
  font-weight: 800;
  line-height: 1.2;
  cursor: pointer;
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.22s ease;
}

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

.wechat-modal__button-label {
  position: relative;
  z-index: 1;
}

.wechat-modal__arrow {
  position: absolute;
  top: 0;
  right: 11px;
  bottom: 0;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  margin: auto 0;
  color: #fff;
  background: #1976d2;
  border-radius: 999px;
  pointer-events: none;
}

.wechat-modal__arrow-icon {
  display: block;
}

.wechat-modal__button::after {
  content: "";
  position: absolute;
  inset: -6px;
  border: 3px solid #c5dcff;
  border-radius: inherit;
  opacity: 0;
  pointer-events: none;
}

.wechat-modal__button:focus-visible {
  outline: none;
}

.wechat-modal.is-open .wechat-modal__button {
  animation: wechat-cta-enter 480ms cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
}

.wechat-modal.is-open .wechat-modal__arrow {
  animation: wechat-cta-nudge 1.8s cubic-bezier(0.45, 0, 0.55, 1) infinite;
}

.wechat-modal.is-open .wechat-modal__arrow-icon {
  animation: wechat-cta-flicker 1.8s ease-in-out infinite;
}

.wechat-modal__button.is-entered::after {
  animation: wechat-cta-ring 640ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.wechat-modal.is-open .wechat-modal__button:active {
  animation: none;
  box-shadow: 0 4px 10px rgba(57, 163, 240, 0.16);
  transform: scale(0.98);
}

.wechat-modal.is-open .wechat-modal__button:active .wechat-modal__arrow,
.wechat-modal.is-open .wechat-modal__button:active .wechat-modal__arrow-icon,
.wechat-modal.is-open .wechat-modal__button.is-activated .wechat-modal__arrow,
.wechat-modal.is-open .wechat-modal__button.is-activated .wechat-modal__arrow-icon {
  animation: none;
}

.wechat-modal__tip {
  max-width: 300px;
  margin: 12px auto 8px;
  color: #7b8ba8;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
}

body.modal-open .mobile-sticky-cta {
  visibility: hidden;
}

@keyframes wechat-cta-enter {
  from {
    transform: translateY(10px) scale(0.96);
  }

  to {
    transform: translateY(0) scale(1);
  }
}

@keyframes wechat-cta-ring {
  0% {
    opacity: 0.9;
    transform: scale(0.96);
  }

  100% {
    opacity: 0;
    transform: scale(1.07);
  }
}

@keyframes wechat-cta-nudge {
  0%,
  100% {
    transform: translateX(0);
  }

  35%,
  65% {
    transform: translateX(7px);
  }
}

@keyframes wechat-cta-flicker {
  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.8;
  }
}

@media (min-width: 641px) {
  .wechat-qr {
    width: 188px;
  }
}

@media (max-width: 640px) {
  .wechat-modal__body {
    padding: 24px 18px 18px;
  }

  .wechat-modal h2 {
    font-size: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .wechat-modal,
  .wechat-modal__panel,
  .wechat-modal__button {
    transition: none;
  }

  .wechat-modal.is-open .wechat-modal__button,
  .wechat-modal.is-open .wechat-modal__arrow,
  .wechat-modal.is-open .wechat-modal__arrow-icon,
  .wechat-modal__button.is-entered::after {
    animation: none;
  }
}

