/*
 * 项目: 美团易丰小程序
 * 由 scaffold-organizer-miniapp.sh 从 prototypes/师傅端APP/c端/design-tokens.css 复制（只读，未改源文件）。
 * 换色：请只改下方「品牌色」；布局/字号 token 建议保持与母版一致。本项目禁用 box-shadow。
 */

:root {
  /* 师傅端 App / 收纳师小程序原型 · 设计 Token
   * 在 organizer-common.css 之后引入，覆盖默认主色并统一语义变量。
   * 组件仍可读 var(--primary) 等与 organizer-common 对齐的别名。 */
  /* ========== 品牌色（美团易丰 · 搬家红）========== */
  --color-brand-main: #ff3b30;
  --color-brand-light: #fff0ef;
  --color-brand-border: rgba(255, 59, 48, 0.25);
  /* 与 organizer-common 兼容的主色链 */
  --primary: #ff3b30;
  --primary-dark: #e0342a;
  --primary-light: #ff6b62;
  --primary-soft: #fff0ef;
  --price: #ff3b30;
  --cta-gradient: linear-gradient(90deg, var(--primary-light) 0%, var(--primary-dark) 100%);
  /* 易丰小程序 · 与「确定」按钮同色，选中态/主按钮统一引用 */
  --yf-red: var(--primary);
  --yf-red-soft: var(--primary-soft);
  --yf-confirm-disabled: #ffc9c9;

  /* ========== 成功 ========== */
  --color-success-main: #52c41a;
  --color-success-light: rgba(82, 196, 26, 0.1);
  --color-success-border: rgba(82, 196, 26, 0.2);
  --success: var(--color-success-main);
  --success-bg: var(--color-success-light);
  --success-border: var(--color-success-border);

  /* ========== 警告 ========== */
  --color-warn-main: #ff9500;
  --color-warn-light: rgba(255, 149, 0, 0.1);
  --color-warn-border: rgba(255, 149, 0, 0.2);
  --warn: var(--color-warn-main);
  --warn-bg: var(--color-warn-light);
  --warn-border: var(--color-warn-border);

  /* ========== 错误 / 危险 ========== */
  --color-error-main: #f53f3f;
  --color-error-light: #fff0f0;
  --color-error-border: rgba(245, 63, 63, 0.22);
  --color-danger-main: var(--color-error-main);
  --color-danger-light: var(--color-error-light);
  --color-danger-border: var(--color-error-border);

  /* ========== 信息（蓝）========== */
  --color-info-main: #3478f6;
  --color-info-light: #f0f6ff;
  --color-info-border: rgba(52, 120, 246, 0.22);

  /* ========== 紫色（系统/图示头像等）========== */
  --color-purple-main: #8b5cf6;
  --color-purple-light: #f3f0ff;
  --color-purple-border: rgba(139, 92, 246, 0.22);
  --avatar-accent: #a896ff;

  /* ========== 背景层级 ========== */
  --gradient-top-start: #fafcfd;
  --page-bg: #f8f8f8;
  --canvas-bg: #f8f8f8;
  --card: #ffffff;
  --notice-bg: #fff8f0;
  --notice-border: #f0e6d8;
  --member-card-start: #2d2e37;
  --member-card-end: #4a4c59;

  /* ========== 文字色层级 ========== */
  --text: #222222;
  --text-2: #666666;
  --text-3: #999999;
  --placeholder: #cccccc;

  /* ========== 边框色 ========== */
  --border: #eeeeee;
  --tabbar-border: #e8eaed;
  --split: #eeeeee;

  /* ========== 圆角（场景分层）========== */
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 18px;
  --radius-pill: 20px;
  --radius-pill-full: 999px;
  /* 与 organizer-common 历史变量对齐 */
  --radius: var(--radius-md);

  /* ========== 阴影层级（美团易丰：全站禁用，保留变量名供 common 引用）========== */
  --shadow-xs: none;
  --shadow-sm: none;
  --shadow-md: none;
  --shadow-lg: none;
  --shadow-sheet: none;
  --shadow-brand-soft: none;

  /* ========== 间距（常用数值）========== */
  --space-1: 4px;
  --space-2: 6px;
  --space-3: 8px;
  --space-4: 10px;
  --space-5: 12px;
  --space-6: 14px;
  --space-7: 16px;
  --space-8: 24px;
  --space-page: 16px;

  /* ========== 字号层级 ========== */
  --font-size-xs: 10px;
  --font-size-sm: 11px;
  --font-size-base: 14px;
  --font-size-md: 15px;
  --font-size-lg: 16px;
  --font-size-xl: 18px;
  --font-size-2xl: 26px;
  /* 与 organizer-common 对齐的语义字号 */
  --fs-title-lg: 18px;
  --fs-title-md: 16px;
  --fs-body: 14px;
  --fs-body-sm: 13px;
  --fs-caption: 12px;
  --fs-mini: 11px;
  --fs-tag: 12px;
  --fs-badge: 10px;
  --fs-amount-lg: 26px;
  --fs-amount-xl: 28px;
  --fs-nav-filter: 15px;
  /*
   * 任务详情子页（`任务详情.html` · frame--grab-dock）
   * 正文区「信息卡 + 快捷四键 + 分区卡片 + 底坞滑道」的字号与网格常量；新页优先用变量避免与列表页 14px 正文混用。
   */
  --task-detail-grid-gap: var(--space-3);
  --task-detail-progress-cols: 4;
  --task-detail-op-cols: 4;
  --task-detail-pill-height: 29px;
  --task-detail-pill-padding-y: var(--space-2);
  --task-detail-pill-padding-x: var(--space-2);
  --task-detail-main-value-fs: var(--fs-body-sm);
  --task-detail-dense-fs: var(--fs-caption);
  --task-detail-dense-line-height: 1.3;
  --task-detail-fee-line-height: 1.6;
  /*
   * 白卡片板块标题（`yf-block-head` · 确认订单/服务详情等）
   * 标题 + 底部分隔线；线左右缩进与内容区一致（同 `margin: * 14px` 的提示条）。
   */
  --yf-block-head-pad-x: 14px;
  --yf-block-head-pad-top: 14px;
  --yf-block-head-line-gap: 10px;
  --yf-block-head-line-color: #f5f5f5;
  --yf-content-inset-x: 14px;

  --grab-dock-hero-bg-height: 150px;
  --grab-dock-hero-curve-rx: 50%;
  --grab-dock-hero-curve-ry: 22px;
  /* 底栏滑动确认条：轨道渐变与拇指色见 organizer-common.css（.grab-slide__track / .grab-slide__thumb），与 --primary 链一致 */
  /* 分区标题（detail-section-title）与任务详情局部间距 */
  --task-detail-section-title-pad-bottom: 10px;
  --task-detail-section-title-margin-bottom: 12px;
  --task-detail-icon-stack-gap: var(--space-1);
  --task-detail-icon-act-padding-top: 1px;
  --task-detail-foot-pills-gap: var(--space-3);
  --task-detail-foot-pills-padding-top: var(--space-5);
  --task-detail-foot-pills-padding-bottom: var(--space-1);
  --task-detail-foot-pills-margin-top: var(--space-1);
  --task-detail-stat-pill-gap: var(--space-1);
  --task-detail-stat-pill-padding-y: var(--space-1);
  --task-detail-stat-pill-padding-x: var(--space-3);
  --task-detail-fee-ol-margin-top: var(--space-3);
  --task-detail-fee-li-margin-bottom: var(--space-2);
  --task-detail-service-type-line-height: 1.55;
  --task-detail-fee-foot-margin-top: var(--space-3);

  /* ========== 字重 ========== */
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --font-weight-extrabold: 800;

  /* ========== 动效 ========== */
  --duration-fast: 0.12s;
  --duration-normal: 0.15s;
  --duration-slow: 0.2s;
  --duration-sheet: 0.25s;
  --easing-standard: ease;
  --easing-out-soft: cubic-bezier(0.25, 0.8, 0.25, 1);

  /* ========== 移动端布局常量 ========== */
  --shell-max: 448px;
  --tabbar-h: 64px;
  --hero-padding-top: 16px;
  --hero-padding-x: 16px;
  --hero-padding-bottom: 4px;
  --safe-area-top: env(safe-area-inset-top, 0px);
  --safe-area-bottom: env(safe-area-inset-bottom, 0px);
  --safe-area-left: env(safe-area-inset-left, 0px);
  --safe-area-right: env(safe-area-inset-right, 0px);
}

