/* WordPress Login Page Custom Styles */
body.login {
  background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ec 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

body.login #login {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  padding: 20px;
  position: relative;
  z-index: 1;
}

body.login #loginform,
body.login #registerform,
body.login #lostpasswordform {
  background-color: #ffffff;
  border-radius: 20px;
  padding: 40px 35px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
  border: none;
}

body.login #login h1 a,
body.login .login-title {
  display: none;
}

/* Custom Title */
body.login .login-custom-title {
  text-align: center;
  font-size: 28px;
  font-weight: 700;
  color: #4a6cf7;
  margin: 0 0 30px;
  letter-spacing: 0.5px;
}

/* Input Fields */
body.login .user-login,
body.login .user-email,
body.login .user-pass1-wrap,
body.login .user-pass2-wrap {
  margin-bottom: 20px;
}

body.login .label {
  font-size: 14px;
  font-weight: 500;
  color: #333;
  display: block;
  margin-bottom: 8px;
}

body.login input[type="text"],
body.login input[type="email"],
body.login input[type="password"] {
  width: 100%;
  padding: 14px 18px;
  font-size: 15px;
  border: 1px solid #e8e8e8;
  border-radius: 12px;
  background-color: #f8f9fa;
  color: #333;
  transition: all 0.3s ease;
  box-sizing: border-box;
}

body.login input[type="text"]:focus,
body.login input[type="email"]:focus,
body.login input[type="password"]:focus {
  outline: none;
  border-color: #4a6cf7;
  background-color: #ffffff;
  box-shadow: 0 0 0 3px rgba(74, 108, 247, 0.1);
}

/* Forgot Password Link */
body.login .forgot-password-link {
  display: inline-block;
  font-size: 14px;
  color: #4a6cf7;
  text-decoration: none;
  margin-left: auto;
  transition: color 0.3s ease;
}

body.login .forgot-password-link:hover {
  color: #6366f1;
  text-decoration: none;
}

/* Submit Button */
body.login #wp-submit {
  width: 100%;
  padding: 16px;
  font-size: 16px;
  font-weight: 600;
  color: #ffffff;
  background: linear-gradient(135deg, #4a6cf7 0%, #6366f1 100%);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  letter-spacing: 0.5px;
  height: auto;
  line-height: 1.5;
  box-shadow: 0 4px 15px rgba(74, 108, 247, 0.3);
}

body.login #wp-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(74, 108, 247, 0.4);
}

body.login #wp-submit:active {
  transform: translateY(0);
}

/* Message Box */
body.login #login_error,
body.login .message,
body.login .reset-pass {
  background-color: #fff3cd;
  border: 1px solid #ffc107;
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 20px;
  font-size: 14px;
  color: #856404;
  box-shadow: none;
}

body.login #login_error {
  background-color: #f8d7da;
  border-color: #f5c6cb;
  color: #721c24;
}

/* Language Selector */
body.login .language-switcher {
  display: none;
}

/* Privacy Policy */
body.login .privacy-policy-page-link {
  text-align: center;
  margin-top: 15px;
}

body.login .privacy-policy-page-link a {
  color: #999;
  font-size: 13px;
  text-decoration: none;
}

body.login .privacy-policy-page-link a:hover {
  color: #4a6cf7;
}

/* Responsive */
@media (max-width: 480px) {
  body.login #login {
    padding: 15px;
  }
  
  body.login #loginform,
  body.login #registerform,
  body.login #lostpasswordform {
    padding: 30px 25px;
    border-radius: 16px;
  }
  
  body.login .login-custom-title {
    font-size: 24px;
  }
  
  body.login input[type="text"],
  body.login input[type="email"],
  body.login input[type="password"] {
    padding: 12px 15px;
    font-size: 14px;
  }
  
  body.login #wp-submit {
    padding: 14px;
    font-size: 15px;
  }
}

/* WordPress Password Visibility Toggle */
body.login .wp-pwd {
  position: relative;
}

body.login .wp-pwd input[type="password"],
body.login .wp-pwd input[type="text"] {
  margin-bottom: 0;
  padding-right: 50px;
}

/* Remove default WordPress elements */
body.login #login h1,
body.login .login h1 {
  display: none;
}

/* User pass wrap */
body.login .user-pass-wrap {
  margin-bottom: 16px;
}

/* Forgot Password Row */
body.login .forgot-password-row {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin: 10px 0 20px;
  font-size: 14px;
}

body.login .forgot-password-row .forgot-password-link {
  color: #4a6cf7;
  text-decoration: none;
  transition: color 0.3s ease;
}

body.login .forgot-password-row .forgot-password-link:hover {
  color: #6366f1;
}

/* Navigation Links (register link appears here when enabled) */
body.login #nav,
body.login #backtoblog {
  text-align: center;
  margin-top: 16px;
  font-size: 14px;
}

