/* ==========================================================================
   通用「弹窗登录 + 弹窗充值」组件样式（authpay.js 配套）
   适用：前台任意需要"提交前先登录/先充值"的页面，全程不跳页
   配色：沿用站点主色（tabler 蓝 #206bc4），与前台页面保持一致
   ========================================================================== */

.ap-mask {
    position: fixed;
    inset: 0;
    /* 必须高于 tabler/Bootstrap modal(1055) 与其遮罩(1050)，
       否则首页上传弹窗打开时充值层会被盖住；
       同时必须远低于 layer(19891014)，保证"隐私政策"用 layer 打开时能盖在弹窗之上
       （"忘记密码"已改为普通超链接，新标签页打开） */
    z-index: 1060;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(15, 23, 42, .45);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    overflow-y: auto;
}

.ap-card {
    position: relative;
    width: 100%;
    max-width: 400px;
    margin: auto;
    padding: 26px 24px 18px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 18px 48px rgba(15, 23, 42, .26);
    animation: apIn .2s ease-out;
}

@keyframes apIn {
    from { opacity: 0; transform: translateY(10px) scale(.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.ap-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: #8a94a6;
    background: #fff;
    border: 1px solid #eceff4;
    border-radius: 50%;
    cursor: pointer;
    transition: .15s;
}

.ap-close:hover { color: #4b5563; background: #f6f8fb; }

.ap-icon {
    width: 54px;
    height: 54px;
    margin: 4px auto 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    border-radius: 14px;
    background: linear-gradient(135deg, #206bc4 0%, #295dcf 100%);
    box-shadow: 0 10px 22px rgba(32, 107, 196, .26);
}

/* 充值弹窗图标：同色系偏青，和登录弹窗区分但不跳色 */
.ap-icon.ap-icon-pay {
    background: linear-gradient(135deg, #206bc4 0%, #32a5dd 100%);
    box-shadow: 0 10px 22px rgba(50, 165, 221, .26);
}

.ap-title {
    margin: 0 0 6px;
    font-size: 20px;
    font-weight: 700;
    text-align: center;
    color: #1f2937;
}

.ap-sub {
    margin: 0 0 18px;
    font-size: 13px;
    text-align: center;
    color: #9aa4b2;
}

.ap-label {
    display: block;
    margin: 0 0 6px;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
}

.ap-input-wrap { position: relative; margin-bottom: 14px; }

.ap-input {
    width: 100%;
    height: 44px;
    padding: 0 42px;
    font-size: 14px;
    color: #1f2937;
    background: #f8fafc;
    border: 1px solid #e6e9ef;
    border-radius: 10px;
    outline: none;
    transition: .15s;
}

.ap-input::placeholder { color: #b6bec9; }

.ap-input:focus {
    background: #fff;
    border-color: #206bc4;
    box-shadow: 0 0 0 3px rgba(32, 107, 196, .13);
}

.ap-input-icon {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    color: #a5adba;
    display: flex;
}

.ap-input-btn {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    padding: 8px;
    color: #a5adba;
    background: none;
    border: 0;
    cursor: pointer;
}

.ap-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: -2px 0 16px;
    font-size: 13px;
}

.ap-link { color: #206bc4; text-decoration: none; cursor: pointer; }
.ap-link:hover { color: #1a569d; text-decoration: underline; }

/* "忘记密码"用中性灰，右侧"注册账号"用主色 */
.ap-row .ap-link[data-ap="forget"] { color: #6b7280; }
.ap-row .ap-link[data-ap="forget"]:hover { color: #4b5563; }

.ap-btn-ghost {
    display: block;
    min-width: 168px;
    margin: 0 auto 14px;
    padding: 8px 18px;
    font-size: 13px;
    color: #4b5563;
    background: #fff;
    border: 1px solid #e6e9ef;
    border-radius: 22px;
    cursor: pointer;
    transition: .15s;
}

.ap-btn-ghost:hover { border-color: #a9c8e8; color: #1a569d; background: #f5f9fd; }
.ap-btn-ghost:disabled { opacity: .6; cursor: not-allowed; }

/* 登录面板里的「免注册直接使用」：独占一行的整宽按钮 */
.ap-btn-ghost.ap-btn-ghost-full {
    width: 100%;
    min-width: 0;
    height: 42px;
    margin: 0 0 10px;
    padding: 0 16px;
    font-size: 14px;
    border-radius: 10px;
}

/* 免注册成功后展示系统生成的随机账号 */
.ap-box {
    margin-bottom: 12px;
    padding: 10px 14px;
    background: #f8fafc;
    border: 1px solid #eef1f5;
    border-radius: 10px;
}

.ap-box-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 0;
    font-size: 13px;
}

.ap-box-row + .ap-box-row { border-top: 1px dashed #e2e8f0; }
.ap-box-row span { color: #9aa4b2; }
.ap-box-row b { font-size: 15px; color: #1f2937; letter-spacing: .3px; word-break: break-all; }

.ap-tip {
    margin: 0 0 16px;
    font-size: 12px;
    line-height: 1.7;
    color: #9aa4b2;
    text-align: center;
}

.ap-submit {
    width: 100%;
    height: 46px;
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    background: #206bc4;
    border: 0;
    border-radius: 10px;
    cursor: pointer;
    transition: .15s;
}

.ap-submit:hover:not(:disabled) { background: #1a569d; box-shadow: 0 8px 18px rgba(32, 107, 196, .26); }
.ap-submit:disabled { opacity: .6; cursor: not-allowed; }

.ap-submit.ap-submit-light {
    color: #4b5563;
    background: #fff;
    border: 1px solid #e6e9ef;
}

.ap-submit.ap-submit-light:hover:not(:disabled) { background: #f6f8fb; box-shadow: none; }

.ap-err {
    min-height: 18px;
    margin: 8px 0 0;
    font-size: 12px;
    color: #d63939;
    text-align: center;
}

.ap-foot {
    margin: 14px 0 0;
    font-size: 12px;
    line-height: 1.6;
    color: #a5adba;
    text-align: center;
}

.ap-foot .ap-link { font-size: 12px; color: #206bc4; }
.ap-foot .ap-link:hover { color: #1a569d; }

/* ---------------- 服务条款面板 ---------------- */
.ap-law {
    max-height: 320px;
    margin-bottom: 14px;
    padding: 12px 14px;
    font-size: 13px;
    line-height: 1.75;
    color: #4b5563;
    background: #f8fafc;
    border: 1px solid #eef1f5;
    border-radius: 10px;
    overflow-y: auto;
    word-break: break-word;
}

.ap-law img { max-width: 100%; height: auto; }
.ap-law table { width: 100%; border-collapse: collapse; }
.ap-law p { margin: 0 0 8px; }
.ap-law-loading { color: #9aa4b2; text-align: center; }

/* ---------------- 充值弹窗 ---------------- */
.ap-payinfo {
    display: flex;
    margin-bottom: 16px;
    padding: 12px 14px;
    background: #f8fafc;
    border-radius: 10px;
}

.ap-payinfo > div { flex: 1; text-align: center; }
.ap-payinfo > div + div { border-left: 1px dashed #e2e8f0; }
.ap-payinfo span { display: block; margin-bottom: 2px; font-size: 12px; color: #9aa4b2; }
.ap-payinfo b { font-size: 17px; color: #1f2937; }
.ap-payinfo b.ap-need { color: #d63939; }

.ap-quick { display: flex; flex-wrap: wrap; gap: 8px; margin: -4px 0 14px; }

.ap-quick button {
    flex: 1 1 auto;
    min-width: 68px;
    padding: 7px 10px;
    font-size: 13px;
    color: #4b5563;
    background: #f8fafc;
    border: 1px solid #e6e9ef;
    border-radius: 8px;
    cursor: pointer;
    transition: .15s;
}

.ap-quick button:hover { color: #1a569d; border-color: #a9c8e8; background: #f5f9fd; }

.ap-types { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }

.ap-types label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 8px 14px;
    font-size: 13px;
    color: #4b5563;
    background: #fff;
    border: 1px solid #e6e9ef;
    border-radius: 8px;
    cursor: pointer;
    transition: .15s;
}

.ap-types input { display: none; }

.ap-types label.is-active {
    color: #1a569d;
    background: #f2f7fc;
    border-color: #206bc4;
    box-shadow: 0 0 0 2px rgba(32, 107, 196, .12);
}

.ap-waiting { text-align: center; padding: 6px 0 4px; }

.ap-spinner {
    width: 34px;
    height: 34px;
    margin: 6px auto 14px;
    border: 3px solid #e6effa;
    border-top-color: #206bc4;
    border-radius: 50%;
    animation: apSpin .8s linear infinite;
}

@keyframes apSpin { to { transform: rotate(360deg); } }

.ap-waiting p { margin: 0 0 16px; font-size: 13px; color: #6b7280; }

@media (max-width: 575.98px) {
    .ap-card { padding: 22px 18px 16px; border-radius: 12px; }
    .ap-title { font-size: 19px; }
}