/*
 * 全项目禁用 box-shadow（覆盖 organizer-common 及页面内联）
 * 层级靠背景、边框、分割线区分，新增页面勿再加投影。
 */
.preview-wrap .phone-shell,
.preview-wrap .phone-shell *,
.preview-wrap .grab-bottom-dock,
.preview-wrap .grab-bottom-dock * {
  box-shadow: none !important;
}

/*
 * 子页顶栏 sub-nav：标题按整条导航栏视觉居中（不受左右按钮宽度影响）
 * 结构：sub-nav__back | sub-nav__title | sub-nav__right（含 yf-cat-header__wx 胶囊）
 */
.phone-shell--sub .sub-nav {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  box-sizing: border-box;
  overflow: hidden;
  min-height: 44px;
  width: 100%;
  max-width: 100%;
}

/* 确认订单等 C 端子页：顶栏无底部分割线 */
.yf-confirm-page > .sub-nav,
.yf-coupon-page > .sub-nav {
  border-bottom: none;
  box-shadow: none;
}

.phone-shell--sub .sub-nav__back {
  position: relative;
  z-index: 1;
  width: 32px;
  height: 32px;
  font-size: 26px;
  line-height: 32px;
  text-align: center;
  flex-shrink: 0;
}

.phone-shell--sub .sub-nav__title {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  min-width: 0;
  max-width: calc(100% - 120px);
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 17px;
  font-weight: 600;
  pointer-events: none;
}

