/* 脸厂数商 人脸授权平台 · 合作清单（底部固定悬浮条 + 悬浮清单 icon） */

/* 悬浮合作清单 icon */
.coop-fab {
  position: fixed;
  right: 18px;
  bottom: 150px;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 8px 20px var(--brand-glow);
  cursor: pointer;
  z-index: 99998;
  transition: transform .2s;
}
.coop-fab:hover { transform: scale(1.06); }
.coop-fab svg { width: 26px; height: 26px; }
.coop-fab-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 10px;
  background: #222;
  color: #fff;
  font-size: 12px;
  line-height: 20px;
  text-align: center;
  border: 2px solid #fff;
  box-sizing: content-box;
}

/* 底部固定悬浮条（无遮罩，不阻断页面操作） */
.coop-sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: #fff;
  z-index: 100000;
  border-radius: 16px 16px 0 0;
  transform: translateY(100%);
  transition: transform .3s cubic-bezier(.2, .8, .2, 1), height .25s ease;
  box-shadow: 0 -8px 30px rgba(0, 0, 0, .16);
  height: auto;
  display: flex;
  flex-direction: column;
}
.coop-sheet.show { transform: translateY(0); }
/* 展开态：高度自适应内容并吸底（不再固定 62vh，避免条数少时下方留大片空白） */
.coop-sheet.expanded { height: auto; max-height: 78vh; }

