/* 宗孝堂 - 登录弹窗样式 v2 */

/* ====== 导航栏登录按钮 ====== */
.nav-login-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 8px 20px; border-radius: 8px; font-size: 14px; cursor: pointer;
  border: 1.5px solid #c9a96e; background: transparent; color: #c9a96e;
  transition: all 0.25s; font-family: inherit; white-space: nowrap; text-decoration: none;
}
.nav-login-btn:hover { background: #c9a96e; color: #fff; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(201,169,110,0.3); }
.nav-login-btn svg { width: 16px; height: 16px; }

.nav-provider-btn {
  border-color: #6b8e9b; color: #6b8e9b;
}
.nav-provider-btn:hover { background: #6b8e9b; color: #fff; box-shadow: 0 4px 12px rgba(107,142,155,0.3); }

/* ====== 遮罩层 ====== */
.login-overlay {
  display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5); z-index: 9999;
  align-items: center; justify-content: center;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.login-overlay.show { display: flex; }

/* ====== 弹窗主体 ====== */
.login-modal {
  background: #fff; border-radius: 20px; width: 440px; max-width: 92vw;
  max-height: 90vh; overflow-y: auto; box-shadow: 0 24px 80px rgba(0,0,0,0.2);
  position: relative; animation: loginSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes loginSlideIn {
  from { opacity: 0; transform: translateY(16px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.login-modal-close {
  position: absolute; top: 16px; right: 16px; width: 36px; height: 36px;
  border: none; background: #f5f5f5; font-size: 20px; cursor: pointer;
  color: #999; border-radius: 50%; display: flex; align-items: center;
  justify-content: center; z-index: 2; transition: all 0.2s;
}
.login-modal-close:hover { background: #e8e8e8; color: #333; }

/* ====== 顶部品牌区 ====== */
.login-header {
  padding: 36px 36px 0; text-align: center;
}
.login-brand-icon {
  width: auto; height: auto; margin: 0 auto 16px;
  background: none; border-radius: 0;
  display: flex; align-items: center; justify-content: center;
}
.login-brand-icon img {
  height: 52px; width: auto; display: block;
}
.login-brand-icon svg {
  width: 56px; height: 56px; margin: 0 auto;
  background: linear-gradient(135deg, #0f3460, #1e5799);
  border-radius: 16px; padding: 14px;
  color: #fff; box-shadow: 0 8px 24px rgba(15,52,96,0.2);
}
.login-header h2 {
  font-size: 22px; color: #1a1a2e; font-weight: 700; letter-spacing: 1px;
}
.login-header-desc {
  font-size: 13px; color: #999; margin-top: 6px;
}

/* ====== 登录方式切换 ====== */
.login-tabs {
  display: flex; margin: 24px 36px 0; position: relative;
  background: #f5f6f8; border-radius: 10px; padding: 4px;
}
.login-tab {
  flex: 1; padding: 10px 0; border: none; background: none; cursor: pointer;
  font-size: 14px; color: #888; font-family: inherit; font-weight: 500;
  transition: color 0.25s; display: flex; align-items: center;
  justify-content: center; gap: 6px; position: relative; z-index: 1;
  border-radius: 8px;
}
.login-tab svg { width: 18px; height: 18px; }
.login-tab:hover { color: #555; }
.login-tab.active {
  color: #fff; background: #0f3460; box-shadow: 0 2px 8px rgba(15,52,96,0.25);
}
.login-tab-indicator { display: none; }

/* ====== 表单区 ====== */
.login-body { padding: 28px 36px 24px; }
.login-panel { display: none; animation: panelFadeIn 0.25s ease; }
.login-panel.active { display: block; }
@keyframes panelFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* 输入字段 */
.login-field {
  position: relative; margin-bottom: 14px;
  display: flex; align-items: center; background: #f7f8fa;
  border: 1.5px solid transparent; border-radius: 12px;
  transition: all 0.25s;
}
.login-field:focus-within {
  background: #fff; border-color: #0f3460;
  box-shadow: 0 0 0 4px rgba(15,52,96,0.06);
}
.login-field-icon {
  width: 42px; display: flex; align-items: center; justify-content: center;
  color: #b0b8c1; flex-shrink: 0;
}
.login-field-icon svg { width: 18px; height: 18px; }
.login-field:focus-within .login-field-icon { color: #0f3460; }

.login-field input {
  flex: 1; height: 48px; border: none; background: transparent;
  padding: 0 12px 0 0; font-size: 15px; outline: none; font-family: inherit;
  color: #1a1a2e;
}
.login-field input::placeholder { color: #b8c0cc; }

/* 获取验证码按钮 */
.btn-get-code {
  height: 36px; padding: 0 14px; margin-right: 6px; border-radius: 8px;
  font-size: 13px; white-space: nowrap; cursor: pointer;
  border: none; background: transparent; color: #c9a96e;
  font-family: inherit; font-weight: 600; flex-shrink: 0;
  transition: all 0.2s;
}
.btn-get-code:hover { background: rgba(201,169,110,0.08); }
.btn-get-code:disabled { color: #c5c5c5; cursor: not-allowed; }

/* 提交按钮 */
.btn-login-submit {
  width: 100%; height: 50px; margin-top: 6px;
  background: linear-gradient(135deg, #0f3460, #1e5799);
  color: #fff; border: none; border-radius: 12px; font-size: 16px;
  cursor: pointer; font-family: inherit; font-weight: 600; letter-spacing: 2px;
  transition: all 0.25s; display: flex; align-items: center;
  justify-content: center; gap: 8px;
}
.btn-login-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(15,52,96,0.3);
}
.btn-login-submit:active { transform: translateY(0); }
.btn-login-submit svg { width: 18px; height: 18px; }

.login-field-hint {
  text-align: center; font-size: 12px; color: #b8c0cc; margin-top: 14px; margin-bottom: 0;
}

/* 错误提示 */
.login-error {
  color: #e74c3c; font-size: 13px; text-align: center; margin-bottom: 8px;
  min-height: 18px; line-height: 18px;
}

/* ====== 微信登录面板 ====== */
.wx-login-area {
  text-align: center; padding: 12px 0 4px;
}
.wx-qrcode-wrapper {
  width: 180px; height: 180px; margin: 0 auto 20px;
  position: relative; cursor: pointer;
}
.wx-qrcode-inner {
  width: 100%; height: 100%; border-radius: 16px; background: #f7f8fa;
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; color: #b0b8c1; gap: 10px;
  border: 2px solid #eef0f4; transition: all 0.3s;
  position: relative; z-index: 1;
}
.wx-qrcode-inner svg { width: 56px; height: 56px; opacity: 0.5; }
.wx-qrcode-inner:hover {
  border-color: #07c160; background: #f0faf4;
}
.wx-qrcode-inner:hover svg { opacity: 0.7; }
.wx-qrcode-label {
  font-size: 13px; color: #b0b8c1; font-weight: 500;
}
.wx-qrcode-inner:hover .wx-qrcode-label { color: #07c160; }

/* 外圈呼吸动画 */
.wx-qrcode-ring {
  position: absolute; top: -6px; left: -6px; right: -6px; bottom: -6px;
  border: 2px solid rgba(7,193,96,0.15); border-radius: 22px;
  animation: wxRingPulse 2s ease-in-out infinite;
}
@keyframes wxRingPulse {
  0%, 100% { opacity: 0.3; transform: scale(1); }
  50%      { opacity: 0.8; transform: scale(1.02); }
}

.wx-login-desc {
  font-size: 14px; color: #555; margin-bottom: 6px;
}
.wx-login-hint {
  font-size: 12px; color: #b8c0cc;
}

/* ====== 底部协议 ====== */
.login-footer {
  text-align: center; padding: 0 36px 28px; font-size: 12px; color: #b8c0cc;
  line-height: 1.8;
}
.login-footer a {
  color: #0f3460; text-decoration: none; font-weight: 500;
}
.login-footer a:hover { text-decoration: underline; }

/* ====== 响应式 ====== */
@media (max-width: 480px) {
  .login-modal { border-radius: 16px; }
  .login-header { padding: 28px 20px 0; }
  .login-brand-icon img { height: 42px; }
  .login-brand-icon svg { width: 48px; height: 48px; border-radius: 14px; padding: 12px; }
  .login-header h2 { font-size: 19px; }
  .login-tabs { margin: 20px 20px 0; }
  .login-body { padding: 22px 20px 18px; }
  .login-footer { padding: 0 20px 22px; }
  .btn-login-submit { height: 46px; font-size: 15px; }
  .login-field input { height: 44px; font-size: 14px; }
  .nav-login-btn { padding: 7px 12px; font-size: 12px; }
  .nav-provider-btn { padding: 7px 10px; font-size: 12px; }
  .wx-qrcode-wrapper { width: 150px; height: 150px; }
}
