/* 独立认证页：覆盖 style.css 中弹窗版 .kehua-auth-field（flex+图标），与 kehua_tianya 标签+输入框结构一致 */

body.kehua-auth-page .kehua-auth-card .kehua-auth-field {
  display: block;
  border: none;
  padding: 0;
  margin-bottom: 16px;
  background: transparent;
  align-items: stretch;
}

body.kehua-auth-page .kehua-auth-card .kehua-auth-field:focus-within {
  border: none;
  box-shadow: none;
}

body.kehua-auth-page .kehua-auth-card .kehua-auth-field svg {
  display: none;
}

body.kehua-auth-page .kehua-auth-card .kehua-auth-field-code {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 10px;
}

body.kehua-auth-page .kehua-auth-card .kehua-auth-field-code .kehua-auth-send-code {
  flex-shrink: 0;
  align-self: stretch;
  height: auto;
  min-height: 44px;
}

/* 独立页「验证码 + 发送」一行：覆盖 style.css 中 send-code 的固定 height:34px，与左侧输入框同高 */
body.kehua-auth-page .kehua-auth-card .kehua-auth-email-code-row {
  align-items: stretch;
}

body.kehua-auth-page .kehua-auth-card .kehua-auth-email-code-row .kehua-auth-send-code {
  flex-shrink: 0;
  height: auto;
  min-height: 44px;
  box-sizing: border-box;
  align-self: stretch;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 16px;
}

body.kehua-auth-page .kehua-auth-card .kehua-auth-field--readonly .kehua-auth-input {
  background: #f1f5f9;
  color: #64748b;
}

/* style.css `.kehua-auth-field input` 为弹窗内透明输入，特异性高于 `.kehua-auth-input`，须显式还原 */
body.kehua-auth-page .kehua-auth-card .kehua-auth-field > input.kehua-auth-input,
body.kehua-auth-page .kehua-auth-card .kehua-auth-email-code-row input.kehua-auth-input {
  min-width: 0;
  height: auto;
  min-height: 44px;
  box-sizing: border-box;
  padding: 11px 14px;
  border: 1px solid #c5d0df;
  border-radius: var(--kehua-radius, 10px);
  background: #fbfcfe;
  font-size: 15px;
  font-family: inherit;
  color: var(--kehua-text, #1e293b);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

body.kehua-auth-page .kehua-auth-card .kehua-auth-field > input.kehua-auth-input {
  flex: none;
  width: 100%;
}

body.kehua-auth-page .kehua-auth-card .kehua-auth-email-code-row input.kehua-auth-input.kehua-auth-email-code-input {
  flex: 1 1 auto;
  width: auto;
}

body.kehua-auth-page .kehua-auth-card .kehua-auth-field > input.kehua-auth-input::placeholder,
body.kehua-auth-page .kehua-auth-card .kehua-auth-email-code-row input.kehua-auth-input::placeholder {
  color: #94a3b8;
}

body.kehua-auth-page .kehua-auth-card .kehua-auth-field > input.kehua-auth-input:hover,
body.kehua-auth-page .kehua-auth-card .kehua-auth-email-code-row input.kehua-auth-input:hover {
  border-color: #9eb2c9;
}

body.kehua-auth-page .kehua-auth-card .kehua-auth-field > input.kehua-auth-input:focus,
body.kehua-auth-page .kehua-auth-card .kehua-auth-email-code-row input.kehua-auth-input:focus {
  border-color: var(--kehua-primary, #0056b3);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(0, 86, 179, 0.15);
}

body.kehua-auth-page > main.kehua-auth-main {
  display: block;
  width: 100%;
  max-width: none;
  flex: 1 1 auto;
}

/* 覆盖 style.css 独立页居中狭容器 */
body.kehua-auth-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  align-items: stretch;
  justify-content: flex-start;
  padding: 0;
  background: transparent;
}

body.kehua-auth-page .kehua-auth-error {
  margin-bottom: 14px;
}

.kehua-panel--hidden,
.kehua-panel[hidden] {
  display: none !important;
}

/*
 * 窄屏（与 body.kehua-dual-topnav-mobile 一致 ≤992px）：顶栏为 fixed .kehua-header，
 * 顶距与首页相同，勿再叠文档流天涯顶栏用的 --top-gap。
 */
@media (max-width: 992px) {
  body.kehua-auth-page.kehua-dual-topnav-mobile > main.kehua-auth-main {
    display: flex;
    flex-direction: column;
    padding-top: calc(var(--header-h) + env(safe-area-inset-top, 0px));
    min-height: calc(100vh - var(--header-h) - env(safe-area-inset-top, 0px));
    min-height: calc(100dvh - var(--header-h) - env(safe-area-inset-top, 0px));
    box-sizing: border-box;
  }

  body.kehua-mobile-tabbar-on.kehua-auth-page.kehua-dual-topnav-mobile > main.kehua-auth-main {
    padding-bottom: calc(28px + 54px + env(safe-area-inset-bottom, 0px));
  }
}

@media (max-width: 767px) {
  body.kehua-auth-page > main.kehua-auth-main > .kehua-auth-container {
    margin-top: auto;
    margin-bottom: auto;
    width: 100%;
  }

  /*
   * 手机端去掉顶部营销/说明区（与截图一致：站点名、大标题、协议说明、三条要点）。
   * 桌面端 ≥768px 仍为双栏左侧介绍 + 右侧表单，不受影响。
   */
  body.kehua-auth-page .kehua-auth-layout > section.kehua-auth-aside,
  body.kehua-auth-page section.kehua-auth-aside {
    display: none !important;
  }

  /*
   * 登录 / 注册 / 找回密码：去掉底部版权与站点页脚占位（含 .kehua-footer-copy）。
   * 置于本文件末尾、仅认证页加载，便于覆盖其它样式；768px 及以上不受影响。
   */
  body.kehua-auth-page .kehua-footer {
    display: none !important;
  }
}