.coop-sheet-handle {
  width: 40px;
  height: 4px;
  border-radius: 2px;
  background: #e3e3e8;
  margin: 10px auto 4px;
  flex: none;
  cursor: pointer;
}
.coop-sheet-body { padding: 6px 18px 18px; overflow: hidden; }
/* 展开态：头部与结算区固定，仅人员列表滚动 */
.coop-sheet.expanded .coop-sheet-body {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.coop-sheet.expanded .coop-detail-head,
.coop-sheet.expanded .coop-detail-foot { flex: none; }

/* 页面在底部条出现时自动留空，避免内容被遮挡（高度由 JS 实测写入 --coop-sheet-h） */
body.coop-bar-open { padding-bottom: 110px; }
body.coop-bar-open.coop-bar-expanded { padding-bottom: calc(var(--coop-sheet-h, 320px) + 12px); }

/* 小悬浮条（默认） */
.coop-mini-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 0 10px;
}
.coop-mini-stat { flex: 1; text-align: center; }
.coop-mini-num { font-size: 22px; font-weight: 800; color: #1a1a1a; }
.coop-mini-label { font-size: 12px; color: #888; margin-top: 2px; }
.coop-mini-pay { flex: none; }
.coop-mini-sub {
  font-size: 12px;
  color: #888;
  text-align: center;
  border-top: 1px solid #f0f0f0;
  padding-top: 10px;
}
.coop-mini-sub a { color: #1677ff; cursor: pointer; margin-left: 4px; }

/* 详情清单 */
.coop-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 16px;
  font-weight: 700;
  padding: 4px 2px 12px;
}
.coop-detail-head .coop-close {
  font-size: 24px;
  color: #bbb;
  cursor: pointer;
  line-height: 1;
}
/* 人员列表：最多完整展示 3 条，超出在列表内上下滚动（标题与结算区保持固定）
 * 精确高度由 coop.js 按前 3 条实测高度写入 --coop-list-max，缓存值仅作兜底 */
.coop-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 0 1 auto;
  min-height: 0;
  max-height: var(--coop-list-max, 267px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 4px;
}
.coop-list::-webkit-scrollbar { width: 6px; }
.coop-list::-webkit-scrollbar-thumb { background: #d9dbe0; border-radius: 3px; }
.coop-list::-webkit-scrollbar-thumb:hover { background: #c2c5cc; }
.coop-empty { text-align: center; color: #999; padding: 30px 0; font-size: 14px; }
.coop-empty a { color: #1677ff; }
.coop-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid #f4f4f4;
}
/* 🔴 2026-10-05 张总令：这里是「头像」位，取值是 face_assets.avatar_url = 正面 1:1 未剪裁的 512×512，
   容器必须同步改成正方形 —— 沿用 48×64（3:4）会让 cover 再裁掉两侧 12.5%，等于把未裁剪的头像又剪了一遍。 */
.coop-item-avatar {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
  background: #f0f0f0;
  flex: none;
}
.coop-item-avatar.fallback {
  display: grid;
  place-items: center;
  font-size: 22px;
  color: #bbb;
}
.coop-item-info { flex: 1; min-width: 0; }
.coop-item-name { font-size: 15px; font-weight: 700; }
.coop-item-name .badge { font-size: 11px; margin-left: 6px; }
.coop-item-sub { font-size: 12px; color: #888; margin-top: 3px; }
/* 价格区与减号横向排列：减号在价格右侧（而非下方） */
.coop-item-price {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex: none;
  text-align: right;
}
.coop-price-stack { flex: none; }
.coop-tag {
  display: inline-block;
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 600;
}
.coop-tag.in { background: #e8f8ee; color: #1a9b54; }
.coop-tag.pay { background: var(--brand-soft); color: var(--brand); }
.coop-item-free { color: #1a9b54; font-weight: 700; font-size: 13px; }
/* 减号（移除该合作人员，等同删除，外卖式样式） */
.coop-item-minus {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  flex: none;
  order: 1;
  font-size: 18px;
  line-height: 1;
  color: var(--brand);
  background: #fff;
  border: 1.5px solid var(--brand);
  border-radius: 50%;
  cursor: pointer;
  transition: background .15s, color .15s, transform .15s;
}
.coop-item-minus:hover { background: var(--brand); color: #fff; transform: scale(1.08); }

.coop-detail-foot {
  margin-top: 12px;
  border-top: 1px solid #f0f0f0;
  padding-top: 12px;
}
.coop-price-row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  margin-bottom: 6px;
  color: #444;
}
.coop-price-row .coop-pay-amt { color: var(--brand); font-weight: 800; font-size: 18px; }
.coop-price-row .coop-pay-amt-green { color: #2bbf6a; font-weight: 800; font-size: 15px; }
.coop-price-row.coop-row-total { border-top: 1px dashed #eee; margin-top: 4px; padding-top: 8px; }
.coop-price-row.coop-row-total .coop-pay-amt { font-size: 20px; }
.coop-price-row.coop-pts-note { color: #999; font-size: 12px; }
/* 底部迷你条积分明细 */
.coop-pts-line {
  margin: 8px 2px 2px; padding: 8px 10px; border-radius: 8px;
  background: linear-gradient(135deg, #fff7e6, #fffbe9);
  border: 1px solid #ffe7a3; color: #ad6800; font-size: 12px; line-height: 1.5;
}
/* 信用卡积分中心风格：金额 + 积分 + 还需支付（详情结算区） */
.coop-detail-foot .coop-pay-amt-green { margin-left: auto; }

/* 清单每条演员的价格堆叠 */
.coop-price-stack { text-align: right; line-height: 1.5; }
.coop-price-origin { font-size: 12px; color: #999; text-decoration: line-through; }
.coop-price-disc { font-size: 14px; color: var(--brand); font-weight: 700; }
/* 积分提示：独占一行，紧跟在价格下方 */
.coop-price-note { display: block; margin-top: 3px; }
.coop-price-note .coop-pts-tag {
  display: inline-block; padding: 1px 6px; border-radius: 4px;
  background: #e6f7ff; color: #1677ff; font-size: 11px; font-weight: 400;
  white-space: nowrap;
}

/* 支付按钮 */
.coop-pay-btn {
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: 22px;
  padding: 10px 26px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s;
}
.coop-pay-btn:hover { background: var(--brand-d); }
.coop-pay-btn.block { display: block; width: 100%; border-radius: 26px; padding: 13px; margin-top: 4px; }
.coop-pay-btn:disabled { background: rgba(22, 119, 255, .35); cursor: not-allowed; }

/* 添加合作按钮显隐控制（兼容块级红按钮与蓝色圆形加号） */
.coop-add-hidden { display: none !important; }

/* 首页卡片授权类型行 */
.artist-auth-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding-bottom: 8px;
}
.artist-auth-label {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}
.artist-auth-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  flex: 1;
  align-items: center;
}
.coop-plus {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: none;
  background: var(--brand);
  color: #fff;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  flex: none;
  transition: background .2s, transform .15s;
}
.coop-plus:hover { background: var(--brand-d); transform: scale(1.08); }
.coop-plus:disabled { background: #b7b7b7; cursor: not-allowed; transform: none; }

/* 首页卡片图片左上角多选框 */
.coop-check-wrap {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.coop-check {
  appearance: none;
  width: 20px;
  height: 20px;
  border: 2px solid #fff;
  border-radius: 4px;
  background: rgba(255, 255, 255, .9);
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .22);
  transition: background .15s, border-color .15s;
  margin: 0;
}
.coop-check:checked {
  background: var(--brand);
  border-color: var(--brand);
}
.coop-check:checked::after {
  content: '';
  display: block;
  width: 5px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: translate(4px, 1px) rotate(45deg);
}

/* ---------- T4 及以上（定制档）：不可自助勾选，点击弹出商务报价提示 ---------- */
/* 注意：不使用 disabled，否则拿不到点击事件；改为灰态样式 + 点击后自动取消勾选 */
.coop-check.coop-locked {
  background: #e9eaee;
  border-color: #d5d7dd;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .12);
  cursor: not-allowed;
}
.coop-check.coop-locked:checked { background: #e9eaee; border-color: #d5d7dd; }
.coop-check.coop-locked:checked::after { display: none; }
.coop-plus.coop-locked,
.coop-plus.coop-locked:hover {
  background: #e9eaee;
  color: #a6a9b1;
  transform: none;
  cursor: not-allowed;
}
/* 卡片左上角定制档角标 */
.coop-check-wrap.coop-locked-wrap { cursor: not-allowed; }

/* ---------- 定制档商务报价提示弹窗 ---------- */
.coop-quote-mask {
  position: fixed;
  inset: 0;
  background: rgba(15, 18, 32, .45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100002;
  padding: 20px;
}
.coop-quote-card {
  width: 100%;
  max-width: 380px;
  background: #fff;
  border-radius: 16px;
  padding: 22px 22px 18px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, .22);
  text-align: center;
  animation: coopQuoteIn .18s ease;
}
@keyframes coopQuoteIn {
  from { transform: translateY(10px) scale(.98); opacity: 0; }
  to { transform: none; opacity: 1; }
}
.coop-quote-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: #fff7e6;
  color: #d48806;
  display: grid;
  place-items: center;
  font-size: 26px;
}
.coop-quote-title { font-size: 17px; font-weight: 800; color: #1a1a1a; margin-bottom: 8px; }
.coop-quote-desc { font-size: 13px; color: #666; line-height: 1.8; }
.coop-quote-desc strong { color: #1a1a1a; }
.coop-quote-actions { display: flex; gap: 10px; margin-top: 18px; }
.coop-quote-btn {
  flex: 1;
  border: none;
  border-radius: 22px;
  padding: 11px 0;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.coop-quote-btn.ghost { background: #f2f3f5; color: #555; }
.coop-quote-btn.primary { background: var(--brand); color: #fff; }
.coop-quote-btn.primary:hover { background: var(--brand-d); }
