/**
 * 연수신청 폼(eraser_training_form) — 조건부 텍스트 필드 disabled 스타일
 * #eraser_training_form 내부로만 스코프 제한 (페이지 내 다른 폼 무영향)
 */
/* 폼 내부 제목(h3)/문단(p) 마진 정리 */
#eraser_training_form h3 {
  margin-block-start: 24px;
  margin-block-end: 0;
}
#eraser_training_form p {
  margin-block-end: 0;
}
/* HTML로 넣은 안내 문구 p(h3 없는 html 필드): 위 필드에 붙게 당김.
   p에 인라인 margin이 있어 override 위해 !important 사용 */
#eraser_training_form .elementor-field-type-html:not(:has(h3)) p {
  margin-top: -12px !important;
}
/* Other 상세(specify) 필드: 언더라인 스타일 통일 (profession_other / topics_other) */
#eraser_training_form .elementor-field-group-profession_other .elementor-field-textual,
#eraser_training_form .elementor-field-group-topics_other .elementor-field-textual {
  border: none;
  border-bottom: 1px solid #9ca3af;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: 4px 2px;
}
#eraser_training_form .elementor-field-group-profession_other .elementor-field-textual:focus,
#eraser_training_form .elementor-field-group-topics_other .elementor-field-textual:focus {
  outline: none;
  border-bottom-color: #111827;
  box-shadow: none;
}
#eraser_training_form .elementor-field-group-profession_other .elementor-field-textual:disabled,
#eraser_training_form .elementor-field-group-topics_other .elementor-field-textual:disabled {
  opacity: .5;
  border-bottom-color: #d1d5db;
  background: transparent;
  cursor: not-allowed;
}

/* topics: 필수 표시 (위젯에서 required 설정 불가 → 라벨에 별표 수동 추가) */
#eraser_training_form .elementor-field-group-topics > .elementor-field-label::after {
  content: " *";
  color: #e02b2b;
}

/* topics: 라벨 아래 상시 안내 문구 (기존 도움말 톤과 통일) */
#eraser_training_form .elementor-field-group-topics .etf-topics-note {
  margin: 0 0 0 12px;
  font-size: 13px;
  color: #6b7280;
}

/* topics: 최대 개수 도달 시 비활성 체크박스 + 라벨 회색 처리 */
#eraser_training_form .elementor-field-group-topics input[type="checkbox"]:disabled,
#eraser_training_form .elementor-field-group-topics input[type="checkbox"]:disabled + label {
  opacity: .45;
  cursor: not-allowed;
}

/* pref_language: "Other" 옆 인라인 밑줄 텍스트 필드 */
#eraser_training_form .etf-hidden-wrap {
  display: none;
}
#eraser_training_form .elementor-field-group-pref_language .elementor-field-option {
  display: inline-flex;
  align-items: center;
}
#eraser_training_form .elementor-field-option .etf-inline-other {
  margin-left: 10px;
  flex: 1 1 auto;
  width: auto;
  min-width: 280px;
  max-width: 100%;
  height: auto;
  padding: 2px 2px;
  border: none;
  border-bottom: 1px solid #9ca3af;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  line-height: 1.4;
}
#eraser_training_form .elementor-field-option .etf-inline-other:focus {
  outline: none;
  border-bottom-color: #111827;
  box-shadow: none;
}
/* Other 미선택(=disabled) 시: 숨기지 않고 회색 비활성 (레이아웃 유지) */
#eraser_training_form .elementor-field-option .etf-inline-other:disabled {
  opacity: .5;
  border-bottom-color: #d1d5db;
  cursor: not-allowed;
}

/* 라디오/체크박스와 라벨 사이 간격 */
#eraser_training_form .elementor-field-subgroup .elementor-field-option input[type="radio"],
#eraser_training_form .elementor-field-subgroup .elementor-field-option input[type="checkbox"] {
  margin-right: 8px;
}
/* pref_language: English / Other 옵션 사이 간격 */
#eraser_training_form .elementor-field-group-pref_language .elementor-field-option {
  margin-right: 20px;
}

/* 스텝 인디케이터: 구분선이 width:100%라 flex가 shrink 모드로 동작 → grow 무시됨.
   구분선 basis를 0으로 눌러 무력화하고, 칸:구분선 = 2:1 로 폭 분배 */
#eraser_training_form .e-form__indicators__indicator {
  flex: 2 1 0;
  min-width: 0;
}
#eraser_training_form .e-form__indicators__indicator__separator {
  flex: 1 1 0;
  width: auto;
}
#eraser_training_form .e-form__indicators__indicator__label {
  word-break: keep-all;
  overflow-wrap: normal;
}

/* 모바일: 라벨 숨기고 숫자 원 + 연결선만 표시 (5개 라벨이 겹쳐 깨지는 문제 해결) */
@media (max-width: 767px) {
  #eraser_training_form .e-form__indicators__indicator__label {
    display: none;
  }
}

/* topics 체크박스: 인라인 대신 그리드 정렬 (칸/간격 일정하게) */
#eraser_training_form .elementor-field-group-topics .elementor-field-subgroup {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 10px 16px;
  align-items: start;
}
#eraser_training_form .elementor-field-group-topics .elementor-field-option {
  display: flex;
  align-items: flex-start;
  margin: 0;
}
#eraser_training_form .elementor-field-group-topics .elementor-field-option input[type="checkbox"] {
  margin-top: 6px;
}
#eraser_training_form .elementor-field-group-topics .elementor-field-option label {
  line-height: 1.3;
}

/* 동의(acceptance): 체크박스와 텍스트를 라디오처럼 한 줄(row)로 정렬 */
#eraser_training_form .elementor-field-type-acceptance .elementor-field-option {
  display: flex;
  align-items: flex-start;
}
#eraser_training_form .elementor-field-type-acceptance .elementor-field-option input[type="checkbox"] {
  margin-top: 6px;
  flex: 0 0 auto;
}
#eraser_training_form .elementor-field-type-acceptance .elementor-field-option label {
  margin: 0;
  line-height: 1.4;
}
/* 동의(acceptance): 라벨이 비어 필수(*)가 안 나오므로 텍스트 뒤에 빨간 별표 추가 */
#eraser_training_form .elementor-field-type-acceptance.elementor-mark-required .elementor-field-option label::after {
  content: " *";
  color: #e02b2b;
}

/* 모바일 전용 오버라이드 (파일 끝: 데스크톱 규칙보다 뒤라 우선 적용) */
@media (max-width: 767px) {
  /* topics 안내 문구: 왼쪽 마진 제거 + 하단 마진 */
  #eraser_training_form .elementor-field-group-topics .etf-topics-note {
    margin-left: 0;
    margin-bottom: 8px;
  }
  /* topics 체크박스 세로 정렬값 축소 */
  #eraser_training_form .elementor-field-group-topics .elementor-field-option input[type="checkbox"] {
    margin-top: 4px;
  }
}
