/* 联系方式大行：类型图标 + 类型小字 + 号码 + 右侧按钮。
   用户端联系方式、各端「联系平台」、品艺共用（contact_line.html 的 $ctRich）。
   号码放不下一行时，sf_copy_script.html 里的 pmFitContact 把字号缩到一行（最小 13px），再放不下才折行。 */
.sf-ctc-list { display: flex; flex-direction: column; gap: 8px; }
.sf-ctc-list > .sf-ctc-row { margin: 0; }
/* 副标题紧跟抽屉标题：收窄标题栏下边距，不用负边距（抽屉内容区会裁掉顶出去的部分）；左边和标题对齐，长了折两行 */
.pm-gsheet--contact .pm-gsheet-head { padding-bottom: 4px; }
.sf-ctc-sub {
  display: -webkit-box;
  margin: 0 4px 12px;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink-dim, #8b8d93);
  overflow-wrap: anywhere;
}
.sf-ctc-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 62px;
  margin: 8px 0 0;
  padding: 10px 8px 10px 10px;
  border-radius: 14px;
  background: rgba(118, 118, 128, .08);
  box-sizing: border-box;
}
.pm-gsheet .sf-ctc-row { background: rgba(255, 255, 255, .85); }
.sf-ct-main > .sf-ctc-row:first-child { margin-top: 0; }
.sf-ct-who + .sf-ctc-row { margin-top: 6px; }
.sf-ctc-ico {
  flex: none;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: rgba(118, 118, 128, .12);
  color: var(--ink, #141416);
}
.sf-ctc-ico .pm-icon { width: 20px; height: 20px; }
.sf-ctc-row.is-wechat .sf-ctc-ico { background: rgba(7, 193, 96, .12); color: var(--sf-wechat, #07c160); }
.sf-ctc-row.is-tg .sf-ctc-ico,
.sf-ctc-row.is-tg2 .sf-ctc-ico,
.sf-ctc-row.is-tggroup .sf-ctc-ico,
.sf-ctc-row.is-tgchannel .sf-ctc-ico { background: rgba(34, 158, 217, .12); color: var(--sf-tg, #229ed9); }
.sf-ctc-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.sf-ctc-txt small { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; line-height: 1.35; color: var(--ink-dim, #8b8d93); }
.sf-ctc-txt b { font-size: 16.5px; font-weight: 700; line-height: 1.3; color: var(--ink, #141416); white-space: normal; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
/* pmFitContact 量过放得下一行才加 is-fit；没跑脚本时宁可折行也不裁掉 */
.sf-ctc-txt b.is-fit { overflow: hidden; white-space: nowrap; }
.sf-ctc-row.is-dead { opacity: .55; }
.sf-ctc-act { flex: none; display: flex; gap: 6px; }
.sf-ctc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 50px;
  height: 34px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  transition: transform .12s cubic-bezier(.2, .9, .25, 1), background .12s cubic-bezier(.2, .9, .25, 1);
}
.sf-ctc-btn:active { transform: scale(.96); }
.sf-ctc-btn.is-ink { background: var(--ink, #141416); color: #fff; }
.sf-ctc-btn.is-soft { background: rgba(118, 118, 128, .12); color: var(--ink, #141416); }
.sf-ctc-act:has(> :nth-child(2)) .sf-ctc-btn { min-width: 46px; padding: 0 10px; }

/* 用户端联系方式抽屉：外面还有一层联系人卡片，再收紧一点 */
.pm-gsheet--contact .sf-ct-person { padding-right: 8px; padding-left: 8px; }
.pm-gsheet--contact .sf-ct-who { padding: 0 8px; }
.sf-ct-rank .sf-ctc-row { gap: 8px; padding-right: 6px; padding-left: 8px; }
.sf-ct-rank .sf-ctc-ico { width: 34px; height: 34px; border-radius: 10px; }
.sf-ct-rank .sf-ctc-ico .pm-icon { width: 19px; height: 19px; }

/* 放不下时按钮整组挪到号码下面：按钮占满一整行，号码留在图标右边；左边空出图标 + 间距 */
@media (max-width: 359px) {
  .sf-ctc-row:has(.sf-ctc-act > :nth-child(2)) { flex-wrap: wrap; row-gap: 8px; }
  .sf-ctc-row .sf-ctc-act:has(> :nth-child(2)) { width: 100%; padding-left: 46px; box-sizing: border-box; }
  .sf-ct-rank .sf-ctc-row .sf-ctc-act:has(> :nth-child(2)) { padding-left: 42px; }
  .sf-ctc-row .sf-ctc-act:has(> :nth-child(2)) .sf-ctc-btn { flex: 1; }
}
/* 号码太长、缩到 14px 还挤不下时 pmFitContact 加 is-stack：按钮挪到下面一行，号码独占一行 */
.sf-ctc-row.is-stack { flex-wrap: wrap; row-gap: 8px; }
.sf-ctc-row.is-stack .sf-ctc-act { width: 100%; padding-left: 46px; box-sizing: border-box; }
.sf-ct-rank .sf-ctc-row.is-stack .sf-ctc-act { padding-left: 42px; }
.sf-ctc-row.is-stack .sf-ctc-btn { flex: 1; }
/* 列表本身被外框挤窄时（大屏里的小面板）按列表宽度判断 */
.sf-ctc-list { container-type: inline-size; }
@container (max-width: 300px) {
  .sf-ctc-row:has(.sf-ctc-act > :nth-child(2)) { flex-wrap: wrap; row-gap: 8px; }
  .sf-ctc-row .sf-ctc-act:has(> :nth-child(2)) { width: 100%; padding-left: 46px; box-sizing: border-box; }
  .sf-ctc-row .sf-ctc-act:has(> :nth-child(2)) .sf-ctc-btn { flex: 1; }
}
@container (max-width: 240px) {
  .sf-ctc-row { flex-wrap: wrap; row-gap: 8px; }
  .sf-ctc-row .sf-ctc-act { width: 100%; padding-left: 46px; box-sizing: border-box; }
  .sf-ctc-row .sf-ctc-btn { flex: 1; }
}
/* 「联系平台」底部的教程入口：灰字一行，不和联系方式抢眼 */
.sf-ctc-list .sf-ct-guide.is-quiet {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 40px;
  margin: 2px 0 0;
  padding: 0 12px;
  border-radius: 12px;
  background: none;
  color: var(--ink-dim, #8b8d93);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.35;
  text-decoration: none;
  box-sizing: border-box;
}
.sf-ctc-list .sf-ct-guide.is-quiet u { margin-left: 2px; color: var(--ink, #141416); font-weight: 700; text-underline-offset: 3px; }
.sf-ctc-list .sf-ct-guide.is-quiet:active { transform: none; opacity: .6; }
/* 列表行抽屉里的联系方式：一行一个，号码不被两列挤成「TG：y…」 */
.bsp-sh .sf-pf-contact { display: flex; flex-direction: column; }
@media (min-width: 960px) and (hover: hover) {
  /* 电脑上点不了拨打：电话只给复制 */
  .sf-ctc-row .sf-ctc-call { display: none; }
  .sf-ctc-row.is-phone .sf-ctc-btn.is-soft { background: var(--ink, #141416); color: #fff; }
  .sf-ctc-btn.is-soft:hover { background: rgba(118, 118, 128, .2); }
}
