/* ====================================================================
   站内支付弹层样式（配合 /js/paylayer.js）
   —— 所有类名统一 payx- 前缀，避免污染前台既有样式。
   布局：头部（品牌 / 金额 / 状态 / 关闭） + 左侧支付方式选项卡 + 右侧内容 + 底部提示
   ==================================================================== */

.payx-mask {
    position: fixed;
    inset: 0;
    z-index: 2147483000;
    background: rgba(15, 23, 41, .58);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC",
                 "Hiragino Sans GB", Roboto, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #1f2937;
    text-align: left;
    animation: payxFade .16s ease-out;
}

@keyframes payxFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes payxUp {
    from { opacity: 0; transform: translateY(14px) scale(.985); }
    to   { opacity: 1; transform: none; }
}

.payx-panel {
    width: 100%;
    max-width: 760px;
    max-height: calc(100vh - 36px);
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 30px 70px -24px rgba(4, 10, 25, .7), 0 0 0 1px rgba(15, 23, 41, .06);
    animation: payxUp .22s cubic-bezier(.2, .8, .3, 1);
}

/* ---------------- 头部 ---------------- */
.payx-head {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    background: linear-gradient(135deg, #0f1729 0%, #1b2540 100%);
    color: #fff;
}

.payx-mark {
    width: 30px; height: 30px; flex: 0 0 30px;
    border-radius: 9px;
    background: linear-gradient(135deg, #4f6bff 0%, #7c5cff 100%);
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 12px; letter-spacing: .3px;
    box-shadow: 0 6px 16px -6px rgba(79, 107, 255, .9);
}

.payx-title { font-size: 14px; font-weight: 700; }

.payx-amount {
    margin-left: auto;
    font-size: 13px;
    color: #9fb0d0;
}
.payx-amount b { font-size: 18px; color: #fff; font-weight: 800; letter-spacing: .2px; }

.payx-state {
    font-size: 12px;
    padding: 3px 10px;
    border-radius: 999px;
    color: #9fb0d0;
    background: rgba(255, 255, 255, .08);
    white-space: nowrap;
}
.payx-state.is-ok   { color: #5ee2a8; background: rgba(18, 160, 106, .18); }
.payx-state.is-warn { color: #ffcf7a; background: rgba(210, 140, 20, .2); }

.payx-close {
    width: 28px; height: 28px; flex: 0 0 28px;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 8px;
    background: transparent;
    color: #c8d3e8;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
}
.payx-close:hover { background: rgba(255, 255, 255, .12); color: #fff; }

/* ---------------- 主体：左选项卡 + 右内容 ---------------- */
.payx-main {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    align-items: stretch;
}

.payx-rail {
    flex: 0 0 100px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px 10px;
    background: #f7f9ff;
    border-right: 1px solid #eef1f6;
}

.payx-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 12px 4px 10px;
    border: 1px solid #e3e9f5;
    border-radius: 12px;
    background: #fff;
    color: #55607a;
    font-size: 12px;
    line-height: 1.2;
    font-family: inherit;
    cursor: pointer;
    transition: border-color .15s, background .15s, box-shadow .15s;
}
.payx-tab:hover { border-color: #bcd3ff; }
.payx-tab.is-active {
    border-color: #1677ff;
    background: #f0f6ff;
    color: #1677ff;
    font-weight: 700;
    box-shadow: 0 8px 18px -12px rgba(22, 119, 255, .95);
}

.payx-tab-logo {
    width: 30px; height: 30px;
    border-radius: 9px;
    display: flex; align-items: center; justify-content: center;
    color: #fff;
    font-size: 14px;
    font-weight: 800;
}
.payx-tab-logo.is-alipay { background: linear-gradient(135deg, #2b9bff, #1677ff); }
.payx-tab-logo.is-wechat { background: linear-gradient(135deg, #3ada7f, #07c160); }

.payx-tab-name { white-space: nowrap; }

.payx-tab-badge {
    font-size: 10px;
    font-weight: 400;
    padding: 1px 5px;
    border-radius: 999px;
    background: #eef1f6;
    color: #98a2b3;
}

.payx-stage {
    flex: 1 1 auto;
    min-width: 0;
    /* 淡渐变打底：二维码四周本来就是大片留白，给点颜色就不显得空 */
    background:
        radial-gradient(115% 82% at 50% -12%, #ffffff 0%, #f7faff 34%, #eef4ff 62%, #e6efff 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 20px 16px;
}

/* 电脑：白色圆角卡片里嵌支付宝「仅一个二维码」页面，整体居中 */
.payx-qrbox {
    width: 320px;
    height: 320px;
    max-width: 100%;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 16px 34px -20px rgba(22, 119, 255, .62), 0 0 0 1px rgba(22, 119, 255, .09);
}

.payx-frame {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    background: #fff;
}

/* 手动的「转为手机 / 电脑支付」——故意做小，不抢二维码的视觉重心 */
.payx-switch {
    border: 0;
    background: transparent;
    padding: 2px 6px;
    color: #7787a3;
    font-family: inherit;
    font-size: 12px;
    line-height: 1.5;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: rgba(119, 135, 163, .5);
}
.payx-switch:hover { color: #1677ff; text-decoration-color: currentColor; }

/* ---------------- 居中内容块（手机按钮 / 微信占位 / 成功态） ---------------- */
.payx-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 30px 24px 34px;
}

.payx-ct { font-size: 17px; font-weight: 800; color: #0f1729; }
.payx-cs { font-size: 13px; color: #6b7280; margin-top: 8px; }
.payx-cs b { color: #0f1729; }
.payx-ctip { margin-top: 10px; font-size: 12px; color: #98a2b3; }

.payx-cbtn {
    margin-top: 20px;
    width: 100%;
    max-width: 300px;
    padding: 14px 18px;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, #2b9bff, #0a5fd6);
    color: #fff;
    font-family: inherit;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 14px 26px -14px rgba(22, 119, 255, 1);
}
.payx-cbtn:hover { filter: brightness(1.05); }
.payx-cbtn:disabled { opacity: .7; cursor: default; filter: none; }

.payx-cbtn.is-ghost {
    background: #fff;
    color: #1677ff;
    border: 1px solid #cfe0ff;
    box-shadow: none;
}

/* ---------------- 支付成功态 ---------------- */
.payx-check {
    width: 58px; height: 58px;
    border-radius: 50%;
    background: rgba(18, 160, 106, .1);
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 12px;
}
.payx-check svg {
    width: 30px; height: 30px;
    fill: none; stroke: #12a06a; stroke-width: 2.6;
    stroke-linecap: round; stroke-linejoin: round;
}

/* ---------------- 底部 ---------------- */
.payx-foot {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 9px 14px;
    border-top: 1px solid #eef1f6;
    background: #fafbff;
    font-size: 12px;
    color: #8b94a6;
}
.payx-foot a { color: #4f6bff; text-decoration: none; }
.payx-foot a:hover { text-decoration: underline; }

/* ---------------- 页面顶部的轻提示 ---------------- */
.payx-toast {
    position: fixed;
    left: 50%;
    top: 22px;
    transform: translateX(-50%);
    z-index: 2147483600;
    background: #12a06a;
    color: #fff;
    padding: 11px 22px;
    border-radius: 999px;
    font: 700 14px/1.4 -apple-system, BlinkMacSystemFont, "Microsoft YaHei", "PingFang SC", sans-serif;
    box-shadow: 0 12px 28px -10px rgba(18, 160, 106, .9);
}

/* ---------------- 小屏：贴底抽屉式 ---------------- */
@media (max-width: 640px) {
    .payx-mask { padding: 0; align-items: flex-end; }
    .payx-panel { max-width: none; border-radius: 16px 16px 0 0; max-height: 94vh; }

    .payx-amount b { font-size: 16px; }
    .payx-state { display: none; }

    /* 手机上选项卡竖排、窄一点，内容区留给按钮 */
    .payx-rail { flex: 0 0 82px; padding: 10px 8px; gap: 6px; }
    .payx-tab { padding: 10px 2px 8px; border-radius: 10px; }
    .payx-tab-logo { width: 26px; height: 26px; border-radius: 8px; font-size: 12px; }
    .payx-tab-name { font-size: 11px; }
    .payx-tab-badge { font-size: 9px; padding: 0 4px; }

    .payx-stage { padding: 16px 12px; gap: 10px; }
    .payx-qrbox { width: 268px; height: 268px; border-radius: 14px; }

    .payx-center { padding: 24px 16px 28px; }
    .payx-ct { font-size: 16px; }
    .payx-cbtn { margin-top: 16px; padding: 13px 16px; font-size: 15px; }
    .payx-switch { font-size: 11px; }
}
