/* ─────────────────────────────────────────────────────────────────────────
   HOLON CHIP — the click-through card for one Holon.

   Rendered by crm/partials/holon_chip.html: logo, parent, name, whole thing
   an anchor to the holon's detail page. A different component from .chip,
   which labels a thing inside a row; this one IS the thing.

   Lived in detail.css until Outreach's bulk-result banner wanted it, at which
   point a component used by three apps could no longer sit in a stylesheet
   that only some pages opt into. Now in @layer components with the rest of
   the shared vocabulary, and loaded from shell/_tokens_css.html everywhere.

   Anatomy:
     .holon-chip              the card
     --full                   stretch to fill its container
     --compact                inline in a sentence or a status banner
     __logo / __text / __parent / __name
   ───────────────────────────────────────────────────────────────────────── */
@layer components {
  .holon-chip {
    display: inline-flex;
    align-items: center;
    gap: var(--space-md);
    max-width: 100%;
    text-decoration: none;
    color: inherit;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, var(--surface) 0%, var(--surface-alt) 100%);
    padding: 0.7rem 1.1rem 0.7rem 0.7rem;
    box-shadow: var(--elev-2);
    transition: transform var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out), border-color var(--dur-base) var(--ease-out);
  }

  .holon-chip:hover {
    transform: translateY(-2px);
    border-color: var(--accent-ring);
    box-shadow: var(--elev-3);
  }

  .holon-chip--full {
    display: flex;
    width: 100%;
  }

  .holon-chip__logo {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-lg);
    background: var(--border-light);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
    color: var(--text-muted);
  }

  .holon-chip__logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .holon-chip__text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
    min-width: 0;
  }

  .holon-chip__name {
    font-size: var(--text-xl);
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--text);
  }

  .holon-chip__parent {
    font-size: var(--text-base);
    color: var(--text-muted);
  }

  /* Compact — the same chip inline beside a sentence rather than standing
     alone as a card. Card typography would out-shout the text it sits next
     to, so the logo and names step down and the parent joins the name on one
     line. */
  .holon-chip--compact {
    gap: var(--space-2);
    padding: var(--space-1) var(--space-3) var(--space-1) var(--space-1);
    border-radius: var(--radius-md);
    box-shadow: var(--elev-1);
  }

  .holon-chip--compact .holon-chip__logo {
    width: 24px;
    height: 24px;
    border-radius: var(--radius-sm);
  }

  .holon-chip--compact .holon-chip__logo svg {
    width: 14px;
    height: 14px;
  }

  .holon-chip--compact .holon-chip__text {
    flex-direction: row;
    align-items: baseline;
    gap: var(--space-1);
  }

  .holon-chip--compact .holon-chip__name {
    font-size: var(--text-sm);
  }

  .holon-chip--compact .holon-chip__parent {
    font-size: var(--text-xs);
  }
}
