/**
 * 会员登录页（member-login）专用样式
 * 覆盖：登录方式切换、图形验证码、短信验证码锁定态、密码眼睛图标、协议/隐私政策弹窗
 * 仅本页引用，不影响其它页面。
 */

/* ===== 登录方式切换 ===== */
.auth-tab {
    background: none;
    border: 0;
    cursor: pointer;
    font-family: inherit;
}

/* 隐藏未选中的登录方式（覆盖 .auth-form 的 display） */
.auth-form[hidden] {
    display: none !important;
}

/* ===== 图形验证码（示例） ===== */
.captcha-box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 112px;
    height: 46px;
    padding: 0 14px;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 5px;
    font-style: italic;
    color: #0a326c;
    background: linear-gradient(135deg, #eef5ff 0%, #dbeafe 100%);
    border: 1px solid #c9ddf5;
    border-radius: 8px;
    text-decoration: line-through;
    user-select: none;
    cursor: pointer;
}

/* 短信验证码未解锁状态 */
.field-locked {
    opacity: .6;
}

.field-locked input {
    background: #f3f5f8;
}

/* 图形验证码通过提示 */
.captcha-ok {
    display: none;
    font-size: 12px;
    color: #1b8a3f;
}

.captcha-ok.show {
    display: block;
}

/* ===== 密码框内右侧：眼睛图标（睁眼 / 闭眼） ===== */
.pwd-wrap {
    position: relative;
}

.pwd-wrap input {
    padding-right: 48px;
}

.pwd-eye {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    background: none;
    border: 0;
    border-radius: 6px;
    cursor: pointer;
    color: #8a97ab;
    transition: color .2s, background .2s;
}

.pwd-eye:hover {
    color: var(--primary-blue, #0d47a1);
    background: rgba(25, 118, 210, .08);
}

.pwd-eye svg {
    width: 19px;
    height: 19px;
}

.pwd-eye .eye-off { display: none; }
.pwd-eye.is-on .eye-open { display: none; }
.pwd-eye.is-on .eye-off { display: block; }

/* 忘记密码 */
.auth-extra {
    display: flex;
    justify-content: flex-end;
    font-size: 13px;
}

.auth-extra a {
    color: var(--accent-blue, #1976d2);
    text-decoration: none;
}

/* ===== 协议 / 隐私政策 弹窗 ===== */
.auth-tip .doc-link {
    color: var(--accent-blue, #1976d2);
    text-decoration: none;
}

.auth-tip .doc-link:hover {
    text-decoration: underline;
}

.doc-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.doc-modal[hidden] {
    display: none !important;
}

.doc-modal-mask {
    position: absolute;
    inset: 0;
    background: rgba(8, 24, 48, .55);
    backdrop-filter: blur(2px);
}

.doc-modal-panel {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 760px;
    max-height: 82vh;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 30px 70px rgba(6, 32, 71, .35);
}

.doc-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 24px;
    color: #fff;
    background: linear-gradient(135deg, #0a326c 0%, #1976d2 100%);
}

.doc-modal-head h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.doc-modal-close {
    background: none;
    border: 0;
    color: #fff;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    opacity: .85;
}

.doc-modal-close:hover {
    opacity: 1;
}

.doc-modal-body {
    /* 关键：允许正文独立滚动，标题栏与底部按钮固定 */
    flex: 1 1 auto;
    min-height: 0;
    padding: 22px 24px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    font-size: 14px;
    line-height: 1.9;
    color: #33425a;
}

.doc-modal-body h4 {
    margin: 18px 0 8px;
    font-size: 15px;
    color: #0a326c;
}

.doc-modal-body h4:first-child {
    margin-top: 0;
}

.doc-modal-body p {
    margin: 0 0 10px;
}

.doc-modal-body ol,
.doc-modal-body ul {
    margin: 0 0 10px;
    padding-left: 22px;
}

.doc-modal-body li {
    margin-bottom: 6px;
}

.doc-modal-note {
    margin-bottom: 16px;
    padding: 10px 14px;
    font-size: 13px;
    color: #8a5a00;
    background: #fff8e6;
    border: 1px solid #ffe0a3;
    border-radius: 8px;
}

.doc-modal-foot {
    padding: 14px 24px 20px;
    text-align: right;
    border-top: 1px solid #eef2f7;
}

.doc-modal-btn {
    height: 40px;
    padding: 0 28px;
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #0d47a1 0%, #1976d2 100%);
    border: 0;
    border-radius: 8px;
    cursor: pointer;
}

/* 文档内容源：后台可直接渲染/编辑，平时不显示 */
.doc-source {
    display: none;
}

/* 弹窗内表单提示 */
.doc-modal-msg {
    display: none;
    margin-top: 14px;
    padding: 10px 14px;
    font-size: 13px;
    line-height: 1.7;
    border-radius: 8px;
}

.doc-modal-msg.show { display: block; }
.doc-modal-msg.error { color: #c62828; background: #fff5f5; border: 1px solid #f5c6cb; }
.doc-modal-msg.success { color: #1b5e20; background: #f1f8f2; border: 1px solid #b7dfbe; }

/* ===== 弹窗内的表单（重置密码） ===== */
.doc-modal-body .field {
    margin-bottom: 16px;
}

.doc-modal-body .field:last-child {
    margin-bottom: 0;
}

.doc-modal-body .field-code {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    align-items: stretch;
}

.doc-modal-body .btn-code {
    padding: 0 16px;
    font-size: 13px;
    white-space: nowrap;
}

.doc-modal-body .field.invalid .err-msg {
    display: block;
}

/* ===== 移动端适配（与 auth.css 断点一致：760px） ===== */
@media (max-width: 760px) {
    /* 登录方式切换：两个 Tab 紧凑排布 */
    .auth-tabs {
        gap: 18px;
        margin-bottom: 20px;
    }

    .auth-tab {
        font-size: 16px;
        padding-bottom: 12px;
    }

    /* 验证码行：缩小图形验证码，保证输入框可用宽度 */
    .field-code {
        gap: 10px;
    }

    .captcha-box {
        min-width: 92px;
        height: 46px;
        padding: 0 10px;
        font-size: 18px;
        letter-spacing: 3px;
    }

    .field-code input {
        min-width: 0;
        font-size: 15px;
    }

    /* “获取验证码 / 60 秒后重发”按钮：保证完整显示不换行 */
    .btn-code {
        padding: 0 14px;
        font-size: 13px;
        white-space: nowrap;
    }

    .auth-extra {
        font-size: 12px;
    }

    /* 弹窗：接近满屏，正文可上下滑动查看全部 */
    .doc-modal {
        padding: 10px;
        align-items: center;
    }

    .doc-modal-panel {
        max-height: 90vh;
        border-radius: 14px;
    }

    .doc-modal-head {
        padding: 16px 18px;
    }

    .doc-modal-head h3 {
        font-size: 16px;
    }

    .doc-modal-close {
        font-size: 24px;
        padding: 0 4px;
    }

    .doc-modal-body {
        padding: 16px 18px;
        font-size: 13.5px;
        line-height: 1.85;
    }

    .doc-modal-body h4 {
        margin: 16px 0 6px;
        font-size: 14px;
    }

    .doc-modal-foot {
        padding: 12px 18px 16px;
    }

    .doc-modal-btn {
        width: 100%;
        height: 44px;
    }
}
