@import '~@/utils/utils.less';

.container {
  min-height: 90vh;
  height: 90vh; // 固定高度
  background-color: #ffffff;
  padding: 24px;
  overflow: hidden; // 容器不滚动
}

.content {
  max-width: 960px;
  margin: 0 auto;
  height: 100%; // 占满容器高度
  overflow-y: auto; // 添加垂直滚动
  overflow-x: hidden;
  padding-right: 8px; // 为滚动条留出空间
  
  /* 自定义滚动条样式 */
  &::-webkit-scrollbar {
    width: 8px;
  }

  &::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.02);
    border-radius: 4px;
  }

  &::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.18);
    border-radius: 4px;

    &:hover {
      background: rgba(0, 0, 0, 0.28);
    }
    
    &:active {
      background: rgba(0, 0, 0, 0.35);
    }
  }
  
  /* Firefox滚动条 */
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, 0.18) rgba(0, 0, 0, 0.02);
}

.title {
  text-align: center;
  margin-bottom: 32px !important;
  color: #333;
  font-weight: 600;
  flex-shrink: 0; // 标题不收缩
}

.formCard {
  background: white;
  border-radius: 12px;
  // 增强阴影效果，添加多层阴影
  box-shadow: 
    0 2px 8px rgba(0, 0, 0, 0.06),
    0 4px 16px rgba(0, 0, 0, 0.08),
    0 8px 32px rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.06); // 添加边框增强立体感
  margin-bottom: 24px; // 底部留出空间
  transition: all 0.3s ease; // 添加过渡效果
  
  // 悬停时增强阴影
  // &:hover {
  //   box-shadow: 
  //     0 4px 12px rgba(0, 0, 0, 0.08),
  //     0 8px 24px rgba(0, 0, 0, 0.12),
  //     0 16px 48px rgba(0, 0, 0, 0.06);
  //   transform: translateY(-2px); // 轻微上浮效果
  // }
  
  .ant-card-body {
    padding: 40px;
  }
}

/* 刷脸认证区域 */
.faceSection {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 40px;
}

.faceContainer {
  position: relative;
  margin-bottom: 16px;
}

.faceUpload {
  width: 120px;
  height: 120px;
  border: 2px dashed #d9d9d9;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #fafafa;
  transition: all 0.3s ease;
  // 为刷脸上传区域添加轻微阴影
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
  
  &:hover {
    border-color: #2d5cf6;
    background-color: #f0f9ff;
    box-shadow: 0 4px 8px rgba(45, 92, 246, 0.1); // 悬停时显示主题色阴影
  }
}

.cameraIcon {
  font-size: 36px;
  color: #bfbfbf;
}

.faceAvatar {
  background-color: #2d5cf6 !important;
  border: 3px solid #52c41a;
  // 为头像添加阴影
  box-shadow: 0 4px 12px rgba(45, 92, 246, 0.2);
}

.verifiedIcon {
  position: absolute;
  bottom: 8px;
  right: 8px;
  font-size: 24px;
  color: #52c41a;
  background: white;
  border-radius: 50%;
  padding: 2px;
  // 为认证图标添加阴影
  box-shadow: 0 2px 6px rgba(82, 196, 26, 0.3);
}

