/* win-contact.css: Contact card window.
   Every colour comes from tokens.css (no literals here). Dark mode lives in tokens.css only. */
.cc { width: 720px; max-width: 100%; height: min(800px, calc(100dvh - 48px)); display: flex; flex-direction: column; background: var(--bd-paper); color: var(--bd-text); font: 15px/1.4 var(--sans); box-shadow: var(--sh-shadow); min-width: 0; }
.cc-head { display: flex; gap: 16px; align-items: flex-start; padding: 24px 24px 16px 28px; }
.cc-av { flex: none; width: 56px; height: 56px; display: grid; place-items: center; background: var(--bd-ink); color: var(--bd-on-ink); font: 20px var(--serif); }
.cc-hm { flex: 1; min-width: 0; }
.cc-name { margin: 0; font: 400 30px/1.1 var(--serif); color: var(--bd-ink); }
.cc-sub { font-size: 14px; color: var(--bd-muted); margin-top: 2px; }
.cc-firm { border: 0; border-bottom: 1px solid var(--bd-line2); background: none; padding: 0; font: inherit; color: var(--bd-ink); cursor: pointer; }
.cc-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.cc-chips .bd-chip.no { border-color: var(--bd-burg); color: var(--bd-burg); }
.cc-x { flex: none; width: 40px; height: 40px; display: grid; place-items: center; border: 0; background: none; color: var(--bd-ink); cursor: pointer; }
.cc-acts { padding: 0 28px 18px; border-bottom: 1px solid var(--bd-line); display: grid; grid-auto-flow: column; grid-auto-columns: 64px; justify-content: start; gap: 6px; overflow: visible; }
.cc-act { display: flex; flex-direction: column; gap: 6px; padding: 0; border: 0; background: none; font: 12px var(--sans); color: var(--bd-ink); text-decoration: none; cursor: pointer; white-space: normal; text-align: center; line-height: 1.2; align-items: center; justify-content: flex-start; min-width: 0; }
.cc-act .cc-ic { width: 46px; height: 46px; display: grid; place-items: center; border: 1px solid var(--bd-line2); }
.cc-act:hover .cc-ic { border-color: var(--bd-ink); }
.cc-act.off { color: var(--bd-muted); cursor: default; }
.cc-act.off .cc-ic { border-style: dashed; }
.cc .cc-seg { display: flex; margin: 16px 28px 0; gap: 2px; padding: 3px; background: var(--bd-seg); border: 0; }
.cc .cc-seg button { flex: 1; height: 30px; padding: 0 10px; border: 0; background: transparent; color: var(--bd-muted); font: 500 13px var(--sans); box-shadow: none; border-radius: 0; min-height: 0; }
.cc .cc-seg button[aria-selected="true"] { background: var(--bd-paper); color: var(--bd-ink); box-shadow: var(--shadow-seg); }
.cc-body { flex: 1; min-height: 0; overflow-y: auto; padding: 8px 28px; }
.cc-row { display: grid; grid-template-columns: 110px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--bd-line); font-size: 14.5px; min-height: 22px; }
.cc-val { display: block; font: inherit; color: var(--bd-ink); text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; text-decoration: none; }
.cc-link { cursor: pointer; }
.cc-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.cc-in { width: 100%; height: 32px; padding: 0 8px; border: 1px solid var(--bd-ink); font: 14.5px var(--sans); box-sizing: border-box; }
.cc-tools { display: flex; gap: 2px; }
.cc-tool { width: 32px; height: 32px; display: grid; place-items: center; padding: 0; border: 0; background: none; color: var(--bd-muted); cursor: pointer; }
.cc-tool:hover { color: var(--bd-ink); background: var(--bd-seg); }
.cc-editbar { display: flex; gap: 10px; padding: 14px 0; }
.cc-editbar .cc-save { background: var(--bd-ink); color: var(--bd-on-ink); border-color: var(--bd-ink); }
.cc-cap { margin-top: 18px; }
.cc-note { padding: 12px 0; border-bottom: 1px solid var(--bd-line); }
.cc-nh { display: flex; justify-content: space-between; font-size: 13px; color: var(--bd-muted); }
.cc-nb { margin-top: 4px; font-size: 14.5px; color: var(--bd-text); white-space: pre-line; }
.cc-tl { display: grid; grid-template-columns: 90px 18px minmax(0, 1fr); gap: 10px; align-items: baseline; padding: 11px 0; border-bottom: 1px solid var(--bd-line); font-size: 14px; }
.cc-tl .bd-n, .cc-tl > span > .bd-s { display: block; }
.cc-tl .bd-dot { display: inline-block; width: 8px; height: 8px; border-radius: 4px; background: var(--bd-navy); }
.cc-tl .bd-dot.ok { background: var(--bd-green); }
.cc-tl .bd-dot.mu { background: var(--bd-muted); }
.cc-deal { display: flex; width: 100%; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border: 0; border-bottom: 1px solid var(--bd-line); background: none; text-align: left; font: inherit; cursor: pointer; }
.cc-deal .bd-n, .cc-deal .bd-s { display: block; }
.cc-deal .bd-chip.ok { border-color: var(--bd-green); color: var(--bd-green); }
.cc-deal .bd-chip.no { border-color: var(--bd-burg); color: var(--bd-burg); }
.cc-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 28px; border-top: 1px solid var(--bd-line); }
.cc-del { flex: none; }
.cc-saved { flex: 1; font-size: 12.5px; color: var(--bd-muted); text-align: center; }
.cc-prof { height: 40px; padding: 0 16px; border: 0; background: var(--bd-ink); color: var(--bd-on-ink); font: 500 14px var(--sans); cursor: pointer; }
.cc-prof[hidden] { display: none; }
@media (max-width: 640px) {
  .cc { width: 100%; box-shadow: none; height: calc(100dvh - 54px); border-radius: 14px 14px 0 0; position: relative; }
  .cc-head { padding: 18px 12px 12px 20px; padding-top: 22px; }
  .cc-name { font-size: 26px; }
  .cc-av { width: 48px; height: 48px; font-size: 18px; }
  .cc-acts { padding: 0 20px 14px; grid-auto-columns: minmax(0, 64px); gap: 4px; }
  .cc-act .cc-ic { width: 42px; height: 42px; }
  .cc .cc-seg { margin: 12px 20px 0; }
  .cc-body { padding: 6px 20px; }
  .cc-foot { padding: 10px 20px calc(10px + env(safe-area-inset-bottom)); }
  .cc-row { grid-template-columns: 84px minmax(0, 1fr) auto; }
  .cc-saved { display: none; }
}
@media (max-width: 640px) {
  .cc::before { content: ""; position: absolute; top: 8px; left: 50%; width: 36px; height: 4px; margin-left: -18px; border-radius: 2px; background: var(--bd-line2); }
}
.cc-foot .cc-prof { flex: 0 0 360px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 640px) {
  .cc-foot .cc-prof { flex: 1 1 0; min-width: 0; }
}
