/* V34.8 — WeChat widget true-centering + compact viewport
   The official WxLogin iframe is centered as a fixed 300x300 viewport.
   Internal widget whitespace is controlled through WxLogin's supported href CSS. */

.wechat-qr-stage{
  width:100%!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  padding:2px 0!important;
  box-sizing:border-box!important;
}

.wechat-qr-code{
  position:relative!important;
  width:300px!important;
  height:300px!important;
  min-width:300px!important;
  min-height:300px!important;
  max-width:300px!important;
  max-height:300px!important;
  margin:0 auto!important;
  padding:0!important;
  overflow:hidden!important;
  border:1px solid #d9e6f5!important;
  border-radius:18px!important;
  background:#fff!important;
  box-shadow:0 10px 28px rgba(42,97,159,.08)!important;
  display:flex!important;
  align-items:flex-start!important;
  justify-content:center!important;
  box-sizing:border-box!important;
}

.wechat-qr-code>div{
  position:relative!important;
  width:300px!important;
  height:300px!important;
  min-width:300px!important;
  min-height:300px!important;
  margin:0 auto!important;
  padding:0!important;
  overflow:hidden!important;
  display:flex!important;
  align-items:flex-start!important;
  justify-content:center!important;
  box-sizing:border-box!important;
}

/* Do not scale the cross-origin iframe. Give it the exact same viewport
   as the visible card so QR and quick-login states share one centered box. */
.wechat-qr-code iframe{
  position:absolute!important;
  top:0!important;
  left:50%!important;
  width:300px!important;
  height:300px!important;
  min-width:300px!important;
  min-height:300px!important;
  max-width:300px!important;
  max-height:300px!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  transform:translateX(-50%)!important;
  transform-origin:50% 0!important;
  display:block!important;
}

.wechat-qr-code img,
.wechat-qr-code canvas{
  display:block!important;
  width:250px!important;
  height:250px!important;
  max-width:250px!important;
  max-height:250px!important;
  margin:24px auto!important;
  object-fit:contain!important;
}

.wechat-qr-loading{
  width:100%!important;
  height:100%!important;
  min-height:0!important;
  display:grid!important;
  place-items:center!important;
  padding:20px!important;
  box-sizing:border-box!important;
  text-align:center!important;
}

.wechat-qr-status{
  margin:12px auto 0!important;
}
.wechat-qr-actions{
  margin-top:12px!important;
}

@media(max-width:620px){
  .wechat-qr-code,
  .wechat-qr-code>div{
    width:280px!important;
    height:292px!important;
    min-width:280px!important;
    min-height:292px!important;
    max-width:280px!important;
    max-height:292px!important;
  }
  .wechat-qr-code iframe{
    width:280px!important;
    height:292px!important;
    min-width:280px!important;
    min-height:292px!important;
    max-width:280px!important;
    max-height:292px!important;
  }
  .wechat-qr-code img,
  .wechat-qr-code canvas{
    width:236px!important;
    height:236px!important;
    max-width:236px!important;
    max-height:236px!important;
    margin:22px auto!important;
  }
}
