/**
 * ============================================================
 * 房源信息发布向导 - 专用样式（琥珀色主题）
 * ============================================================
 *
 * 设计要点：
 * 1. 对照截图保留列表勾选行、底部抽屉、胶囊按钮等交互形态
 * 2. 使用琥珀/橙色渐变区分于工作发布的蓝色主题
 * 3. 完整支持 RTL/LTR 双向排版
 */

/* ---------- 向导容器 ---------- */
.house-publish-wizard {
  position: fixed;
  inset: 0;
  bottom: 72px;
  z-index: 200;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: houseWizardIn 0.28s ease;
}

.house-publish-wizard.hidden {
  display: none !important;
}

@keyframes houseWizardIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- 顶部栏：琥珀渐变 ---------- */
.house-publish-header {
  flex-shrink: 0;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #fff;
  padding: 14px 16px 16px;
  box-shadow: 0 4px 20px rgba(245, 158, 11, 0.35);
}

.house-publish-header-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.house-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;
}

.house-publish-header-title {
  flex: 1;
  font-size: 1.125rem;
  font-weight: 700;
  text-align: center;
  margin-inline-end: 40px;
}

.house-publish-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.house-publish-progress-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
  transition: all 0.3s ease;
}

.house-publish-progress-dot.active {
  width: 24px;
  background: #fff;
}

.house-publish-progress-dot.done {
  background: rgba(255, 255, 255, 0.75);
}

/* ---------- 内容区 ---------- */
.house-publish-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 20px 16px 24px;
}

.house-publish-step-title {
  text-align: center;
  font-size: 1rem;
  font-weight: 600;
  color: #d97706;
  margin-bottom: 20px;
  line-height: 1.5;
}

/* ---------- 分段选择 ---------- */
.house-segment-group {
  margin-bottom: 24px;
}

.house-segment-label {
  display: block;
  text-align: center;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #d97706;
  margin-bottom: 12px;
}

.house-segment-row {
  display: flex;
  gap: 10px;
}

.house-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;
}

.house-segment-btn.active {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
}

.house-type-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.house-type-btn {
  padding: 12px 8px;
  border: 2px solid #e2e8f0;
  border-radius: 14px;
  background: #fff;
  color: #64748b;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.house-type-btn.active {
  border-color: #f59e0b;
  background: #fffbeb;
  color: #d97706;
}

.house-tip-box {
  border: 2px dashed #fcd34d;
  border-radius: 16px;
  padding: 16px;
  background: #fff;
  color: #94a3b8;
  font-size: 0.8125rem;
  line-height: 1.65;
  text-align: center;
}

/* ---------- 表单字段 ---------- */
.house-field {
  margin-bottom: 16px;
}

.house-field-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #475569;
  margin-bottom: 6px;
}

.house-required {
  color: #ef4444;
  margin-inline-start: 2px;
}

.house-field-input,
.house-textarea {
  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;
}

.house-field-input:focus,
.house-textarea:focus {
  background: #fff;
  box-shadow: 0 0 0 2px #f59e0b;
}

.house-field-select {
  width: 100%;
  padding: 14px 16px;
  border: none;
  border-radius: 14px;
  background: #e2e8f0;
  color: #1e293b;
  font-size: 0.9375rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  text-align: start;
}

.house-field-select.placeholder span {
  color: #94a3b8;
}

.house-field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.house-chevron {
  color: #94a3b8;
  font-size: 0.75rem;
  flex-shrink: 0;
}

.house-internal-note {
  font-size: 0.75rem;
  color: #94a3b8;
  text-align: center;
  margin-top: 8px;
}

/* ---------- 勾选列表行（对照截图） ---------- */
.house-check-list {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 20px;
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.06);
}

.house-check-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 16px 14px;
  border: none;
  border-bottom: 1px solid #f1f5f9;
  background: #fff;
  cursor: pointer;
  text-align: start;
  font-size: 0.9375rem;
  color: #334155;
}

.house-check-row:last-child {
  border-bottom: none;
}

.house-check-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: transparent;
  font-size: 0.625rem;
}

.house-check-icon.done {
  background: #f59e0b;
  color: #fff;
}

.house-check-label {
  font-weight: 500;
  flex-shrink: 0;
}

