/**
 * ============================================================
 * 工作信息发布向导 - 专用样式
 * ============================================================
 *
 * 设计要点（对照参考截图并优化）：
 * 1. 保留蓝色主色、胶囊按钮、底部双按钮导航等优点
 * 2. 改进：步骤进度条、字段标签不再使用刺目红色、RTL/LTR 自适应
 * 3. 底部抽屉选择器采用圆角卡片 + 选中高亮，替代居中长列表
 */

/* ---------- 向导容器：覆盖发布页，保留底部 Tab 栏 ---------- */
.job-publish-wizard {
  position: fixed;
  inset: 0;
  bottom: 72px;
  z-index: 200;
  background: #f1f5f9;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: jobWizardIn 0.28s ease;
}

.job-publish-wizard.hidden {
  display: none !important;
}

@keyframes jobWizardIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- 顶部栏：渐变蓝 + 返回 + 标题 + 步骤点 ---------- */
.job-publish-header {
  flex-shrink: 0;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #fff;
  padding: 14px 16px 16px;
  box-shadow: 0 4px 20px rgba(37, 99, 235, 0.35);
}

.job-publish-header-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.job-publish-back {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.job-publish-back:hover {
  background: rgba(255, 255, 255, 0.28);
}

.job-publish-header-title {
  flex: 1;
  font-size: 1.125rem;
  font-weight: 700;
  text-align: center;
  margin-inline-end: 40px;
}

.job-publish-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.job-publish-progress-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
  transition: all 0.3s ease;
}

.job-publish-progress-dot.active {
  width: 24px;
  background: #fff;
}

.job-publish-progress-dot.done {
  background: rgba(255, 255, 255, 0.75);
}

/* ---------- 可滚动内容区 ---------- */
.job-publish-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 20px 16px 24px;
}

.job-publish-step-title {
  text-align: center;
  font-size: 1rem;
  font-weight: 600;
  color: #2563eb;
  margin-bottom: 20px;
  line-height: 1.5;
}

/* ---------- 分段选择：胶囊按钮组 ---------- */
.job-segment-group {
  margin-bottom: 24px;
}

.job-segment-label {
  display: block;
  text-align: center;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #2563eb;
  margin-bottom: 12px;
}

.job-segment-row {
  display: flex;
  gap: 10px;
}

.job-segment-btn {
  flex: 1;
  padding: 14px 12px;
  border: 2px solid transparent;
  border-radius: 999px;
  background: #e2e8f0;
  color: #64748b;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.22s ease;
  line-height: 1.35;
}

.job-segment-btn:hover {
  background: #cbd5e1;
}

.job-segment-btn.active {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

/* ---------- 提示框：虚线边框，柔和灰色 ---------- */
.job-tip-box {
  border: 2px dashed #cbd5e1;
  border-radius: 16px;
  padding: 16px;
  background: #fff;
  color: #94a3b8;
  font-size: 0.8125rem;
  line-height: 1.65;
  text-align: center;
  margin-bottom: 8px;
}

/* ---------- 图片上传区 ---------- */
.job-upload-zone {
  border: 2px dashed #cbd5e1;
  border-radius: 16px;
  background: #fff;
  min-height: 160px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  overflow: hidden;
  position: relative;
}

.job-upload-zone:hover {
  border-color: #2563eb;
  background: #eff6ff;
}

.job-upload-zone.has-image {
  border-style: solid;
  padding: 0;
}

.job-upload-zone img {
  width: 100%;
  height: 160px;
  object-fit: cover;
}

.job-upload-icon {
  font-size: 2.5rem;
  color: #94a3b8;
  margin-bottom: 8px;
}

.job-upload-hint {
  font-size: 0.875rem;
  color: #2563eb;
  font-weight: 500;
  text-align: center;
  padding: 0 16px;
  margin-bottom: 16px;
}

/* ---------- 表单字段：标签 + 输入/选择 ---------- */
.job-field {
  margin-bottom: 16px;
}

.job-field-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #475569;
  margin-bottom: 6px;
  text-align: start;
}

.job-field-input,
.job-field-select {
  width: 100%;
  padding: 14px 16px;
  border: none;
  border-radius: 14px;
  background: #e2e8f0;
  color: #1e293b;
  font-size: 0.9375rem;
  outline: none;
  transition: box-shadow 0.2s, background 0.2s;
}

.job-field-input:focus,
.job-field-select:focus {
  background: #fff;
  box-shadow: 0 0 0 2px #2563eb;
}

.job-field-input::placeholder {
  color: #94a3b8;
}

.job-field-select {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  text-align: start;
  border: none;
}

.job-field-select.placeholder span {
  color: #94a3b8;
}

