/* 贷款表单弹窗样式 */
#loan-form-popup {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
}

#loan-form-popup .modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1;
}

#loan-form-popup .loan-form-content {
  position: relative;
  width: 90%;
  max-width: 600px;
  margin: 60px auto 0;
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  z-index: 2;
  overflow: hidden;
}

#loan-form-popup .loan-form-header {
  position: relative;
  padding: 15px 20px;
  background-color: #fff;
  border-bottom: 1px solid #eee;
  text-align: center;
}

#loan-form-popup .loan-form-title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #333;
}

#loan-form-popup .loan-form-close {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 20px;
  color: #999;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  line-height: 1;
}

#loan-form-popup .loan-form-body {
  padding: 15px 20px;
}

#loan-form-popup .form-group {
  margin-bottom: 15px;
}

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

#loan-form-popup .form-control {
  width: 100%;
  padding: 25px 12px;
  font-size: 14px;
  border: none;
  border-radius: 4px;
  box-sizing: border-box;
  background-color: #f5f5f5;
}

/* 姓名和性别字段 */
#loan-form-popup .name-field {
  display: flex;
  align-items: center;
  box-sizing: border-box;
    background-color: #f5f5f5;
}

#loan-form-popup .name-field input {
  flex: 1;
}

#loan-form-popup .gender-options {
  display: flex;
  margin-left: 10px;
  align-items: center;
  
}

#loan-form-popup .gender-option {
  margin-right: 10px;
  font-size: 14px;
  display: flex;
  align-items: center;
  margin-bottom: 0;
}

/* 带单位的输入框 */
#loan-form-popup .input-with-unit {
  position: relative;
}

#loan-form-popup .input-with-unit input {
  padding-right: 40px;
  width: 100%;
  box-sizing: border-box;
}

#loan-form-popup .input-unit {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #999;
  font-size: 14px;
}

/* 自定义单选按钮 */
#loan-form-popup input[type="radio"] {
  display: none;
}

#loan-form-popup .radio-custom {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid #ccc;
  display: inline-block;
  position: relative;
  margin-right: 5px;
}

#loan-form-popup input[type="radio"]:checked + .radio-custom::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: #3988ff;
}

/* 贷款类型样式 */
#loan-form-popup .loan-types {
  display: block;
  background-color: #f5f5f5;
  padding: 15px;
  border-radius: 4px;
}

#loan-form-popup .form-check {
  width: 100%;
  padding: 0;
  margin-bottom: 10px;
  box-sizing: border-box;
  margin: 0 auto;
}

#loan-form-popup .form-check label {
  display: flex;
  align-items: center;
  padding: 5px;
  font-size: 14px;
  cursor: pointer;
}

/* 提交按钮 */
#loan-form-popup .form-actions {
  margin-top: 20px;
}

#loan-form-popup .loan-form-submit {
  display: block;
  width: 100%;
  padding: 12px 15px;
  background-color: #3988ff;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  border: none;
  border-radius: 99999px;
  cursor: pointer;
  text-align: center;
}

#loan-form-popup .loan-form-submit:hover {
  background-color: #538ce2;
}

#loan-form-popup .loan-form-submit:disabled {
  background-color: #6c757d;
  cursor: not-allowed;
}

/* 消息提示 */
#loan-form-popup .loan-form-error {
  display: none;
  padding: 10px;
  margin-bottom: 15px;
  background-color: #f8d7da;
  color: #721c24;
  border-radius: 4px;
  text-align: center;
}

#loan-form-popup .loan-form-success {
  display: none;
  padding: 20px;
  background-color: #d4edda;
  color: #155724;
  border-radius: 4px;
  text-align: center;
  font-size: 16px;
}


#loan-form-popup .input-with-unit{
    display: flex;
    align-items: center;
}

#loan-form-popup input:-internal-autofill-previewed, input:-internal-autofill-selected {
    box-shadow: 0 0 0 1000px #f5f5f5 inset !important;
    -webkit-text-fill-color: var(--main-color) !important;
}


/* 响应式调整 */
@media (max-width: 768px) {
  #loan-form-popup .loan-types {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
  }

  #loan-form-popup .form-check {
    width: auto;
    margin-bottom: 0;
    flex: 0 0 30%;
  }
}

/* 响应式调整 */
@media (min-width: 400px) {
  #loan-form-popup .loan-types {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }

  #loan-form-popup .form-check {
    width: auto;
    margin-bottom: 0;
    flex: 0 0 30%;
  }
}

@media (max-width: 576px) {
  #loan-form-popup .loan-form-content {
    width: 95%;
    margin-top: 50px;
  }
}
