/* 登录/注册类表单的共用小组件(不进 main.css: 首屏资源预算见 test_frontend_performance_budget)。
   - .form-check: 协议/成年确认等勾选项
   - .consent-dialog: 轻量确认弹窗(<dialog>)
   - .captcha-refresh: 图形验证码按钮(图未到手时显示文字占位) */
/* 表单内的勾选项(协议/成年确认等): 复选框约 16px 与正文同尺度, 主题色, 与首行文字对齐。
   选择器带 .card 以压过上面 .card input 的 100% 宽 / 内边距和 .page-auth .card input 的 44px 最小高。 */
.form-check,
.card .form-check {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 0;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.6;
    color: var(--fb-gray-text);
    cursor: pointer;
}
.form-check input[type="checkbox"],
.card .form-check input[type="checkbox"],
.page-auth .card .form-check input[type="checkbox"] {
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
    min-height: 0;
    margin: 3px 0 0; /* (14px × 1.6 − 16px) / 2 ≈ 3px: 与首行文字垂直居中 */
    padding: 0;
    border-radius: 3px;
    accent-color: var(--fb-blue);
    cursor: pointer;
}
.page-auth .card .form-check a {
    display: inline;
    padding: 0;
    min-height: 0;
    line-height: inherit;
}

/* 轻量确认弹窗(<dialog>): 协议同意等 */
.consent-dialog {
    width: min(420px, calc(100vw - 32px));
    max-width: none;
    padding: 24px;
    border: none;
    border-radius: var(--fb-radius-lg);
    background: var(--fb-surface);
    color: var(--fb-ink);
    box-shadow: 0 16px 48px rgba(15, 23, 42, 0.24);
}
.consent-dialog::backdrop {
    background: rgba(15, 23, 42, 0.45);
}
.consent-dialog h2 {
    margin: 0 0 12px;
    font-size: 18px;
    font-weight: 800;
    line-height: 1.5;
    color: var(--fb-ink-strong);
}
.consent-dialog h2:focus {
    outline: none;
}
.consent-dialog p {
    margin: 0;
    font-size: 14px;
    line-height: 1.7;
    color: var(--fb-gray-text);
}
.page-auth .consent-dialog a,
.consent-dialog a {
    display: inline;
    padding: 0;
    color: var(--fb-blue);
    white-space: nowrap; /* 书名号与协议名不拆行 */
}
.consent-dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 20px;
}
.consent-dialog-actions .button {
    min-width: 96px;
}

/* 图形验证码按钮: 图未到手时显示「加载中…/点击刷新」, 不留空白 */
.captcha-refresh {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 122px;
    height: 44px;
    padding: 0;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: var(--fb-white, #fff);
    cursor: pointer;
    line-height: 0;
    overflow: hidden;
}
.captcha-refresh img:not([hidden]) {
    display: block;
    border-radius: 8px;
}
.captcha-refresh-placeholder {
    font-size: 13px;
    line-height: 1.4;
    color: var(--fb-blue);
    white-space: nowrap;
}
.captcha-refresh-placeholder[hidden],
.captcha-refresh img[hidden] {
    display: none;
}
/* 图形码已随一次成功发码用掉: 输入框与图片置灰, 冷却结束后前端自动换新图 */
.card [data-captcha-used] input[name=captcha] {
    background: #f1f5f9;
    color: #94a3b8;
}
[data-captcha-used] .captcha-refresh {
    cursor: default;
}
[data-captcha-used] .captcha-refresh img {
    opacity: 0.35;
    filter: grayscale(1);
}
