/* 弹窗容器样式 */
.register-modal {
  width: 420px;
}

.modal-wrapper {
  position: relative;
  border-radius: 20px;
  background: white;
  box-shadow: 0px 4px 30px 0px rgba(50, 40, 40, 0.06);
  overflow: hidden;
}

.register-modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  cursor: pointer;
  z-index: 10;
  transition: opacity 0.2s;
}

.register-modal-close:hover {
  opacity: 0.7;
}

.modal-content {
  padding: 60px 30px 48px 30px;
}

.modal-title {
  font-size: 28px;
  font-weight: 600;
  line-height: normal;
  color: #27293a;
  text-align: center;
  margin: 0 0 30px 0;
  font-family: 'HarmonyOS Sans SC', 'PingFang SC', sans-serif;
}

.form-group {
  margin-bottom: 16px;
}


.form-input {
  width: 100%;
  padding: 16px 15px;
  font-size: 14px;
  font-weight: 500;
  color: #27293a;
  background: white;
  border: 1px solid #e7e7f3;
  border-radius: 10px;
  outline: none;
  transition: border-color 0.2s;
  font-family: 'HarmonyOS Sans SC', 'PingFang SC', sans-serif;
  box-sizing: border-box;
}

.form-input::placeholder {
  color: #abaec9;
}

.form-input:focus {
  border: 2px solid #5959ff;
  padding: 15px 14px;
}

.form-input[has-error] {
  border-color: #ff7784;
  background: #fff7f8;
}

.form-input[has-error]:focus {
  border: 2px solid #ff7784;
  padding: 15px 14px;
  background: #fff7f8;
}

spz-custom-admin-sso[contact-error] #contact-validate {
  display: block;
}

spz-custom-admin-sso[password-error] #password-validate {
  display: block;
}

spz-custom-admin-sso:not([contact-error]) #contact-validate {
  display: none;
}

spz-custom-admin-sso:not([password-error]) #password-validate {
  display: none;
}

spz-custom-admin-sso[loading] .btn-register {
  cursor: not-allowed;
  pointer-events: none;
  opacity: 0.8;
}

spz-custom-admin-sso:not([loading]) #registerFormLoadingEN,
spz-custom-admin-sso:not([loading]) #registerFormLoadingPC {
  display: none;
}

.code-input-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 15px;
  background: white;
  border: 1px solid #e7e7f3;
  border-radius: 10px;
  box-sizing: border-box;
  transition: border-color 0.2s;
}

.code-input {
  flex: 1 0 0;
  padding: 0;
  border: none;
  background: transparent;
  font-size: 14px;
  font-weight: 500;
  color: #27293a;
  outline: none;
  font-family: 'HarmonyOS Sans SC', 'PingFang SC', sans-serif;
  min-width: 0;
  width: auto;
}

.code-input::placeholder {
  color: #abaec9;
}

.code-input:focus {
  border: none;
  padding: 0;
  background: transparent;
}

.code-input-wrapper:focus-within {
  border: 2px solid #5959ff;
  padding: 15px 14px;
}

.code-input-wrapper[has-error] {
  border-color: #ff7784;
  background: #fff7f8;
}

.code-input-wrapper[has-error]:focus-within {
  border: 2px solid #ff7784;
  padding: 15px 14px;
  background: #fff7f8;
}

.code-input-wrapper spz-render {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.btn-code-send {
  padding: 0;
  font-size: 14px;
  font-weight: 400;
  color: #5959ff;
  background: transparent;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  font-family: 'HarmonyOS Sans SC', 'PingFang SC', sans-serif;
  transition: opacity 0.2s;
  height: auto;
  display: flex;
  align-items: center;
  line-height: normal;
}

.btn-code-send:hover {
  opacity: 0.8;
}

.password-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.password-input {
  padding-right: 40px;
}

.password-input::after {
  content: '';
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 50px;
  z-index: 5;
  pointer-events: none;
}

.password-toggle-overlay {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  pointer-events: none;
}

.password-toggle {
  position: relative;
  cursor: pointer;
  transition: opacity 0.2s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  pointer-events: auto;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.password-toggle * {
  pointer-events: none;
}

.password-toggle:active {
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

.password-toggle:hover {
  opacity: 0.7;
}

.btn-register {
  width: 100%;
  padding: 14px 0;
  margin-top: 20px;
  font-size: 16px;
  font-weight: 600;
  line-height: 24px;
  color: white;
  background: #ff7784;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-family: 'PingFang SC', 'HarmonyOS Sans SC', sans-serif;
  transition: opacity 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.btn-register-text {
  transition: opacity 0.2s;
}

.form-actions .btn-register {
  margin-top: 0;
}

.btn-register:hover {
  opacity: 0.9;
}

.modal-footer {
  padding: 30px;
  background: #fafafa;
  text-align: center;
}

.footer-text {
  font-size: 12px;
  line-height: normal;
  color: #46496c;
  margin: 0;
  font-family: 'DM Sans', 'HarmonyOS Sans SC', sans-serif;
}

.footer-link {
  color: #46496C;
  text-decoration: underline;
  text-decoration-skip-ink: none;
  text-underline-position: from-font;
  cursor: pointer;
  transition: color 0.2s;
}

.footer-link:hover {
  color: #5959ff;
}

.error-message {
  display: block;
  margin-top: 8px;
  font-size: 12px;
  color: #ff7784;
  line-height: 16px;
}

@media (max-width: 959.98px) {
  .register-modal {
    width: 90%;
  }
}

/* 英文版特有样式 */
.modal-title-en {
  font-family: 'SF Pro Text', 'Helvetica Neue', sans-serif;
  font-weight: 700;
}

.btn-register-en {
  height: 52px;
  padding: 12px 0;
  font-family: 'SF Pro Text', 'Helvetica Neue', sans-serif;
}

.form-actions {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.divider-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
}

.divider-line {
  flex: 1;
  height: 1px;
  background: #e7e7f3;
}

.divider-text {
  font-size: 14px;
  font-weight: 400;
  color: #27293a;
  font-family: 'DM Sans', sans-serif;
  white-space: nowrap;
}

.btn-google {
  width: 100%;
  padding: 14px 20px;
  background: #fafafa;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  transition: background-color 0.2s, border-color 0.2s;
}

.btn-google:hover {
  background: #f5f5f5;
  border-color: #d2d2e6;
}

.google-icon {
  flex-shrink: 0;
}

.btn-google-text {
  font-size: 14px;
  font-weight: 500;
  color: #27293a;
  font-family: 'SF Pro Text', 'Helvetica Neue', sans-serif;
  white-space: nowrap;
}

.modal-footer-en .footer-text-en {
  color: #6d708a;
}

@media (max-width: 959.98px) {
  .mobile-modal {
    display: none !important;
  }
}

.container-recaptcha-submit {
  display: none;
}