.faceButton {
  background: linear-gradient(135deg, #2d5cf6 0%, #4c7bff 100%);
  border: none;
  border-radius: 6px;
  font-weight: 500;
  height: 36px;
  padding: 0 20px;
  // 增强按钮阴影
  box-shadow: 0 3px 8px rgba(45, 92, 246, 0.3);
  transition: all 0.3s ease;
  
  &:hover {
    background: linear-gradient(135deg, #4c7bff 0%, #6b8fff 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(45, 92, 246, 0.4);
  }
  
  &:disabled {
    background: #52c41a;
    transform: none;
    box-shadow: 0 2px 6px rgba(82, 196, 26, 0.2);
    cursor: not-allowed;
  }
}

/* 表单样式 */
.form {
  .ant-form-item-label > label {
    font-weight: 500;
    color: #333;
  }
}

.readOnlyInput {
  background-color: #f5f5f5 !important;
  color: #666 !important;
  cursor: not-allowed;
}

.requiredField {
  .ant-form-item-label > label::after {
    content: "*";
    color: #ff4d4f;
    margin-left: 4px;
  }
}

/* 身份证上传 */
.idCardUpload {
  .ant-upload {
    width: 100% !important;
    height: 120px !important;
    border: 2px dashed #d9d9d9;
    border-radius: 8px;
    background-color: #fafafa;
    transition: all 0.3s ease;
    // 为上传区域添加阴影
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
    
    &:hover {
      border-color: #2d5cf6;
      background-color: #f0f9ff;
      box-shadow: 0 4px 8px rgba(45, 92, 246, 0.1);
    }
  }
  
  .ant-upload-select {
    width: 100% !important;
    height: 100% !important;
  }
}

.uploadContent {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 16px;
}

.uploadIcon {
  font-size: 32px;
  color: #bfbfbf;
  margin-bottom: 8px;
}

.uploadText {
  font-size: 12px;
  color: #999;
  margin-bottom: 8px;
}

.uploadButton {
  background-color: #f5f6fa;
  border: 1px solid #d9d9d9;
  color: #666;
  border-radius: 4px;
  font-size: 12px;
  // 为小按钮添加轻微阴影
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  
  &:hover {
    border-color: #2d5cf6;
    color: #2d5cf6;
    box-shadow: 0 2px 6px rgba(45, 92, 246, 0.15);
  }
}

.idCardImage {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 6px;
  // 为上传的图片添加阴影
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* 提交区域 */
.submitSection {
  margin-top: 32px;
  margin-bottom: 0 !important;
}

.submitButton {
  background: linear-gradient(135deg, #2d5cf6 0%, #4c7bff 100%);
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 16px;
  height: 48px;
  // 增强提交按钮阴影
  box-shadow: 
    0 4px 12px rgba(45, 92, 246, 0.3),
    0 2px 6px rgba(45, 92, 246, 0.2);
  transition: all 0.3s ease;
  
  &:hover {
    background: linear-gradient(135deg, #4c7bff 0%, #6b8fff 100%);
    transform: translateY(-2px);
    box-shadow: 
      0 8px 24px rgba(45, 92, 246, 0.4),
      0 4px 12px rgba(45, 92, 246, 0.3);
  }
  
  &:active {
    transform: translateY(0);
    box-shadow: 
      0 2px 8px rgba(45, 92, 246, 0.3),
      0 1px 4px rgba(45, 92, 246, 0.2);
  }
}

/* 输入框样式 */
.container {
  .ant-input,
  .ant-input-number,
  .ant-select-selector {
    border-radius: 6px;
    border: 1px solid #d9d9d9;
    transition: all 0.3s ease;
    // 为输入框添加轻微阴影
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    
    &:hover {
      border-color: #4c7bff;
      box-shadow: 0 2px 6px rgba(76, 123, 255, 0.1);
    }
    
    &:focus,
    &.ant-input-focused,
    &.ant-select-focused .ant-select-selector {
      border-color: #2d5cf6;
      box-shadow: 
        0 0 0 2px rgba(45, 92, 246, 0.2),
        0 2px 8px rgba(45, 92, 246, 0.15);
    }
  }
  
  .ant-input::placeholder {
    color: #bfbfbf;
  }
}

/* 响应式设计 */
@media (max-width: 768px) {
  .container {
    padding: 16px;
    height: 90vh; // 保持固定高度
  }
  
  .content {
    /* 移动端使用更细的滚动条 */
    &::-webkit-scrollbar {
      width: 4px;
    }
    
    &::-webkit-scrollbar-thumb {
      background: rgba(0, 0, 0, 0.12);
      border-radius: 2px;

      &:hover {
        background: rgba(0, 0, 0, 0.20);
      }
    }
  }
  
  .formCard {
    // 移动端减少阴影强度
    box-shadow: 
      0 1px 4px rgba(0, 0, 0, 0.06),
      0 2px 8px rgba(0, 0, 0, 0.08);
    
    &:hover {
      transform: none; // 移动端取消悬停上浮效果
      box-shadow: 
        0 1px 4px rgba(0, 0, 0, 0.06),
        0 2px 8px rgba(0, 0, 0, 0.08);
    }
    
    .ant-card-body {
      padding: 24px 20px;
    }
  }
  
  .faceUpload {
    width: 100px;
    height: 100px;
  }
  
  .cameraIcon {
    font-size: 28px;
  }
  
  .uploadContent {
    padding: 12px;
  }
  
  .uploadIcon {
    font-size: 24px;
  }
  
  .idCardUpload .ant-upload {
    height: 100px !important;
  }
}

@media (max-width: 576px) {
  .container {
    padding: 12px; // 进一步减少内边距
  }
  
  .content {
    padding-right: 4px; // 滚动条空间更小
  }
  
  .title {
    font-size: 20px !important;
    margin-bottom: 24px !important; // 减少标题下边距
  }
  
  .formCard {
    .ant-card-body {
      padding: 20px 16px;
    }
  }
  
  .submitButton {
    font-size: 14px;
    height: 44px;
  }
}