/* ===== 报名表单弹层 ===== */

/* 遮罩层 */
.form-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.55);
  z-index: 1000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 20px;
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.form-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* 弹层卡片 */
.form-modal-card {
  width: 680px;
  max-width: 100%;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.2);
  transform: translateY(-20px);
  transition: transform 0.3s ease;
  margin: auto 0;
}

.form-modal-overlay.active .form-modal-card {
  transform: translateY(0);
}

/* 蓝色标题栏 */
.form-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 28px;
  background: #0067B9;
  color: #fff;
}

.form-modal-header h2 {
  font-size: 18px;
  font-weight: 600;
  margin: 0;
}

.form-modal-close {
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: background 0.2s;
  line-height: 1;
}

.form-modal-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* 表单内容区（可滚动） */
.form-modal-body {
  max-height: calc(100vh - 180px);
  overflow-y: auto;
  padding: 28px 32px 20px;
}

.form-modal-body::-webkit-scrollbar {
  width: 6px;
}

.form-modal-body::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 3px;
}

/* 表单行 */
.form-row {
  margin-bottom: 20px;
}

.form-row label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #101820;
  margin-bottom: 8px;
}

.form-row label .required {
  color: #E8450E;
  margin-left: 2px;
}

/* 文本输入 / 下拉选择 */
.form-row input[type="text"],
.form-row input[type="tel"],
.form-row input[type="email"],
.form-row select,
.form-row textarea {
  width: 100%;
  height: 42px;
  padding: 0 14px;
  border: 1px solid #D9D9D9;
  border-radius: 6px;
  font-size: 14px;
  color: #333;
  background: #fff;
  outline: none;
  transition: border-color 0.2s;
  font-family: inherit;
}

.form-row input::placeholder,
.form-row textarea::placeholder {
  color: #BFBFBF;
}

.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  border-color: #0067B9;
  box-shadow: 0 0 0 2px rgba(0, 103, 185, 0.12);
}

.form-row select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
  cursor: pointer;
}

/* 所在地区：两列 */
.form-row-inline {
  display: flex;
  gap: 16px;
}

.form-row-inline .form-col {
  flex: 1;
}

/* 文本域 */
.form-row textarea {
  height: 100px;
  padding: 12px 14px;
  resize: vertical;
  line-height: 1.6;
}

/* 单选 / 多选 选项组 */
.option-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.option-item {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  border: 1px solid #D9D9D9;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 14px;
  color: #333;
  user-select: none;
}

.option-item:hover {
  border-color: #0067B9;
  background: rgba(0, 103, 185, 0.04);
}

.option-item.selected {
  border-color: #0067B9;
  background: rgba(0, 103, 185, 0.08);
  color: #0067B9;
  font-weight: 500;
}

.option-item input[type="radio"],
.option-item input[type="checkbox"] {
  display: none;
}

/* 其他输入行（F. 其他：___ (请说明)） */
.option-other-input {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  padding-left: 16px;
}

.option-other-input span {
  font-size: 14px;
  color: #666;
  white-space: nowrap;
}

.option-other-input input {
  flex: 1;
  height: 36px;
  padding: 0 12px;
  border: 1px solid #D9D9D9;
  border-radius: 6px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}

.option-other-input input:focus {
  border-color: #0067B9;
}

/* 底部按钮区 */
.form-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 32px 24px;
  border-top: 1px solid #F0F0F0;
}

.btn-form-cancel {
  padding: 10px 28px;
  background: #fff;
  color: #333;
  border: 1px solid #D9D9D9;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-form-cancel:hover {
  border-color: #0067B9;
  color: #0067B9;
}

.btn-form-submit {
  padding: 10px 36px;
  background: #0067B9;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-form-submit:hover {
  background: #005299;
}

/* 提交中：置灰并挡住 hover 变色，防止重复提交 */
.btn-form-submit:disabled {
  background: #9CA3AF;
  cursor: not-allowed;
}

/* 响应式 */
@media (max-width: 768px) {
  .form-modal-overlay {
    padding: 16px 12px;
  }

  .form-modal-body {
    padding: 20px 18px 16px;
  }

  .form-modal-footer {
    padding: 14px 18px 20px;
  }

  .form-modal-header {
    padding: 16px 18px;
  }

  .form-row-inline {
    flex-direction: column;
    gap: 0;
  }
}
