/* ==========================================================================
   Contacts Card (.ct namespace)
   Theme-aware via CSS variables from shared/theme.css.
   ========================================================================== */

.rich-card.ct {
  max-width: 620px;
}

/* --- Single contact layout --- */

.ct:not(.ct--list) {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  align-items: center;
}

/* Avatar */

.ct__avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: color-mix(in oklab, var(--violet) 18%, var(--bg-2));
  border: 1px solid color-mix(in oklab, var(--violet) 35%, transparent);
  color: var(--violet);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  flex-shrink: 0;
  overflow: hidden;
}

.ct__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

/* Small avatar (list rows) */

.ct__avatar--sm {
  width: 30px;
  height: 30px;
  font-size: 0.7rem;
  letter-spacing: -0.01em;
}

/* Info block */

.ct__info {
  min-width: 0;
}

/* Name */

.ct__name {
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 8px;
  color: var(--text-primary);
}

/* Org / title subtitle */

.ct__subtitle {
  font-size: 0.78rem;
  color: var(--text-tertiary);
  margin: -4px 0 8px;
}

/* Fields container */

.ct__fields {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* Individual field pill */

.ct__field {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-input);
  font-family: var(--font-mono, 'JetBrains Mono', ui-monospace, monospace);
  font-size: 0.74rem;
  color: var(--text-secondary);
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: all 160ms ease;
}

.ct__field:hover {
  border-color: var(--border-strong);
  color: var(--text-primary);
}

.ct__field svg {
  color: var(--text-tertiary);
  flex-shrink: 0;
}

/* --- List layout --- */

.ct--list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.ct__row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

.ct__row:last-child {
  border-bottom: none;
}

.ct__row-name {
  flex: 1;
  min-width: 80px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-primary);
}
