/* ==========================================================================
   找回密码页样式（repass.css）
   作用范围：仅 templates/htmls/reg/personrepass.html（个人找回密码）。
   母模板与注册/登录页一致：base/base.html，全宽页面底 + 960 居中卡片。
   约定：全部选择器以 .rp- 前缀；restart.css 保持不动（userrepass 还在用）。
   契约：#captcha-element / #go_code / #_s / #code_input 与 name=phone / verifycode /
   password / password2 都不能改名，页面脚本与阿里云验证码依赖它们。
   ========================================================================== */

.rp-page {
    --rp-primary: #ff6000;
    --rp-primary-hover: #e85600;
    --rp-text: #212529;
    --rp-text-2: #4a5056;
    --rp-muted: #868e96;
    --rp-border: #dcdfe6;

    /* base2 的中间列口径：960 宽、浮在左右两侧 150 广告栏之间，上下各留 16px */
    float: left;
    width: 960px;
    padding: 0 0 16px;
    color: var(--rp-text);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

.rp-card {
    /* 960 通栏卡片，与注册/登录页同宽 */
    max-width: 960px;
    margin: 0 auto;
    padding: 34px 44px 38px;
    background: #fff;
    border-radius: 0; /* 外层直角 */
    box-shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 10px 28px rgba(0, 0, 0, .06);
    box-sizing: border-box;
}

/* --------------------------------------------------------------------------
   1. 卡头
   -------------------------------------------------------------------------- */
.rp-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 22px;
}

.rp-title {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.4;
    color: #212529;
    letter-spacing: .01em;
}

.rp-sub {
    margin: 0;
    font-size: 13px;
    color: #868e96;
    white-space: nowrap;
}

.rp-link {
    color: #ff6000;
    text-decoration: none;
    transition: color .15s;
}

.rp-link:hover {
    color: #e85600;
    text-decoration: underline;
}

/* --------------------------------------------------------------------------
   2. 表单字段
   -------------------------------------------------------------------------- */
.rp-form {
    margin: 0;
}

.rp-field {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 18px;
}

.rp-label {
    flex: 0 0 96px;
    margin: 0; /* 站点随页加载的 bootstrap 会给 label 加 margin-bottom:8px，这里显式清零 */
    text-align: right;
    font-size: 14px;
    line-height: 44px;
    color: #4a5056;
    white-space: nowrap;
}

.rp-control {
    flex: 1;
    min-width: 0;
}

.rp-input {
    display: block;
    width: 100%;
    height: 44px;
    padding: 0 12px;
    border: 1px solid #dcdfe6;
    border-radius: 3px;
    background: #fff;
    box-sizing: border-box;
    color: #212529;
    font-size: 14px;
    line-height: normal;
    transition: border-color .15s, box-shadow .15s;
}

.rp-input::placeholder {
    color: #a9b0b8;
}

.rp-input:hover {
    border-color: #c2c8d0;
}

.rp-input:focus {
    outline: none;
    border-color: #ff6000;
    box-shadow: 0 0 0 3px rgba(255, 96, 0, .12);
}

/* --------------------------------------------------------------------------
   3. 短信验证码行（#code_input 必须保留为容器元素）
   -------------------------------------------------------------------------- */
.rp-code {
    display: flex;
    gap: 8px;
}

.rp-code .rp-input {
    flex: 1;
    min-width: 0;
}

.rp-code-btn {
    flex: 0 0 120px;
    height: 44px;
    line-height: 42px;
    border: 1px solid #ff6000;
    border-radius: 3px;
    background: #fff;
    box-sizing: border-box;
    color: #ff6000;
    font-size: 13px;
    text-align: center;
    white-space: nowrap;
    cursor: pointer;
    user-select: none;
    transition: background-color .15s, color .15s;
}

.rp-code-btn:hover {
    background: #fff3ec;
}

/* 脚本把 #_s 切到 display:block、#go_code 切到 display:none */
#_s {
    display: none;
    flex: 0 0 120px;
    height: 44px;
    line-height: 42px;
    box-sizing: border-box;
    color: #868e96;
    font-size: 12px;
    text-align: center;
}

/* --------------------------------------------------------------------------
   4. 阿里云滑块验证码
   -------------------------------------------------------------------------- */
.rp-control--captcha {
    display: flex;
    align-items: center;
    min-height: 44px;
}

/* 空容器在 flex 里宽度会塌成 0，脚本按它的 clientWidth 算滑块宽度就永远走不到窄屏分支 */
#captcha-element {
    flex: 1;
    min-width: 0;
}

/* 排除阿里云验证码内部的 span，避免被外层样式挤压 */
#captcha-element span {
    width: auto;
    float: none;
}

/* --------------------------------------------------------------------------
   5. 提交与提示
   -------------------------------------------------------------------------- */
.rp-btn {
    display: block;
    width: 100%;
    height: 48px;
    margin-top: 26px;
    border: 0;
    border-radius: 4px;
    background: #ff6000;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: .06em;
    cursor: pointer;
    transition: background-color .15s;
}

.rp-btn:hover {
    background: #e85600;
}

.rp-btn:active {
    transform: translateY(1px);
}

.rp-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 96, 0, .25);
}

.rp-tip {
    margin: 14px 0 0;
    font-size: 12px;
    line-height: 1.6;
    color: #868e96;
    text-align: center;
}

/* --------------------------------------------------------------------------
   6. 响应式：1200 / 1024 / 768 / 480（口径与 login.css 一致）
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
    /* 这一档起两侧广告栏隐藏，中间列铺满 */
    .rp-page {
        width: 100%;
        float: none;
        padding: 16px 10px 0;
        box-sizing: border-box;
    }

    .rp-card {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .rp-page {
        padding: 16px 12px 16px;
    }

    .rp-card {
        max-width: 100%;
        padding: 24px 20px 28px;
        border-radius: 0;
    }

    .rp-head {
        display: block;
        margin-bottom: 18px;
    }

    .rp-sub {
        margin-top: 6px;
        white-space: normal;
    }

    .rp-field {
        display: block;
        margin-bottom: 16px;
    }

    .rp-label {
        display: block;
        margin-bottom: 6px;
        line-height: 1.6;
        text-align: left;
    }
}

@media (max-width: 480px) {
    .rp-page {
        padding: 12px 8px 16px;
    }

    .rp-card {
        margin: 0 auto;
        padding: 20px 16px 24px;
    }

    .rp-title {
        font-size: 18px;
    }

    .rp-code {
        gap: 6px;
    }

    .rp-code-btn,
    #_s {
        flex-basis: 104px;
        font-size: 12px;
    }

    .rp-btn {
        height: 44px;
        margin-top: 20px;
        font-size: 15px;
    }
}