body.login #nav a,
body.login #backtoblog a {
  color: #4a6cf7;
  text-decoration: none;
  transition: color 0.3s ease;
}

body.login #nav a:hover,
body.login #backtoblog a:hover {
  color: #6366f1;
}

body.login #nav .wp-login-register {
  margin-left: 0;
}

/* Password visibility toggle button */
body.login .button,
body.login .button-primary {
  background: transparent;
  border: none;
  color: inherit;
  padding: 0;
}

body.login .button.wp-hide-pw {
  background: transparent;
  border: none;
  color: #999;
  cursor: pointer;
  padding: 0;
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  display: none !important;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s ease;
}

body.login .button.wp-hide-pw.is-visible {
  display: flex !important;
}

body.login .button.wp-hide-pw:hover {
  color: #4a6cf7;
  background: transparent;
  border: none;
  box-shadow: none;
  outline: none;
}

body.login .button.wp-hide-pw:focus,
body.login .button.wp-hide-pw:active {
  border: none;
  box-shadow: none;
  outline: none;
  background: transparent;
}

body.login .button.wp-hide-pw .dashicons {
  width: 20px;
  height: 20px;
  font-size: 20px;
}

/* WordPress Admin Link */
body.login .wp-admin-link {
  text-align: center;
  margin-top: 20px;
  font-size: 13px;
  color: #999;
}

body.login .wp-admin-link a {
  color: #999;
  text-decoration: none;
  transition: color 0.3s ease;
}

body.login .wp-admin-link a:hover {
  color: #4a6cf7;
}
/* ---- 卡片内提示（登录按钮正上方，替代 WP 默认卡片外红框） ----
   ⚠️ 纯文字，无底色、无边框、无内边距：用户明确要求不要任何色块包裹。
   ⚠️⚠️ 选择器必须带 `#loginform` 提权：WP 核心的 `#login form p { margin-bottom: 0 }`
   是 ID 选择器，会把 `body.login .bk-login-alert` 的间距整条吃掉（实测 computed
   margin-bottom=0px、文字底部与按钮顶部 gap=0px）。22px 曾被静默覆盖过。 */
body.login #loginform p.bk-login-alert {
  display: none;
  margin: 0 0 18px;
  padding: 0;
  background: none;
  color: #c0392b;
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
}
body.login #loginform p.bk-login-alert.is-visible { display: block; }
body.login #loginform p.bk-login-alert.bk-shake { animation: bk-shake 0.4s; }
@keyframes bk-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

/* ---- 滑块验证（前端渲染：轨道 / 目标区 / 滑块全部由浏览器画，零图片零请求） ---- */
body.login .bk-slider {
  margin: 16px 0 2px;
}
body.login .bk-slider-track {
  position: relative;
  height: 48px;
  border-radius: 12px;
  background: #f2f4f9;
  border: 1px solid #e8ebf3;
  overflow: hidden;
  -webkit-user-select: none;
  user-select: none;
  touch-action: none; /* 触屏拖动时别让页面跟着滚 */
}
body.login .bk-slider-zone {
  position: absolute;
  top: 5px;
  bottom: 5px;
  left: 0;
  width: 60px;
  box-sizing: border-box;
  border-radius: 9px;
  background: rgba(74, 108, 247, 0.2);
  border: 1px dashed #a6b4f1;
  transition: opacity 0.2s ease;
}
body.login .bk-slider-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0;
  background: linear-gradient(90deg, rgba(74, 108, 247, 0.05), rgba(74, 108, 247, 0.16));
}
body.login .bk-slider-handle {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 2;
  width: 44px;
  height: 46px;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  color: #4a6cf7;
  border: none;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(74, 108, 247, 0.28);
  cursor: grab;
  touch-action: none;
  will-change: transform;
}
body.login .bk-slider-handle:focus { outline: none; box-shadow: 0 0 0 3px rgba(74, 108, 247, 0.18), 0 2px 8px rgba(74, 108, 247, 0.28); }
body.login .bk-slider-handle.is-grab { cursor: grabbing; }
body.login .bk-slider.is-ok .bk-slider-handle {
  background: #4a6cf7;
  color: #ffffff;
  cursor: default;
}
body.login .bk-slider.is-ok .bk-slider-zone { opacity: 0; }
body.login .bk-slider.is-ok .bk-slider-fill {
  background: linear-gradient(90deg, rgba(74, 108, 247, 0.12), rgba(74, 108, 247, 0.3));
}
body.login .bk-slider.is-bad .bk-slider-track { animation: bk-shake 0.4s; }
body.login .bk-slider-tip {
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: #8b93a7;
  text-align: center;
}
body.login .bk-slider.is-ok .bk-slider-tip { color: #2b8a3e; }
body.login .bk-slider.is-bad .bk-slider-tip { color: #c0392b; }

/* ---- 提交按钮禁用态（其他脚本禁用提交时用） ---- */
body.login #wp-submit[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
