/* 채용공고 등록·수정 페이지 전용 스타일 */

/* ── 페이지 레이아웃 ── */
.job-create-page {
  padding: 24px 0 80px;
  background: #f4f7fb;
  min-height: 100vh;
}

.job-create-shell {
  max-width: 960px;
  margin: 0 auto;
}

.job-create-card {
  background: #fff;
  border: 1px solid #dbe3f1;
  border-radius: 16px;
  padding: 36px 40px;
  box-shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
}

.job-create-head {
  margin-bottom: 28px;
}

.job-create-head h3 {
  margin: 0;
  font-size: 1.4rem;
  color: #0f172a;
}

.job-create-form {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.job-create-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ── 섹션 제목·구분선 ── */
.job-create-section + .job-create-section {
  padding-top: 28px;
  border-top: 1px solid #eef2f7;
}

.job-section-title {
  margin: 0 0 4px;
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
}

.job-section-optional {
  font-size: 0.8rem;
  font-weight: 500;
  color: #94a3b8;
}

/* ── 그리드 ── */
.job-create-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px 20px;
}

.manager-source-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.manager-source-grid .job-create-field.span-2 {
  grid-column: span 2;
}

.job-create-grid-top {
  grid-template-columns: 180px minmax(220px, 1fr) minmax(220px, 1fr);
}

/* ── 개별 필드 ── */
.job-create-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.job-create-field.full {
  grid-column: 1 / -1;
}

.job-create-field > label:first-child {
  font-size: 14px;
  font-weight: 600;
  color: #334155;
}

.required-asterisk {
  margin-left: 2px;
  color: #dc2626;
  font-weight: 700;
}

.job-field-hint {
  margin: 0;
  color: #94a3b8;
  font-size: 12px;
  line-height: 1.5;
}

.job-create-field input,
.job-create-field select,
.job-create-field textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  color: #0f172a;
  font-size: 14px;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.job-create-field input::placeholder,
.job-create-field textarea::placeholder {
  color: #a3aebf;
}

.job-create-field input:focus,
.job-create-field select:focus,
.job-create-field textarea:focus {
  border-color: #24a89a;
  box-shadow: 0 0 0 3px rgba(36, 168, 154, 0.13);
}

.job-create-field input:user-invalid,
.job-create-field select:user-invalid,
.job-create-field textarea:user-invalid {
  border-color: #f1a5a5;
}

.job-create-field input:disabled,
.job-create-field select:disabled {
  background: #f3f5f8;
  color: #94a3b8;
  cursor: not-allowed;
}

.job-create-field textarea {
  min-height: 180px;
  resize: vertical;
  line-height: 1.65;
}

.job-field-inline {
  display: flex;
  gap: 8px;
  align-items: center;
}

.job-field-inline > select {
  width: 220px;
  flex: 0 0 220px;
}

.job-field-inline > input {
  flex: 1;
  min-width: 180px;
}

/* ── 선택지 그룹 (경력·고용형태·급여·지원 경로) ── */
.employment-grid,
.option-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 20px;
  margin-top: 4px;
}

/* 고용형태·급여가 같은 열 기준을 써서 라디오 위치가 세로로 맞는다 */
.employment-grid,
.option-grid-4 {
  grid-template-columns: minmax(150px, 1.1fr) minmax(230px, 1.4fr) minmax(200px, 1.2fr) minmax(200px, 1.2fr);
}

.employment-grid .job-option-line {
  white-space: nowrap;
}

.line-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  align-items: center;
  margin-top: 4px;
}

.job-option-line {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  color: #334155;
  font-size: 14px;
  white-space: nowrap;
  cursor: pointer;
}

.job-option-line input[type="radio"],
.job-option-line input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #24a89a;
  cursor: pointer;
  flex-shrink: 0;
}

