/*
 * Growth Partner — Gevolgd page (UX overhaul 4d, companies#followed)
 *
 * No dedicated mock-up screen: the row language comes from
 * docs/ux-overhaul/mockup/Bedrijven.dc.html, the card language from the
 * "Nu bellen" cards in Main.dc.html. Status segmented control + a Klanten
 * chip that composes with it, then one expandable gp-card per company
 * (data-controller="prospect-row" toggles .prospect-detail-open).
 *
 * Classes only (CSP). Text colours via the tokens (AA 4.5:1, guarded by
 * test/assets/color_contrast_test.rb). Phone rules at the bottom.
 */

/* ── Filter strip ── */
.followed-filters {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  margin: 0 0 1rem;
}
.followed-seg-count { margin-left: 4px; font-variant-numeric: tabular-nums; font-weight: 700; }
.followed-client-chip { padding: 6px 14px; font-size: 0.85rem; }
.followed-client-chip:hover { text-decoration: none; }
.followed-clear { font-weight: 600; font-size: 0.85rem; color: var(--gp-navy); }

/* ── Card list ── */
.followed-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 1rem; }
/* Flush at every width: the phone rule in ux_components.css re-pads .gp-card. */
.followed-card { padding: 0; gap: 0; }

.followed-summary {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 16px; cursor: pointer; min-width: 0;
}
.followed-summary:hover { background: var(--gp-surface); }

.followed-main { flex: 2 1 0; min-width: 0; }
.followed-name-line { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.followed-name-line .badge { margin: 0; }
.followed-name {
  font-family: var(--gp-font-heading); font-weight: 700; font-size: 0.95rem;
  color: var(--gp-navy); text-decoration: none; overflow-wrap: anywhere;
}
.followed-name:hover { text-decoration: underline; }
.followed-meta { margin-top: 2px; font-size: 0.8rem; color: var(--gp-body); }

.followed-extra { flex: 3 1 0; display: flex; align-items: center; gap: 12px; min-width: 0; }
.followed-signals { flex: 1 1 0; display: flex; flex-wrap: wrap; gap: 4px; min-width: 0; }
.followed-contact-cell { flex: 1 1 0; min-width: 0; font-size: 0.85rem; }
.followed-contact {
  display: block; color: var(--gp-ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.followed-muted { color: var(--gp-body); font-size: 0.8rem; margin: 0; }

.followed-actions { flex: none; display: flex; align-items: center; gap: 8px; }
.followed-actions form, .followed-status form { margin: 0; }
.followed-status select { margin: 0; }
.followed-call-icon {
  width: 16px; height: 16px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round;
}

/* The explicit expand control: a real button, 44px square. */
.followed-expand {
  flex: none; width: 44px; height: 44px; min-width: 44px; margin: 0; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: 1px solid transparent; border-radius: 10px;
  color: var(--gp-navy); line-height: 1; cursor: pointer; box-shadow: none;
}
.followed-expand:hover { background: var(--gp-navy-tint); border-color: var(--gp-line); color: var(--gp-navy); }
.followed-expand:focus { box-shadow: none; background: transparent; border-color: transparent; color: var(--gp-navy); }
.followed-expand:focus-visible { outline: 2px solid var(--gp-navy); outline-offset: 2px; }
.followed-expand-icon {
  width: 20px; height: 20px; display: block; transition: transform 0.2s;
  fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round;
}
.followed-expand[aria-expanded="true"] .followed-expand-icon { transform: rotate(180deg); }

/* ── Expanded detail: three gp-cards ── */
.followed-detail {
  display: none;
  grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px;
  padding: 16px; background: var(--gp-surface); border-top: 1px solid var(--gp-line);
}
.followed-detail.prospect-detail-open { display: grid; }
.followed-block { gap: 8px; padding: 14px 16px; }

.followed-dl { margin: 0; }
.followed-dl dt { margin-top: 6px; font-size: 0.75rem; font-weight: 600; color: var(--gp-body); }
.followed-dl dt:first-child { margin-top: 0; }
.followed-dl dd { margin: 0; font-size: 0.85rem; overflow-wrap: anywhere; }
.followed-dl dd form { margin: 0; display: inline; }

.followed-contact-card { padding: 6px 0; border-bottom: 1px solid var(--gp-line); }
.followed-contact-card:last-of-type { border-bottom: 0; }
.followed-contact-name { font-weight: 700; font-size: 0.85rem; color: var(--gp-ink); }
.followed-channels { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.followed-more { font-size: 0.85rem; font-weight: 600; }

.followed-block-actions {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  margin-top: auto; padding-top: 8px; border-top: 1px solid var(--gp-line);
}
.followed-block-actions form { margin: 0; }

/* ── Phone ── the collapsed line wraps to two rows: score, name and the
   expand button on top; signals, contact, call and status below. */
@media (max-width: 768px) {
  .followed-summary { flex-wrap: wrap; gap: 8px 12px; padding: 12px 14px; }
  .followed-main { order: 0; }
  .followed-expand { order: 1; }
  .followed-extra { order: 2; flex: 1 1 100%; flex-wrap: wrap; gap: 8px 12px; }
  .followed-signals, .followed-contact-cell { flex: 1 1 100%; }
  .followed-actions { flex: 1 1 100%; flex-wrap: wrap; }
  .followed-detail { grid-template-columns: minmax(0, 1fr); padding: 12px; }

  /* Touch targets >= 40px. */
  .followed-client-chip, .followed-clear { min-height: 40px; display: inline-flex; align-items: center; }
  .followed-status select { min-height: 40px; }
  .followed-name { display: inline-flex; align-items: center; min-height: 40px; }
  .followed-block-actions button, .followed-dl dd button { min-height: 40px; }
}
