/* Chinese contact choice and approved WeChat account dialog. */
.blog-contact .wechat-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 9px 16px;
    border: 1px solid #17734c;
    border-radius: 4px;
    background: #17734c;
    color: #fff;
    font-size: 14.5px;
    font-weight: 600;
    letter-spacing: 0;
    cursor: pointer;
    transition: background-color .16s ease;
}
.blog-contact .editorial-contact-actions .wechat-action svg { color: inherit; width: 20px; height: 20px; }
.blog-contact .wechat-action:hover { background: #115a3b; }
.blog-contact button:focus-visible { outline: 2px solid #b51f2b; outline-offset: 3px; }
.article-main .blog-contact .editorial-contact-actions a[data-contact-channel="whatsapp"] {
    background: rgba(255,255,255,.88); border-color: #d8d6d6; color: #343137;
}
#blog-enquiry .contact-method {
    flex: 0 0 92px;
    min-width: 0;
    padding: 8px 10px;
    border-inline-end: 1px solid rgba(96, 101, 110, .18);
}
#blog-enquiry .contact-method select {
    min-height: 24px !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    line-height: 24px !important;
}
#blog-enquiry .contact-choice .enquiry-dial-code { flex-basis: 64px; }
#blog-enquiry label[for="blog-enquiry-wechat"] { color: #17734c; font-weight: 600; }
#blog-wechat-dialog {
    box-sizing: border-box;
    margin: auto;
    width: min(400px, calc(100% - 32px));
    max-height: calc(100dvh - 32px);
    padding: 32px;
    border: 1px solid #e0e2e4;
    border-radius: 8px;
    color: #161a22;
    background: #fff;
    text-align: center;
    overflow-y: auto;
    box-shadow: 0 20px 80px rgba(17,19,24,.2);
    letter-spacing: 0;
}
#blog-wechat-dialog button, #blog-wechat-dialog input { font-family: inherit; }
#blog-wechat-dialog button:focus-visible { outline: 2px solid #b51f2b; outline-offset: 3px; }
#blog-wechat-dialog [hidden] { display: none !important; }
#blog-wechat-dialog[open] { animation: wechat-enter .18s ease-out; }
#blog-wechat-dialog::backdrop { background: rgba(17,19,24,.42); }
#blog-wechat-dialog .wechat-close {
    position: absolute; top: 8px; right: 8px;
    display: grid; place-items: center;
    width: 36px; height: 36px;
    border: 0; border-radius: 4px;
    background: transparent; color: #60656e; cursor: pointer;
}
#blog-wechat-dialog .wechat-close:hover { background: #f2f3f4; }
#blog-wechat-dialog .wechat-close svg { width: 20px; height: 20px; }
#blog-wechat-dialog .wechat-dialog-brand { margin: 0 0 8px; font-size: 14px; font-weight: 600; color: #b51f2b; }
#blog-wechat-dialog h2 { margin: 0 0 22px; font-size: 24px; line-height: 1.4; }
.wechat-qr-frame {
    position: relative;
    width: min(288px, 100%);
    aspect-ratio: 1;
    margin: 0 auto 18px;
    overflow: hidden;
    background: #fff;
}
/* Display the 736px square at (194,258), retaining the QR's white quiet zone.
   The original 1125x1197 image is unchanged and is also the download target. */
.wechat-qr-frame img {
    position: absolute;
    width: 152.853261%;
    max-width: none;
    height: auto;
    left: -26.358696%;
    top: -35.054348%;
}
.wechat-id-row { font-size: 14px; text-align: left; }
.wechat-id-row label { display: block; margin-bottom: 6px; color: #60656e; }
.wechat-id-control { display: flex; align-items: center; min-width: 0; border: 1px solid #e0e2e4; border-radius: 4px; }
.wechat-id-control input { flex: 1; width: 0; min-width: 0; padding: 10px; border: 0; background: transparent; color: #252930; font: inherit; }
.wechat-id-control input:focus-visible { outline: 2px solid #17734c; outline-offset: 1px; }
.wechat-id-control button { display: grid; place-items: center; flex: 0 0 44px; width: 44px; height: 44px; border: 0; border-inline-start: 1px solid #e0e2e4; background: #f5f7f6; color: #17734c; cursor: pointer; }
.wechat-id-control button:disabled { cursor: wait; opacity: .6; }
.wechat-id-control svg { width: 18px; height: 18px; }
.wechat-id-control button:hover { background: #eaf2ed; }
#blog-wechat-account-note { margin: 12px 0 18px; font-size: 13px; line-height: 1.7; color: #60656e; }
#blog-wechat-copy-status { margin: 0 0 14px; font-size: 13px; line-height: 1.6; color: #17734c; }
#blog-wechat-copy-status[data-state="error"] { color: #b51f2b; }
.wechat-download { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; margin-bottom: 10px; border: 1px solid #17734c; border-radius: 4px; background: #17734c; color: #fff; font-size: 14px; text-decoration: none; }
.wechat-download svg { width: 18px; height: 18px; }
.wechat-download:hover { background: #115a3b; }
.wechat-download:focus-visible { outline: 2px solid #b51f2b; outline-offset: 3px; }
.wechat-dialog-back { min-height: 44px; width: 100%; border: 1px solid #d8d6d6; border-radius: 4px; background: #fff; color: #252930; cursor: pointer; font-size: 14px; }
.wechat-dialog-back:hover { background: #f4f5f6; }
@keyframes wechat-enter { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 420px) {
    .blog-contact .editorial-contact-actions .wechat-action { min-width: 0; padding-inline: 12px; }
    .blog-contact .editorial-contact-actions a[data-contact-channel="whatsapp"] { grid-column: auto; }
    #blog-wechat-dialog { padding: 32px 20px 24px; }
}
@media (prefers-reduced-motion: reduce) {
    #blog-wechat-dialog[open] { animation: none; }
    .blog-contact .wechat-action { transition: none; }
}