.job-field-select span {
  flex: 1;
  min-width: 0;
  text-align: start;
  line-height: 1.45;
  word-break: break-word;
}

.job-chevron {
  color: #94a3b8;
  font-size: 0.75rem;
  flex-shrink: 0;
  margin-inline-start: 10px;
}

.job-field-input {
  text-align: start;
}

.job-field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* ---------- 多选标签（福利等） ---------- */
.job-tag-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.job-tag-btn {
  padding: 10px 16px;
  border-radius: 999px;
  border: 2px solid #e2e8f0;
  background: #fff;
  color: #64748b;
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.job-tag-btn:hover {
  border-color: #93c5fd;
}

.job-tag-btn.active {
  border-color: #2563eb;
  background: #eff6ff;
  color: #2563eb;
}

.job-textarea {
  width: 100%;
  min-height: 120px;
  padding: 14px 16px;
  border: none;
  border-radius: 14px;
  background: #e2e8f0;
  color: #1e293b;
  font-size: 0.9375rem;
  resize: vertical;
  outline: none;
  line-height: 1.55;
}

.job-textarea:focus {
  background: #fff;
  box-shadow: 0 0 0 2px #2563eb;
}

/* ---------- 底部操作栏 ---------- */
.job-publish-footer {
  flex-shrink: 0;
  display: flex;
  gap: 12px;
  padding: 12px 16px 16px;
  background: #fff;
  border-top: 1px solid #e2e8f0;
  box-shadow: 0 -4px 20px rgba(15, 23, 42, 0.06);
}

.job-footer-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 16px;
  border: none;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s;
}

.job-footer-btn:active {
  transform: scale(0.98);
}

.job-footer-btn-prev {
  background: linear-gradient(135deg, #f87171, #ef4444);
  color: #fff;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.3);
}

.job-footer-btn-next {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

.job-footer-btn-submit {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

.job-footer-btn-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
}

/* ---------- 底部抽屉选择器 ---------- */
.job-picker-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(15, 23, 42, 0.45);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s, visibility 0.25s;
}

.job-picker-overlay.open {
  opacity: 1;
  visibility: visible;
}

.job-picker-sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 301;
  background: #fff;
  border-radius: 20px 20px 0 0;
  max-height: 70vh;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.32s cubic-bezier(0.32, 0.72, 0, 1);
  box-shadow: 0 -8px 40px rgba(15, 23, 42, 0.12);
}

.job-picker-sheet.open {
  transform: translateY(0);
}

.job-picker-handle {
  width: 40px;
  height: 4px;
  background: #e2e8f0;
  border-radius: 999px;
  margin: 10px auto 0;
}

.job-picker-title {
  text-align: center;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #64748b;
  padding: 14px 16px 8px;
}

.job-picker-search {
  margin: 0 16px 12px;
  padding: 12px 16px;
  border-radius: 12px;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  gap: 10px;
}

.job-picker-search input {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  font-size: 0.9375rem;
  color: #1e293b;
}

.job-picker-list {
  flex: 1;
  overflow-y: auto;
  padding-inline: 16px;
  padding-block-end: 24px;
}

.job-picker-item {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding-block: 14px;
  padding-inline: 20px;
  border: none;
  background: transparent;
  text-align: start;
  font-size: 0.9375rem;
  color: #334155;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.15s;
}

.job-picker-item:hover {
  background: #f1f5f9;
}

.job-picker-item.active {
  background: #eff6ff;
  color: #2563eb;
  font-weight: 600;
}

/* 薪资选项：略大字号与字重，数字范围更易辨认 */
.job-picker-item--salary {
  font-size: 1rem;
  font-weight: 600;
  color: #1e293b;
  font-variant-numeric: tabular-nums;
}

.job-picker-item--salary.active {
  color: #2563eb;
}

/* 表单中已选薪资展示 */
.job-field--salary .job-field-select {
  font-size: 1rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.job-picker-cascade {
  display: flex;
  flex: 1;
  min-height: 240px;
  overflow: hidden;
}

.job-picker-cascade-col {
  flex: 1;
  overflow-y: auto;
  border-inline-start: 1px solid #f1f5f9;
}

.job-picker-cascade-col:first-child {
  border-inline-start: none;
}

html[dir="rtl"] .job-publish-header-title {
  margin-inline-end: 0;
  margin-inline-start: 40px;
}

html[dir="rtl"] .job-publish-back .fa-arrow-left {
  transform: scaleX(-1);
}

html[dir="rtl"] .job-chevron {
  transform: scaleX(-1);
}

html[dir="rtl"] .job-footer-btn-icon {
  transform: scaleX(-1);
}

.page-add-wizard-active #addPageMain {
  visibility: hidden;
  pointer-events: none;
}