/* ── 인라인 숫자 입력 ── */
.job-inline-number {
  width: 100px;
  height: 36px;
  padding: 7px 10px;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  font-size: 14px;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.job-inline-number:focus {
  border-color: #24a89a;
  box-shadow: 0 0 0 3px rgba(36, 168, 154, 0.13);
}

.job-inline-number:disabled {
  background: #f3f5f8;
  border-color: #edf1f6;
  color: #cbd5e1;
  cursor: not-allowed;
}

#job-employment-period {
  width: 72px;
  min-width: 72px;
  padding: 7px 8px;
}

/* ── 지역 드롭다운 행 ── */
.region-row {
  display: flex;
  gap: 10px;
}

.region-row select {
  flex: 1;
}

/* ── 마감일 행 ── */
.deadline-row {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

.deadline-row input[type="date"] {
  flex: 1;
  min-width: 0;
}

.deadline-special-note {
  width: 100%;
  color: #0d7065;
  font-size: 12px;
}

.deadline-quick {
  flex-shrink: 0;
  height: 40px;
  padding: 0 14px;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
  color: #475569;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.deadline-quick:hover,
.deadline-quick.selected {
  border-color: #24a89a;
  background: #ecfaf7;
  color: #0d7065;
}

/* ── 자동완성 ── */
.autocomplete-wrap {
  position: relative;
}

.autocomplete-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  max-height: 220px;
  overflow-y: auto;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.1);
  z-index: 200;
}

.autocomplete-dropdown.open {
  display: block;
}

.autocomplete-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 9px 14px;
  border-bottom: 1px solid #f1f5f9;
  color: #0f172a;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.1s;
}

.autocomplete-item:last-child {
  border-bottom: none;
}

.autocomplete-item:hover,
.autocomplete-item.active {
  background: #f0faf9;
}

.autocomplete-item:hover .autocomplete-item-name,
.autocomplete-item.active .autocomplete-item-name {
  color: #0d7065;
}

.autocomplete-item-name {
  overflow: hidden;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.autocomplete-item-name mark {
  background: none;
  color: #24a89a;
  font-weight: 700;
}

.autocomplete-item-sub {
  overflow: hidden;
  color: #94a3b8;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.autocomplete-empty {
  padding: 12px 14px;
  color: #94a3b8;
  font-size: 13px;
  text-align: center;
}

/* ── 하단 동의 및 버튼 ── */
.job-create-footer {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-top: 28px;
  border-top: 1px solid #eef2f7;
}

.job-create-help {
  margin: 0;
  color: #94a3b8;
  font-size: 12px;
  line-height: 1.5;
}

.job-create-consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 14px 16px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
  color: #334155;
  font-size: 13px;
  line-height: 1.6;
}

.job-create-consent input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  accent-color: #24a89a;
  flex-shrink: 0;
  cursor: pointer;
}

.job-create-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.job-create-actions .btn {
  min-width: 120px;
  height: 44px;
}

/* ── 반응형 ── */
@media (min-width: 861px) and (max-width: 1060px) {
  .employment-grid,
  .option-grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .job-create-page {
    padding: 16px 0 48px;
    background: #fff;
  }

  .job-create-card {
    padding: 24px 20px;
    border-radius: 14px;
    box-shadow: none;
  }

  .job-create-grid,
  .job-create-grid-top,
  .manager-source-grid {
    grid-template-columns: 1fr;
  }

  .manager-source-grid .job-create-field.span-2 {
    grid-column: auto;
  }

  .job-create-actions .btn {
    flex: 1;
  }

  .region-row {
    gap: 8px;
  }

  .region-row select {
    min-width: 0;
  }

  .line-group {
    gap: 10px 20px;
  }

  .job-field-inline {
    flex-direction: column;
    align-items: stretch;
  }

  .job-field-inline > select,
  .job-field-inline > input {
    width: 100%;
    flex: 1 1 auto;
  }

  .employment-grid,
  .option-grid,
  .option-grid-4 {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}