.house-check-value {
  flex: 1;
  text-align: end;
  color: #64748b;
  font-size: 0.875rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------- 价格/面积行 ---------- */
.house-price-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.house-unit-tag {
  padding: 8px 12px;
  background: #fffbeb;
  color: #d97706;
  border-radius: 10px;
  font-size: 0.8125rem;
  font-weight: 600;
  flex-shrink: 0;
}

.house-negotiable-check {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8125rem;
  color: #64748b;
  cursor: pointer;
}

/* ---------- 图片上传 ---------- */
.house-upload-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.house-upload-slot {
  width: 88px;
  height: 88px;
  border-radius: 14px;
  border: 2px dashed #cbd5e1;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.house-upload-slot.add {
  color: #94a3b8;
  font-size: 1.5rem;
}

.house-upload-slot.has-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.house-upload-remove {
  position: absolute;
  top: 4px;
  inset-inline-end: 4px;
  width: 22px;
  height: 22px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 0.625rem;
  cursor: pointer;
}

.house-upload-hint {
  font-size: 0.75rem;
  color: #94a3b8;
  margin-top: 8px;
}

/* ---------- 摘要卡片 ---------- */
.house-summary-card {
  background: #fff;
  border-radius: 16px;
  padding: 16px;
  margin-top: 8px;
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.06);
}

.house-summary-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.875rem;
}

.house-summary-row:last-child {
  border-bottom: none;
}

.house-summary-row span {
  color: #64748b;
  flex-shrink: 0;
}

.house-summary-row strong {
  text-align: end;
  color: #1e293b;
  word-break: break-all;
}

/* ---------- 底部操作栏 ---------- */
.house-publish-footer {
  flex-shrink: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px 16px 16px;
  background: #fff;
  border-top: 1px solid #e2e8f0;
  box-shadow: 0 -4px 20px rgba(15, 23, 42, 0.06);
}

.house-footer-btn {
  flex: 1;
  min-width: calc(50% - 5px);
  padding: 14px 12px;
  border: none;
  border-radius: 999px;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s;
}

.house-footer-btn:active {
  transform: scale(0.98);
}

.house-footer-btn.outline {
  background: #fff;
  border: 2px solid #f59e0b;
  color: #d97706;
}

.house-footer-btn.secondary {
  background: #f1f5f9;
  color: #64748b;
}

.house-footer-btn.primary {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
}

.house-footer-btn.draft {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #fff;
  flex-basis: 100%;
}

/* ---------- 底部抽屉选择器 ---------- */
.house-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;
}

.house-picker-overlay.open {
  opacity: 1;
  visibility: visible;
}

.house-picker-sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 301;
  background: #fff;
  border-radius: 20px 20px 0 0;
  max-height: 75vh;
  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);
}

.house-picker-sheet.open {
  transform: translateY(0);
}

.house-picker-handle {
  width: 40px;
  height: 4px;
  background: #e2e8f0;
  border-radius: 999px;
  margin: 10px auto 0;
}

.house-picker-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px 12px;
}

.house-picker-header-btn {
  border: none;
  background: transparent;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  padding: 8px 12px;
}

.house-picker-header-btn.clear {
  color: #64748b;
}

.house-picker-header-btn.done {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  border-radius: 10px;
}

.house-picker-title {
  flex: 1;
  text-align: center;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #334155;
}

.house-picker-body {
  flex: 1;
  overflow-y: auto;
  padding: 0 12px 24px;
}

.house-picker-item {
  display: block;
  width: 100%;
  padding: 14px 16px;
  border: none;
  background: transparent;
  text-align: start;
  font-size: 0.9375rem;
  color: #334155;
  border-radius: 12px;
  cursor: pointer;
}

.house-picker-item.active {
  background: #fffbeb;
  color: #d97706;
  font-weight: 600;
}

.house-picker-cascade {
  display: flex;
  min-height: 260px;
}

.house-picker-cascade-col {
  flex: 1;
  overflow-y: auto;
  border-inline-start: 1px solid #f1f5f9;
}

.house-picker-cascade-col:first-child {
  border-inline-start: none;
}

.house-chip-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.house-chip {
  padding: 12px 8px;
  border: none;
  border-radius: 12px;
  background: #f1f5f9;
  color: #475569;
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
}

.house-chip.active {
  background: #fffbeb;
  color: #d97706;
  font-weight: 600;
  box-shadow: inset 0 0 0 2px #f59e0b;
}

.house-layout-row {
  margin-bottom: 16px;
}

.house-layout-row-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #64748b;
  margin-bottom: 8px;
}

.house-layout-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.house-layout-chip {
  min-width: 44px;
  padding: 10px 14px;
  border: none;
  border-radius: 10px;
  background: #f1f5f9;
  color: #475569;
  font-size: 0.875rem;
  cursor: pointer;
}

.house-layout-chip.active {
  background: #f59e0b;
  color: #fff;
}

.house-floor-inputs {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px 12px;
  align-items: center;
  margin-bottom: 16px;
}

.house-floor-inputs label {
  font-size: 0.8125rem;
  color: #64748b;
}

.house-floor-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

html[dir="rtl"] .house-publish-header-title {
  margin-inline-end: 0;
  margin-inline-start: 40px;
}

html[dir="rtl"] .house-chevron {
  transform: scaleX(-1);
}
