/* ================= 登录/注册/找回：layui 浮动标签输入框 =================
 * 结构（模板里写）：
 *   <div class="f-field [has-action|has-code]">
 *     <input class="layui-input" placeholder=" " id="xx">
 *     <label for="xx">邮箱</label>
 *     [可选 button.inline-btn 右侧内嵌按钮 | 可选 img.code-img 原接口图形码]
 *   </div>
 * 浮动规则：placeholder 必须是单个空格；聚焦或非空时标签上浮到边框顶部（白底衬遮住边框线）。
 * is-filled 由 auth-fl.js 补（浏览器自动回填不发 input 事件时也能浮起）。
 * 右侧段（图形码 / 获取验证码按钮）贴在输入框内沿、与输入框同高、共用同一个外框，
 * 视觉上是一个整体控件，不再是浮在框里的独立小块。
 * 提示框统一走全站 BizAlert（biz-alert.js），本文件不再定义 layer 皮肤。
 */
.f-field {
  position: relative;
  margin: 22px 0;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.f-field .layui-input,
.f-field input.layui-input {
  display: block;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
  height: 50px !important;
  line-height: 50px !important;
  padding: 0 14px !important;
  border-radius: 8px !important;
  border: 1.5px solid #e2e5ea !important;
  font-size: 15px !important;
  background: #fff !important;
  box-shadow: none !important;
  transition: border-color .2s, box-shadow .2s;
}
/* 右侧有按钮 / 图形码时预留内边距，文字不会滑到右侧段底下 */
.f-field.has-action .layui-input { padding-right: 126px !important; }
.f-field.has-code  .layui-input { padding-right: 162px !important; }

.f-field label {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #9aa0a6;
  font-size: 15px;
  pointer-events: none;
  background: #fff;
  padding: 0 4px;
  transition: all .18s ease;
  margin: 0 !important;
  line-height: 1 !important;
}

/* 聚焦 或 有内容：标签上浮到边框顶部（白底衬遮住边框线） */
.f-field .layui-input:focus ~ label,
.f-field .layui-input:not(:placeholder-shown) ~ label,
.f-field.is-filled label {
  top: 0 !important;
  transform: translateY(-50%) !important;
  font-size: 12px !important;
  color: #1e9fff !important;
}
.f-field .layui-input:focus {
  border-color: #1e9fff !important;
  box-shadow: 0 0 0 3px rgba(30,159,255,.12) !important;
}

/* ---------- 右侧内嵌段：图形码 / 获取验证码按钮 ----------
 * 用 top/right/bottom = 1.5px 贴住输入框内沿（等于边框宽度），
 * 这样输入框自己的 1.5px 边框完整可见，右侧段像是框内的一块；圆角 = 8px - 1.5px。
 */
.f-field .code-img,
.f-field .inline-btn {
  position: absolute;
  top: 1.5px;
  right: 1.5px;
  bottom: 1.5px;
  height: auto;
  margin: 0;
  box-sizing: border-box;
  border: 0;
  border-left: 1px solid #e2e5ea; /* 与输入文字的分界线 */
  border-radius: 0 6.5px 6.5px 0;
  overflow: hidden;
}
/* 聚焦时分界线跟随主色 */
.f-field .layui-input:focus ~ .inline-btn,
.f-field .layui-input:focus ~ .code-img { border-left-color: #1e9fff; }

/* 获取验证码按钮：与输入框同高、靠右，文字加大到 15px */
.f-field .inline-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 110px;
  padding: 0 12px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: .3px;
  color: #1d4ed8;
  background: #eff6ff;
  cursor: pointer;
  white-space: nowrap;
}
.f-field .inline-btn:hover { background: #e0edff; }
/* 倒计时/禁用态（脚本会同时加 layui-btn-disabled） */
.f-field .inline-btn:disabled,
.f-field .inline-btn.layui-btn-disabled {
  color: #94a3b8;
  background: #f1f5f9;
  border-left-color: #e2e5ea;
  cursor: not-allowed;
}

/* 图形验证码图片：撑满右侧段，与输入框等高等长。
 * 图片由 topthink/think-captcha 生成，4 位 × 26px → 208×65（约 3.2:1），
 * 这里给 150×47（3.19:1），比例几乎一致，缩放后字不会变形。 */
.f-field .code-img {
  display: block;
  width: 150px;
  object-fit: fill;
  background: #f8fafc;
  cursor: pointer;
}

/* 提交按钮：铺满整行（参考 card-footer .layui-btn） */
.auth-submit {
  width: 100% !important;
  height: 42px !important;
  line-height: 42px !important;
  border-radius: 8px !important;
  margin-top: 8px !important;
  background: var(--blue-600);
}

/* 必填星号（站点自定义，参考样式没有） */
.f-field label.need::after { content: ' *'; color: #ff5722; font-weight: 800; }

/* 浏览器自动回填泛黄背景压掉（站点自定义） */
.f-field .layui-input:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 1000px #fff inset;
  transition: background-color 9999s ease-in-out 0s;
}

@media (max-width: 800px) {
  /* 手机：auth-page 留左右边距，卡片去掉栅格列，全宽更顺眼 */
  .auth-page {
    padding-left: 12px!important;
    padding-right: 12px!important;
    padding-bottom: 20px!important;
  }
  .auth-card {
    display: block; /* 说明：cloud-pages.css 在本文件之后加载，display:grid 会覆盖本行，真正生效的是下面的单列 */
    grid-template-columns: minmax(0, 1fr) !important; /* 真正生效的单列：压过后加载的 .auth-card{grid-template-columns:.9fr 1.1fr} */
    width: 100% !important;
    max-width: 100% !important;
    margin: 0;
  }
  .auth-side { display: none; }
  .auth-main { padding: 20px 14px 18px; }
  .f-field { margin: 18px 0 0; width: 100%; }
  /* iOS 聚焦自动放大：≥16px 才不会缩放（!important + 同权重选择器，压过上面的 15px） */
  .f-field input.layui-input { font-size: 16px !important; }
  /* 右侧文字同步放大，与输入框字号一致 */
  .f-field .inline-btn { font-size: 16px; }
}

.auth-switch { margin: 16px 0 0; font-size: 13px; color: var(--muted); text-align: center; }
