.rhymc-wechat-modal[hidden],
.rhymc-wechat-modal [hidden] {
    display: none !important;
}

.rhymc-wechat-modal {
    position: fixed;
    z-index: 100000;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 20px;
    font-family: inherit;
}

.rhymc-wechat-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgb(20 31 46 / 58%);
}

.rhymc-wechat-modal__dialog {
    position: relative;
    width: min(100%, 380px);
    max-height: calc(100vh - 24px);
    padding: 28px 30px 22px;
    border: 1px solid #e4eaf0;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 22px 70px rgb(18 38 63 / 25%);
    overflow-y: auto;
    text-align: center;
}

.rhymc-wechat-modal__close {
    position: absolute;
    top: 12px;
    right: 14px;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #8491a3;
    font-size: 27px;
    line-height: 1;
    cursor: pointer;
}

.rhymc-wechat-modal__title {
    margin: 0 30px 8px;
    color: #253449;
    font-size: 21px;
    font-weight: 600;
}

.rhymc-wechat-modal__description {
    min-height: 22px;
    margin: 0 0 12px;
    color: #8491a3;
    font-size: 14px;
}

.rhymc-wechat-modal__qr-stage {
    display: grid;
    min-height: 410px;
    place-items: center;
    padding: 8px 0 12px;
}

.rhymc-wechat-modal__qr {
    display: grid;
    width: min(100%, 300px);
    height: 400px;
    place-items: center;
    overflow: hidden;
}

.rhymc-wechat-modal__qr iframe {
    display: block;
    width: 300px;
    max-width: 100%;
    height: 400px;
    border: 0;
}

.rhymc-wechat-modal__public-image {
    display: block;
    width: 230px;
    height: 230px;
    object-fit: contain;
}

.rhymc-wechat-modal__status {
    min-height: 21px;
    margin: 0;
    color: #718096;
    font-size: 14px;
    line-height: 1.5;
}

.rhymc-wechat-modal__status[data-state="error"] {
    color: #c53030;
}

.rhymc-wechat-modal__refresh {
    margin-top: 8px;
    padding: 4px 10px;
    border: 0;
    background: transparent;
    color: #287fd0;
    font: inherit;
    cursor: pointer;
}

.rhymc-wechat-modal__method-tabs {
    display: flex;
    width: max-content;
    max-width: 100%;
    margin: 10px auto 0;
    padding: 4px;
    border-radius: 28px;
    background: #f0f2f5;
}

.rhymc-wechat-modal__method-tab {
    min-width: 130px;
    padding: 10px 18px;
    border: 0;
    border-radius: 24px;
    background: transparent;
    color: #6e7784;
    font: inherit;
    font-size: 14px;
    cursor: pointer;
}

.rhymc-wechat-modal__method-tab[aria-selected="true"] {
    background: #fff;
    color: #16884b;
    font-weight: 600;
    box-shadow: 0 2px 8px rgb(25 45 70 / 12%);
}

.rhymc-wechat-modal__method-tab:focus-visible,
.rhymc-wechat-modal__close:focus-visible,
.rhymc-wechat-modal__refresh:focus-visible {
    outline: 2px solid #2699ed;
    outline-offset: 2px;
}

.rhymc-wechat-modal__footnote {
    margin: 14px 0 0;
    color: #9aa4b2;
    font-size: 12px;
    line-height: 1.5;
}

@media (max-width: 480px) {
    .rhymc-wechat-modal {
        padding: 12px;
    }

    .rhymc-wechat-modal__dialog {
        padding: 26px 18px 18px;
    }

    .rhymc-wechat-modal__qr-stage {
        min-height: 390px;
    }

    .rhymc-wechat-modal__qr {
        width: min(100%, 280px);
        height: 380px;
    }

    .rhymc-wechat-modal__qr iframe {
        width: 280px;
        height: 380px;
    }

    .rhymc-wechat-modal__method-tab {
        min-width: 118px;
        padding: 9px 12px;
        font-size: 13px;
    }
}
