/* ===== post-form.css ===== */
/* 发布表单页样式（配合 style.css 公用头尾，勿覆盖 .header / .footer 等全站类名） */

/* ===== MAIN CONTENT ===== */
.pf-main {
  padding: 40px 0 60px;
  min-height: calc(100vh - 200px);
}

.pf-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 24px;
}

/* 面包屑 */
.pf-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  margin-bottom: 24px;
}

.bc-link {
  color: #6b7280;
  text-decoration: none;
  transition: color 0.2s;
}

.bc-link:hover {
  color: #002b5c;
}

.bc-sep {
  color: #6b7280;
}

.bc-current {
  color: #111827;
  font-weight: 500;
}

/* 页面标题 */
.pf-page-title-wrap {
  margin-bottom: 32px;
}

.pf-page-title {
  font-size: 30px;
  font-weight: 700;
  color: #111827;
  margin: 0 0 8px;
  line-height: 1.2;
}

.pf-page-desc {
  font-size: 16px;
  color: #6b7280;
  margin: 0;
}

/* ===== 表单 ===== */
.pf-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* 表单Section卡片 */
.pf-section {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 32px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Section标题（橙色竖条风格） */
.pf-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

.pf-section-title h2 {
  font-size: 18px;
  font-weight: 700;
  color: #1f2937;
  margin: 0;
}

.pf-section-bar {
  display: block;
  width: 4px;
  height: 18px;
  background: #ff6a00;
  border-radius: 2px;
  flex-shrink: 0;
}

/* 字段 */
.pf-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pf-label {
  font-size: 14px;
  font-weight: 500;
  color: #374151;
}

.pf-required {
  color: #ef4444;
}

/* 输入框 */
.pf-input {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  color: #374151;
  background: #fff;
  outline: none;
  transition: border-color 0.2s;
}

.pf-input:focus {
  border-color: #002b5c;
  box-shadow: 0 0 0 3px rgba(0,43,92,0.08);
}

.pf-input::placeholder {
  color: #9ca3af;
}

/* Textarea */
.pf-textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  color: #374151;
  background: #fff;
  outline: none;
  transition: border-color 0.2s;
  resize: vertical;
  min-height: 96px;
}

.pf-textarea:focus {
  border-color: #002b5c;
  box-shadow: 0 0 0 3px rgba(0,43,92,0.08);
}

.pf-textarea::placeholder {
  color: #9ca3af;
}

/* Select */
.pf-select-wrap {
  position: relative;
}

.pf-select-wrap::after {
  content: "";
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 10px;
  height: 10px;
  pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M2.5 4.5 6 8l3.5-3.5'/%3E%3C/svg%3E") no-repeat center;
  background-size: contain;
}

.pf-select {
  width: 100%;
  padding: 9px 30px 9px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  color: #374151;
  background: #fff;
  outline: none;
  appearance: none;
  cursor: pointer;
  transition: border-color 0.2s;
}

.pf-select:focus {
  border-color: #002b5c;
}

/* 省市选择器 */
.pf-area-picker {
  position: relative;
}

.pf-area-input-wrap {
  position: relative;
  cursor: pointer;
}

.pf-area-display {
  cursor: pointer;
  padding-right: 36px;
  background: #fff;
}

.pf-area-display::placeholder {
  color: #9ca3af;
}

.pf-area-arrow {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 10px;
  height: 10px;
  pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M2.5 4.5 6 8l3.5-3.5'/%3E%3C/svg%3E") no-repeat center;
  background-size: contain;
  transition: transform 0.2s;
}

.pf-area-picker.open .pf-area-arrow {
  transform: translateY(-50%) rotate(180deg);
}

.pf-area-mask {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: 200;
}

.pf-area-panel {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: 210;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(0, 43, 92, 0.12);
  overflow: hidden;
}

.pf-area-picker.open .pf-area-panel {
  display: flex;
  flex-direction: column;
}

.pf-area-picker.open .pf-area-mask {
  display: block;
}

.pf-area-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid #f3f4f6;
  background: #fafbfc;
}

.pf-area-panel-title {
  font-size: 14px;
  font-weight: 600;
  color: #002b5c;
}

.pf-area-close {
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  font-size: 20px;
  line-height: 1;
  color: #9ca3af;
  cursor: pointer;
  border-radius: 4px;
}

.pf-area-close:hover {
  background: #f3f4f6;
  color: #374151;
}

.pf-area-panel-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 240px;
  max-height: 280px;
}

.pf-area-list {
  list-style: none;
  margin: 0;
  padding: 6px 0;
  overflow-y: auto;
  border-right: 1px solid #f3f4f6;
}

.pf-area-list:last-child {
  border-right: none;
}

.pf-area-item {
  padding: 10px 16px;
  font-size: 14px;
  color: #374151;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pf-area-item:hover {
  background: #f0f4ff;
  color: #002b5c;
}

.pf-area-item.active {
  background: rgba(0, 43, 92, 0.08);
  color: #002b5c;
  font-weight: 600;
}

.pf-area-empty {
  padding: 24px 16px;
  font-size: 13px;
  color: #9ca3af;
  text-align: center;
}

.pf-area-panel-foot {
  display: flex;
  gap: 10px;
  padding: 12px 16px;
  border-top: 1px solid #f3f4f6;
  background: #fafbfc;
}

.pf-area-btn-clear,
.pf-area-btn-ok {
  flex: 1;
  padding: 10px 16px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  border: none;
}

