/* css/login-modal.css —— 登录 / 注册弹层（阶段 E2a，配合 js/login-modal.js）
 *
 * 视觉语言照抄 css/side-drawer.css 里 .sd-modal 那一套（白卡片 + 14px 圆角 + 同款阴影），
 * 保证左侧抽屉和登录弹层看起来是同一个站的东西。类名统一用 .lm- 前缀，
 * 不复用 .sd-* —— 那是抽屉专用，撞车会让抽屉样式跟着变。
 */

.lm-mask {
    position: fixed;
    inset: 0;
    z-index: 10010;              /* 高于抽屉与「关于」弹层（都是 10000） */
    background: rgba(0, 0, 0, .45);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s ease, visibility .2s ease;
}

.lm-mask.is-open {
    opacity: 1;
    visibility: visible;
}

.lm-card {
    position: relative;
    width: 100%;
    max-width: 391px;           /* 与 .sd-modal 同宽 */
    background: #ffffff;
    border-radius: 14px;
    padding: 22px 20px 20px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, .2);
    max-height: calc(100vh - 40px);
    overflow-y: auto;
}

.lm-close {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #adb5bd;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.lm-close:hover {
    background: #f1f3f5;
}

.lm-title {
    font-size: 17px;
    font-weight: 600;
    color: #212529;
    /* 2026-10-11：原先标题与第一个字段之间的间距是被删掉的 .lm-hint
       （margin: 6px 0 12px）撑起来的，条删掉后只剩 4px，标题和「手机号」贴得太近。
       这里补上这段间距，与 .lm-field 的 14px 呼应。 */
    margin-bottom: 16px;
}

.lm-title-sep {
    color: #adb5bd;
    font-weight: 400;
}

.lm-field {
    margin-bottom: 14px;
}

.lm-label {
    display: block;
    margin-bottom: 5px;
    font-size: 13px;
    color: #495057;
}

.lm-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ced4da;
    border-radius: 8px;
    font-size: 15px;
    line-height: 1.4;
    color: #212529;
    background: #fff;
}

/* iOS 上字号 <16px 会触发聚焦缩放，手机端看着像"页面被放大" */
.lm-input:focus {
    outline: none;
    border-color: #86b7fe;
    box-shadow: 0 0 0 3px rgba(13, 110, 253, .15);
}

.lm-code-row {
    display: flex;
    gap: 8px;
}

.lm-code-input {
    flex: 1 1 auto;
    min-width: 0;
    font-variant-numeric: tabular-nums;
    letter-spacing: 1px;
}

.lm-send {
    flex: none;
    min-width: 116px;
    padding: 0 12px;
    border: 1px solid #0d6efd;
    border-radius: 8px;
    background: #fff;
    color: #0d6efd;
    font-size: 13.5px;
    white-space: nowrap;
    cursor: pointer;
}

.lm-send:disabled {
    border-color: #ced4da;
    color: #adb5bd;
    background: #f8f9fa;
    cursor: default;
}

.lm-msg {
    min-height: 20px;
    margin: -2px 0 10px;
    font-size: 12.5px;
    line-height: 1.6;
    color: #868e96;
}

.lm-msg.is-err {
    color: #dc3545;
}

.lm-msg.is-ok {
    color: #198754;
}

.lm-submit {
    display: block;
    width: 100%;
    padding: 11px 0;
    border: 0;
    border-radius: 8px;
    background: #0d6efd;
    color: #fff;
    font-size: 15.5px;
    cursor: pointer;
}

.lm-submit:disabled {
    background: #9ec1ff;
    cursor: default;
}

.lm-submit:active:not(:disabled) {
    background: #0a58ca;
}

.lm-foot {
    margin-top: 12px;
    text-align: center;
    font-size: 12px;
    line-height: 1.6;
    color: #868e96;
}

.lm-foot i {
    color: #fd7e14;
}

.lm-agree {
    margin-top: 8px;
    text-align: center;
    font-size: 12px;
    line-height: 1.6;
    color: #868e96;
}
.lm-agree a {
    color: #0d6efd;
    text-decoration: none;
}
.lm-agree a:hover {
    text-decoration: underline;
}

/* 矮屏（如 iPhone SE）压紧间距，避免登录按钮被挤到要滚动才看得到 */
@media (max-height: 600px) {
    .lm-card {
        padding: 18px 18px 16px;
    }

    .lm-field {
        margin-bottom: 11px;
    }
}