/* Expanded recommendation card — app-side extras on top of the gem's
 * .recommendation-card component (rail / inner / content / meta-row / title /
 * body / footer + .gene-chip + .action-button + .pill all come from the gem).
 * Only the bits the gem doesn't ship live here. */

/* Figma uses a 4px radius here, not the gem component's 32px. */
.rec-item .recommendation-card { border-radius: var(--corner-radius-xs); }

/* Mobile: tighten the card padding from 32 to 24 (the gem sets 32 on __inner). */
@media (max-width: 47.999rem) {
  .recommendation-card__inner { padding: var(--spacing-24); }
}

/* Rail icons sit at the top, not centred, so they line up with the meta row. */
.recommendation-card__rail { justify-content: flex-start; }

/* Meta row: category + significance pill sit INLINE on the left; the collapse
 * × is pushed to the far right. (The gem makes __category flex-grow, which
 * shoved the pill to the right edge — the repeatedly-reported bug.) */
.rec-item .recommendation-card__category { flex: 0 0 auto; }
.rec-item .recommendation-card__close { margin-left: auto; }

/* Collapse (×) button, top-right of the meta row. */
.recommendation-card__close {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--spacing-24);
  height: var(--spacing-24);
  color: var(--symbol-default);
  cursor: pointer;
}
.recommendation-card__close:hover { color: var(--symbol-hover); }
.recommendation-card__close svg { width: var(--spacing-24); height: var(--spacing-24); }

/* Gene chips are SNP links here — strip link chrome, keep the component look.
 * Figma uses a 4px radius here, not the gem component's pill radius. */
.recommendation-card .gene-chip {
  text-decoration: none;
  cursor: pointer;
  border-radius: var(--corner-radius-xs);
}

/* Reuse the existing daily-actions track button as the rail's first action,
 * restyled to the 40×40 circular .action-button silhouette (scoped to the rail
 * so the actions page keeps its own styling). */
.recommendation-card__rail .track-button { display: inline-flex; }
.recommendation-card__rail .track-button form { margin: 0; }
.recommendation-card__rail .track-button-toggle--tracked,
.recommendation-card__rail .track-button-toggle--untracked {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; /* Note: matches the gem .action-button 40×40 */
  height: 40px;
  border-radius: var(--corner-radius-full);
  background-color: var(--background-surface-2);
}
.recommendation-card__rail .track-button-toggle--untracked { color: var(--symbol-default); }
/* Tracked = "already added" indicator: a muted (disabled) checkbox — never the
 * green protective hue — with no lift shadow. The card only adds; managing the
 * action happens on the daily-actions page. */
.recommendation-card__rail .track-button-toggle--tracked {
  color: var(--symbol-disabled);
  box-shadow: none;
}
.recommendation-card__rail .track-button-toggle--tracked[disabled] {
  cursor: default;
  box-shadow: none;
}
.recommendation-card__rail .track-button-toggle--untracked:hover {
  background-color: var(--background-hover);
  color: var(--symbol-hover);
}
.recommendation-card__rail .track-button-icon { width: 20px; height: 20px; }

/* Hover label — reuse the gem's .action-button__tooltip look so the track
 * button matches the sibling Ask-agent / Share buttons. .track-button is
 * position:relative, so the absolutely-positioned tooltip anchors to it. */
.recommendation-card__rail .track-button:hover .action-button__tooltip {
  opacity: 1;
  color: var(--text-primary);
}

/* An action can carry dozens of rsids. Only the first few chips are shown; the
 * rest are hidden until the "and N more" chip is clicked (genechips_controller
 * strips .gene-chip--hidden and removes itself). */
.recommendation-card .gene-chip--hidden { display: none; }
.recommendation-card .gene-chip--more {
  cursor: pointer;
  white-space: nowrap;
  /* A <button>, so it inherits neither the page font nor .gene-chip__rsid's. */
  font-family: var(--font-family-display);
  font-weight: var(--font-weight-600);
  font-size: var(--font-size-14);
  color: var(--text-secondary);
}
.recommendation-card .gene-chip--more:hover { color: var(--text-primary); }