.pf-area-btn-clear {
  background: #fff;
  border: 1px solid #d1d5db;
  color: #6b7280;
}

.pf-area-btn-clear:hover {
  border-color: #002b5c;
  color: #002b5c;
}

.pf-area-btn-ok {
  background: #002b5c;
  color: #fff;
}

.pf-area-btn-ok:hover {
  background: #001d40;
}

.pf-input-date {
  padding-right: 12px;
}

.pf-input-date::-webkit-calendar-picker-indicator {
  opacity: 0.55;
  cursor: pointer;
}

/* 两列网格 */
.pf-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

/* 范围输入 */
.pf-range-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pf-range-input {
  flex: 1;
}

.pf-range-sep {
  color: #9ca3af;
  font-size: 16px;
  flex-shrink: 0;
}

/* SMS 验证码 */
.pf-sms-wrap {
  display: flex;
  gap: 10px;
}

.pf-sms-wrap .pf-input {
  flex: 1;
}

.btn-get-sms {
  padding: 9px 14px;
  background: #fff;
  border: 1px solid #002b5c;
  border-radius: 6px;
  color: #002b5c;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
  transition: all 0.2s;
}

.btn-get-sms:hover {
  background: #002b5c;
  color: #fff;
}

.btn-get-sms:disabled {
  border-color: #d1d5db;
  color: #9ca3af;
  cursor: not-allowed;
  background: #f9fafb;
}

/* 上传区域 */
.pf-upload-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.pf-upload-grid-2 {
  grid-template-columns: repeat(2, 1fr);
  max-width: 480px;
}

.pf-upload-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1.5px dashed #d1d5db;
  border-radius: 8px;
  padding: 24px 12px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  font-size: 13px;
  color: #6b7280;
  min-height: 90px;
}

.pf-upload-slot:hover {
  border-color: #002b5c;
  background: #f0f4ff;
  color: #002b5c;
}

.pf-file-input {
  display: none;
}

.pf-upload-icon {
  width: 28px;
  height: 28px;
  opacity: 0.6;
}

.pf-upload-hint {
  font-size: 13px;
  color: #9ca3af;
  margin: 0;
  line-height: 1.5;
}

/* 提交区域 */
.pf-field-error input,
.pf-field-error select,
.pf-field-error textarea,
.pf-field-error .pf-area-trigger,
.pf-field-error .pf-upload-slot {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.25);
}

.pf-error-box {
  width: 100%;
  max-width: 640px;
  padding: 12px 16px;
  margin-bottom: 4px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 6px;
  color: #b91c1c;
  font-size: 14px;
  line-height: 1.6;
  word-break: break-word;
  text-align: left;
}

.pf-submit-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 8px 0 0;
}

.btn-pf-submit {
  padding: 14px 48px;
  background: #fea619;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  font-family: inherit;
}

.btn-pf-submit:hover {
  background: #e8940a;
}

.btn-pf-submit:active {
  transform: scale(0.98);
}

.pf-submit-tip {
  font-size: 13px;
  color: #9ca3af;
  margin: 0;
}

.pf-agree-link {
  color: #002b5c;
  text-decoration: underline;
}

.pf-agree-link:hover {
  color: #004080;
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
  .pf-area-panel {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    top: auto;
    border-radius: 16px 16px 0 0;
    max-height: 70vh;
  }

  .pf-area-panel-body {
    max-height: calc(70vh - 110px);
  }

  .pf-area-list {
    max-height: calc(70vh - 110px);
  }

  .pf-main {
    padding: 24px 0 48px;
  }

  .pf-container {
    padding: 0 16px;
  }

  .pf-section {
    padding: 20px 16px;
  }

  .pf-page-title {
    font-size: 22px;
  }

  .pf-grid-2 {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .pf-upload-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .pf-upload-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .btn-pf-submit { width: 100%; text-align: center; padding: 12px 24px; font-size: 15px; }
  .pf-page-title { font-size: 20px; }
  .pf-section-title { font-size: 16px; }
  .pf-section { padding: 16px 14px; }
  .pf-grid-2 { gap: 12px; }
  .pf-input, .pf-select, .pf-textarea { font-size: 16px; }
  .pf-submit-wrap { flex-direction: column; align-items: flex-start; gap: 12px; }
  .pf-agree-text { font-size: 12px; }
}

/* ===== 富文本编辑器 ===== */
.pf-editor-wrap {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.pf-editor-wrap .ql-toolbar.ql-snow {
  border: none;
  border-bottom: 1px solid #e5e7eb;
  background: #f9fafb;
  font-family: 'Noto Sans SC', sans-serif;
}

.pf-editor-wrap .ql-container.ql-snow {
  border: none;
  min-height: 220px;
  font-size: 14px;
  font-family: 'Noto Sans SC', sans-serif;
}

.pf-editor-wrap .ql-editor {
  min-height: 220px;
  line-height: 1.7;
  color: #374151;
}

.pf-editor-wrap .ql-editor.ql-blank::before {
  color: #9ca3af;
  font-style: normal;
}

.pf-editor-wrap .ql-editor img {
  max-width: 100%;
  height: auto;
}

.pf-field-inline {
  margin-top: 4px;
}

.pf-check-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

.pf-check-input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: #002b5c;
}

.pf-check-text {
  font-size: 14px;
  color: #374151;
  line-height: 1.6;
}

.pf-check-text strong {
  color: #dc2626;
}
