/* ============================================================
 * contact.css —— 联系表单（Arup 风格）
 * 两列布局 + 下划线输入框 + 红色错误提示 + 绿色对勾
 * ============================================================ */

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 40px 20px 64px;
}

h1 {
  font-size: 30px;
  font-weight: 600;
  margin: 0 0 6px;
  color: #111;
}

.form-desc {
  font-size: 14px;
  color: #666;
  margin: 0 0 10px;
}

/* ---------------- 表单主体 ---------------- */
.form-box {
  border-top: 1px solid #111;
  padding-top: 10px;
}

/* 两列栅格：PC 两列，平板/手机单列 */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px 48px;
  margin-bottom: 22px;
}
.form-submit-row {
  display: flex;
  justify-content: center;
}
.form-row-single {
  grid-template-columns: 1fr;
}

.form-field {
  position: relative;
  padding-bottom: 6px;
}
.form-field label {
  display: block;
  font-size: 16px;
  letter-spacing: 0.3px;
  color: #666;
  margin-bottom: 4px;
}
.form-field .req {
  color: #e5484d;
  font-weight: 600;
}
.form-field .opt {
  color: #999;
  font-size: 12px;
  font-weight: normal;
}

/* 下划线式输入框（Arup 风格） */
.form-field input[type="text"],
.form-field select,
.form-field textarea {
  display: block;
  width: 100%;
  padding: 8px 26px 8px 0;
  border: none;
  border-bottom: 1px solid #c9c9c9;
  border-radius: 0;
  background: transparent;
  font-size: 15px;
  color: #111;
  outline: none;
  transition: border-color 0.2s ease;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
}
.form-field select {
  cursor: pointer;
  padding-right: 30px;
  background: transparent url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23999' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 8px center;
}
.form-field textarea {
  resize: vertical;
  min-height: 90px;
  line-height: 1.6;
}
.form-field input::placeholder,
.form-field textarea::placeholder {
  color: #b5b5b5;
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-bottom-color: #111;
}

/* 右侧状态图标（感叹号 / 对勾） */
.field-status {
  position: absolute;
  right: 0;
  top: 30px;
  width: 18px;
  height: 18px;
  display: none;
  align-items: center;
  justify-content: center;
}
.field-status svg {
  width: 16px;
  height: 16px;
}

/* ---- 错误状态：红线下 + 红字提示 + 感叹号 ---- */
.form-field.has-error input[type="text"],
.form-field.has-error select,
.form-field.has-error textarea {
  border-bottom-color: #e5484d;
}
.form-field.has-error .field-status {
  display: flex;
}
.error-tip {
  font-size: 12px;
  color: #e5484d;
  line-height: 1.5;
  min-height: 18px;
  padding-top: 6px;
  display: none;
}
.form-field.has-error .error-tip {
  display: block;
}

/* ---- 通过状态：绿线 + 对勾 ---- */
.form-field.is-valid input[type="text"],
.form-field.is-valid select,
.form-field.is-valid textarea {
  border-bottom-color: #2c9a4f;
}
.form-field.is-valid .field-status {
  display: flex;
}

/* ---------------- 附件上传 ---------------- */
.upload-box {
  padding-top: 6px;
}
.upload-trigger {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 22px 16px;
  border: 1px dashed #c9c9c9;
  background: #fafafa;
  color: #666;
  cursor: pointer;
  text-align: center;
  transition:
    border-color 0.2s,
    background 0.2s;
}
.upload-trigger:hover,
.upload-trigger.dragover {
  border-color: #111;
  background: #f5f3ee;
  color: #111;
}
.upload-icon {
  font-size: 20px;
  line-height: 1;
}
.file-list {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
}
.file-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  margin-bottom: 6px;
  background: #fafafa;
  border: 1px solid #e8e8e8;
  font-size: 13px;
}
.file-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.file-size {
  flex-shrink: 0;
  color: #999;
}
.file-remove {
  flex-shrink: 0;
  border: none;
  background: none;
  color: #e5484d;
  cursor: pointer;
  font-size: 12px;
  padding: 0 2px;
}
.file-remove:hover {
  text-decoration: underline;
}

/* ---------------- 提交按钮 ---------------- */
.upload-progress {
  height: 4px;
  margin-bottom: 14px;
  background: #eee;
  overflow: hidden;
}
.upload-progress-bar {
  display: block;
  height: 100%;
  width: 0;
  background: #111;
  transition: width 0.2s;
}
#submitBtn {
  display: inline-block;
  width: 252px;
  padding: 10px 30px;
  background: #111;
  color: #fff;
  /* border: 1px solid #111; */
  border-radius: 999px;
  font-size: 15px;
  letter-spacing: 2px;
  cursor: pointer;
  transition:
    background 0.2s,
    color 0.2s;
}
#submitBtn:hover {
  background: #333;
}
#submitBtn:disabled {
  background: #999;
  border-color: #999;
  cursor: not-allowed;
}

/* ---------------- 提交成功页 ---------------- */
.success-box {
  max-width: 640px;
  margin: 40px auto 60px;
  padding: 48px 32px;
  text-align: center;
}
.success-icon {
  width: 84px;
  height: 84px;
  margin: 0 auto 24px;
}
.success-icon svg {
  width: 100%;
  height: 100%;
}
.success-title {
  font-size: 28px;
  font-weight: 600;
  color: #111;
  margin: 0 0 30px;
}
.success-sub {
  font-size: 17px;
  color: #333;
  margin: 0 0 10px;
}
.success-desc {
  font-size: 14px;
  color: #333;
  margin: 0 0 36px;
  line-height: 1.7;
}
.success-actions {
  display: flex;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
}
.btn {
  display: inline-block;
  padding: 10px 35px;
  border-radius: 999px;
  font-size: 15px;
  letter-spacing: 1px;
  text-decoration: none;
  width: 180px;
  /* 黑底白字：hover 动画由 common.css 统一规则提供（金色 + 光泽扫过） */
  color: #fff;
  background: #111;
  border: 1px solid #111;
  transition:
    background 0.2s,
    color 0.2s,
    border-color 0.2s;
}

.btn:hover {
  color: #fff;
}

/* ---------------- 响应式 ---------------- */
@media (max-width: 860px) {
  .container {
    padding: 28px 16px 48px;
  }
  h1 {
    font-size: 24px;
  }
  .form-row {
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 14px;
  }
  /* 省份/城市在手机上保持两列同行 */
  .form-row-half {
    grid-template-columns: 1fr 1fr;
  }
  #submitBtn {
    width: 100%;
  }
  .success-box {
    margin: 20px 0 40px;
    padding: 36px 20px;
  }
  .success-title {
    font-size: 24px;
  }
  .success-actions {
    flex-direction: column;
  }
  .btn {
    width: 100%;
  }
}
