/* booking.css — 访客预约页(移动端优先,390px 设计宽) */

* { margin: 0; padding: 0; box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  background: #f5f6f7;
  color: #1f2329;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

button, input, textarea { font: inherit; color: inherit; }

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 12px 32px;
}

@media (min-width: 600px) {
  .page { padding: 48px 16px; }
}

.card {
  width: 100%;
  max-width: 560px;
  background: #fff;
  border: 1px solid #e5e6e8;
  border-radius: 8px;
  padding: 24px 20px 28px;
}

/* ---- 头部 ---- */
.title { font-size: 18px; font-weight: 700; line-height: 1.4; }
.subtitle { margin-top: 4px; font-size: 13px; color: #646a73; }

/* ---- 区块 ---- */
.section { margin-top: 24px; }
.section-label { margin-bottom: 8px; font-size: 13px; font-weight: 600; color: #646a73; }

/* ---- 日期 chips(横向滚动) ---- */
.date-scroller {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin: 0 -20px;
  padding: 0 20px 4px;
  -webkit-overflow-scrolling: touch;
}
.date-scroller::-webkit-scrollbar { display: none; }

.date-chip {
  flex: 0 0 auto;
  min-width: 64px;
  padding: 8px 12px;
  border: 1px solid #e5e6e8;
  border-radius: 8px;
  background: #fff;
  text-align: center;
  cursor: pointer;
}
.date-chip .dow { display: block; font-size: 12px; font-weight: 500; color: #646a73; }
.date-chip .md { display: block; margin-top: 4px; font-size: 14px; font-weight: 600; color: #1f2329; }
.date-chip.selected { border-color: #2367ea; background: rgba(35, 103, 234, 0.06); }
.date-chip.selected .dow,
.date-chip.selected .md { color: #2367ea; }
.date-chip:disabled { cursor: not-allowed; background: #f5f6f7; }
.date-chip:disabled .dow,
.date-chip:disabled .md { color: #c9ccd1; }

/* ---- 时段网格(3 列) ---- */
.slot-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.slot-btn {
  padding: 8px 0;
  border: 1px solid #e5e6e8;
  border-radius: 8px;
  background: #fff;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}
.slot-btn.selected {
  background: #2367ea;
  border-color: #2367ea;
  color: #fff;
  font-weight: 600;
}

/* ---- 表单 ---- */
.form-field { margin-top: 16px; }
.form-field label { display: block; margin-bottom: 8px; font-size: 13px; font-weight: 600; }
.form-field .req { color: #d93026; }
.form-field input,
.form-field textarea,
.form-field select {
  display: block;
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #e5e6e8;
  border-radius: 8px;
  background: #fff;
  font-size: 16px; /* <16px 会触发 iOS Safari 聚焦时自动缩放页面 */
  -webkit-appearance: none;
  appearance: none;
}
.form-field textarea { min-height: 72px; resize: vertical; }
.form-field input:focus,
.form-field textarea:focus { border-color: #2367ea; outline: none; }
.form-field input::-webkit-input-placeholder,
.form-field textarea::-webkit-input-placeholder { color: #a2a7ad; }
.form-field input::placeholder,
.form-field textarea::placeholder { color: #a2a7ad; }

.submit-btn {
  width: 100%;
  margin-top: 24px;
  padding: 12px 0;
  border: none;
  border-radius: 8px;
  background: #2367ea;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
.submit-btn:active { background: #1d59cd; }
.submit-btn:disabled { opacity: 0.5; cursor: default; }

.inline-error { margin-top: 12px; font-size: 13px; font-weight: 500; color: #d93026; }

.empty-notice { margin-top: 24px; padding: 24px 0; text-align: center; font-size: 14px; color: #646a73; }

.loading { padding: 48px 0; text-align: center; font-size: 14px; color: #646a73; }

/* ---- 错误卡片 ---- */
.error-view { padding: 40px 8px 32px; text-align: center; }
.error-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto;
  border-radius: 50%;
  background: #f5f6f7;
  color: #646a73;
  font-size: 24px;
  font-weight: 600;
  line-height: 48px;
}
.error-title { margin-top: 16px; font-size: 16px; font-weight: 600; }
.error-sub { margin-top: 8px; font-size: 13px; color: #646a73; }

/* ---- 成功卡片 ---- */
.success-view { padding: 32px 8px 24px; text-align: center; }
.success-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto;
  border-radius: 50%;
  background: #34a853;
  color: #fff;
  font-size: 28px;
  font-weight: 600;
  line-height: 56px;
}
.success-icon.is-pending { background: #f1b429; }
.success-title { margin-top: 16px; font-size: 18px; font-weight: 700; }
.success-time { margin-top: 8px; font-size: 15px; font-weight: 600; }
.success-note { margin-top: 8px; font-size: 13px; color: #646a73; }