.phone-shell--sub .sub-nav__right {
  position: relative;
  z-index: 1;
  width: auto;
  max-width: 88px;
  flex-shrink: 0;
  min-width: 0;
  overflow: hidden;
  margin-left: auto;
}

.phone-shell--sub .sub-nav__right .yf-cat-header__wx {
  margin-left: 0;
  max-width: 100%;
}

/* ========== 易丰 C 端 · 白卡片板块标题 yf-block-head ========== */
.yf-block-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: var(--yf-block-head-pad-top, 14px) var(--yf-block-head-pad-x, 14px)
    calc(var(--yf-block-head-line-gap) * 2 + 1px);
  position: relative;
}
.yf-block-head::after {
  content: "";
  position: absolute;
  left: var(--yf-content-inset-x, 14px);
  right: var(--yf-content-inset-x, 14px);
  bottom: var(--yf-block-head-line-gap);
  height: 1px;
  background: var(--yf-block-head-line-color, #f5f5f5);
}
.yf-block-head__title {
  margin: 0;
  font-size: var(--font-size-xl, 18px);
  font-weight: 700;
  color: var(--text, #222);
}
.yf-block-head__main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.yf-block-head__link {
  flex: 0 0 auto;
  font-size: 12px;
  color: var(--text-3, #999);
  text-decoration: none;
  white-space: nowrap;
  padding-top: 2px;
}
.yf-block-head:has(.yf-block-head__link):not(:has(.yf-block-head__main)) {
  align-items: center;
}
.yf-block-head:has(.yf-block-head__link):not(:has(.yf-block-head__main)) .yf-block-head__link {
  padding-top: 0;
}

/* ========== 易丰 · 选择楼层信息 Sheet ========== */
.yf-floor-sheet .sheet__panel {
  max-height: 82vh;
  display: flex;
  flex-direction: column;
}
.yf-floor-sheet .sheet__head {
  border-bottom: none;
  padding-bottom: 8px;
}
.yf-floor-sheet__body {
  padding: 0 16px 12px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}
.yf-floor-elevator {
  width: 100%;
  min-height: 48px;
  border: 1.5px solid #e8e8e8;
  border-radius: 10px;
  background: #fff;
  font-size: 16px;
  font-weight: 600;
  color: var(--text, #222);
  cursor: pointer;
  box-sizing: border-box;
}
.yf-floor-elevator.is-active {
  border-color: var(--yf-red, #ff4d4f);
  color: var(--yf-red, #ff4d4f);
  background: #fff;
}
.yf-floor-stairs-tip {
  margin: 16px 0 12px;
  font-size: 14px;
  color: var(--text, #222);
  line-height: 1.4;
}
.yf-floor-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.yf-floor-grid__btn {
  min-height: 44px;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  background: #fff;
  font-size: 15px;
  font-weight: 500;
  color: var(--text, #222);
  cursor: pointer;
  box-sizing: border-box;
}
.yf-floor-grid__btn.is-active {
  border-color: var(--yf-red, #ff4d4f);
  color: var(--yf-red, #ff4d4f);
  background: var(--yf-red-soft, #fff0ef);
  font-weight: 600;
}
.yf-floor-sheet__foot {
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
  background: #fff;
  border-top: 1px solid #f5f5f5;
}
.yf-floor-confirm {
  width: 100%;
  border: none;
  border-radius: 999px;
  padding: 14px 16px;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  background: var(--yf-red, #ff4d4f);
  cursor: pointer;
}
.yf-floor-confirm:disabled {
  background: #ffc9c9;
  cursor: not-allowed;
}
.yf-floor-confirm:not(:disabled):active {
  opacity: 0.92;
}

/* ========== 易丰 · 选择搬家城市 Sheet ========== */
.yf-city-sheet .sheet__panel {
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  border-radius: 16px 16px 0 0;
}
.yf-city-sheet .sheet__head {
  border-bottom: none;
  padding: 16px 16px 8px;
}
.yf-city-sheet .sheet__ghost {
  display: none;
}
.yf-city-sheet .sheet__title {
  flex: 1;
  text-align: left;
  font-weight: 700;
  font-size: 17px;
}
.yf-city-sheet .sheet__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.yf-city-sheet__body {
  padding: 0 16px 12px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}
.yf-city-sheet__sec-label {
  margin: 12px 0 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-3, #999);
  line-height: 1.3;
  text-align: left;
}
.yf-city-sheet__sec-label:first-child {
  margin-top: 0;
}
.yf-city-current {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 4px;
}
.yf-city-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.yf-city-chip {
  width: 100%;
  box-sizing: border-box;
  min-height: 41px;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  padding: 0 6px;
  background: #fff;
  font-size: 14px;
  font-weight: 500;
  color: var(--text, #222);
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.yf-city-chip.is-active {
  border-color: var(--yf-red, #ff4d4f);
  color: var(--yf-red, #ff4d4f);
  background: var(--yf-red-soft, #fff0ef);
  font-weight: 600;
}
.yf-city-chip:active {
  opacity: 0.92;
}
.yf-city-sheet__foot {
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
  background: #fff;
  border-top: 1px solid #f5f5f5;
}
.yf-city-confirm {
  width: 100%;
  border: none;
  border-radius: 999px;
  padding: 14px 16px;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  background: var(--yf-red, #ff4d4f);
  cursor: pointer;
}
.yf-city-confirm:disabled {
  background: #ffc9c9;
  cursor: not-allowed;
}
.yf-city-confirm:not(:disabled):active {
  opacity: 0.92;
}
