.payment-recovery {
    box-sizing: border-box;
    position: fixed;
    inset: 0;
    width: min(420px, calc(100% - 28px));
    max-width: none;
    max-height: calc(100% - 28px);
    margin: auto;
    padding: clamp(20px, 6vw, 30px);
    border: 1px solid #dce6f2;
    border-radius: 22px;
    background: #fff;
    color: #17263b;
    color-scheme: light;
    box-shadow: 0 24px 88px #02081755;
}

.payment-recovery::backdrop { background: #030915ab; }

.payment-recovery-icon {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: #eaf2ff;
    color: #2358ac;
}

.payment-recovery-icon svg { width: 25px; height: 25px; }

.payment-recovery-close {
    position: absolute;
    top: 13px;
    right: 13px;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #51627a;
    cursor: pointer;
}

.payment-recovery-close:hover { background: #eef3f9; }
.payment-recovery-close svg { width: 20px; height: 20px; }

.payment-recovery h2 {
    margin: 13px 0 18px;
    color: #17263b;
    font-size: clamp(21px, 5vw, 25px);
    line-height: 1.3;
    font-weight: 700;
}

.payment-recovery-details {
    margin: 0;
    padding: 0 13px;
    border: 1px solid #e3eaf5;
    border-radius: 13px;
    background: #f5f8fc;
    font-size: 14px;
}

.payment-recovery-details > div {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    min-height: 43px;
}

.payment-recovery-details > div + div { border-top: 1px solid #e3eaf5; }
.payment-recovery-details dt { color: #4c607b; white-space: nowrap; }
.payment-recovery-details dd { min-width: 0; margin: 0; text-align: right; }
.payment-recovery-number { font: 600 13px/1.4 ui-monospace, Consolas, monospace; overflow-wrap: anywhere; }

.payment-recovery-channel {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 6px;
    background: #e8edf5;
    color: #415672;
    font-size: 13px;
    font-weight: 650;
}

.payment-recovery-channel[data-channel="wepay"] { background: #dcf5e8; color: #12613e; }
.payment-recovery-channel[data-channel="alipay"] { background: #e0edff; color: #164eac; }

.payment-recovery-status {
    display: flex;
    align-items: baseline;
    gap: 8px;
    min-height: 42px;
    margin: 15px 0 12px;
    color: #485d78;
    font-size: 14px;
    line-height: 1.5;
}

.payment-recovery-status::before {
    content: "";
    flex: 0 0 7px;
    height: 7px;
    border-radius: 50%;
    background: #8293a9;
    align-self: flex-start;
    margin-top: 7px;
}

.payment-recovery-status[data-state="checking"]::before { background: #245bc0; }
.payment-recovery-status:is([data-state="error"], [data-state="expired"])::before { background: #ae6823; }

.payment-recovery-actions { display: grid; gap: 9px; }
.payment-recovery [hidden] { display: none; }

.payment-recovery-actions > :is(button, a) {
    box-sizing: border-box;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid #d7e1f1;
    border-radius: 10px;
    background: #f6f9fe;
    color: #234a80;
    font: inherit;
    font-size: 14px;
    font-weight: 650;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
}

.payment-recovery-actions > :is(button, a):hover { background: #eaf2fe; }
.payment-recovery-actions > button:disabled { opacity: .62; cursor: default; }
.payment-recovery-actions > .payment-recovery-continue { border-color: #245bc0; background: #245bc0; color: #fff; }
.payment-recovery-actions > .payment-recovery-continue:hover { background: #1c4ca5; }
.payment-recovery :is(button, a):focus-visible { outline: 2px solid #225cbe; outline-offset: 2px; }
