/*
  BIOMARKERS (redesign PR 11a): page-scoped arrangement for the biomarker roster and hub, the
  assay-provider ledger and papers, the assay-whitespace index, and the public biomarker pages.
  Every piece is a cataloged component; only layout lives here. The evidence chips, class chip,
  related list and remainder line are in components.css because the organization Biomarkers lens
  shares them.
*/

/* The roster-style floor toggles: checkboxes and one Apply, on one wrapping row. */
.p-bm-toggles {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-5);
}

.p-bm-toggles .c-field {
  margin: 0;
}

/* Biomarker identity cell: the name, its kind, and a source-scoped marker on one wrapping line. */
.p-bm-identity {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-1) var(--space-2);
}

.p-bm-identity__name {
  font-weight: var(--weight-semibold);
}

/* Cross-search strip (#408): "we also found N matching targets". */
.p-bm-xsearch {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-4);
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface-sunken);
}

.p-bm-xsearch__chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1-5);
}

/* Prose and notes that sit inside a flush card (a card whose table runs edge to edge). */
.c-card__body--flush .p-bm-pad {
  margin: 0;
  padding: var(--space-3) var(--space-5) 0;
}

.c-card__body--flush .p-bm-pad--foot {
  padding: 0 var(--space-5) var(--space-3);
}

.c-card__body--flush .p-bm-pad--foot:empty {
  display: none;
}

.c-card__body--flush .p-bm-pad + .c-table-wrap,
.c-card__body--flush .p-bm-pad + turbo-frame .c-table-wrap {
  margin-top: var(--space-3);
}

/* Section sub-headings inside a card. */
.p-bm-subhead {
  margin: 0 0 var(--space-2);
  font-family: var(--font-sans);
  font-size: var(--text-md);
  letter-spacing: normal;
}

/* Traversal coverage: one small tile per traversal. */
.p-bm-coverage {
  display: grid;
  gap: var(--space-3);
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr));
}

.p-bm-coverage__item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.p-bm-coverage__name {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--text-md);
  letter-spacing: normal;
}

.p-bm-coverage__item p {
  margin: 0;
}

/* A table inside a card inside TWO turbo-frames (the vendor section's facet frame around the table's
   own frame) misses the component's flush rule, which only names a direct frame child. The same
   border-drop as the component, for that nesting. */
.c-card__body--flush turbo-frame turbo-frame > .c-table-wrap {
  border: 0;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

/* The numbers table inside the trend disclosure: the disclosure is the frame, so drop the wrap's own. */
.c-disclosure__body > .c-table-wrap {
  border: 0;
  border-radius: 0;
}

/* The yearly numbers table: its last row needs no rule under the row header either. */
[data-trend-numbers] tbody tr:last-child th {
  border-bottom: 0;
}

/* The vendor facets above their table: a quiet padded strip, groups side by side. */
.p-bm-facets {
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--color-border);
}

.p-bm-facets .c-facets__body {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: var(--space-4) var(--space-8);
}

.p-bm-facets .c-facets__title {
  margin: 0;
}

.p-bm-facets .c-facet {
  flex: 1 1 14rem;
  max-width: 24rem;
}

/* A paper's title with its PMID link under it. */
.p-bm-publication {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  max-width: 40rem;
}

.p-bm-publication__title {
  white-space: normal;
}

/* Chip lists (therapeutic areas, diseases). */
.p-bm-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.p-bm-trend-controls {
  display: flex;
}

.p-bm-samples-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: var(--space-3) var(--space-4);
}

.p-bm-samples-form .c-field {
  min-width: min(100%, 20rem);
}

/* The yearly numbers caption sits above the table, quietly. */
.p-bm-caption {
  padding: var(--space-2) var(--space-3);
  caption-side: top;
  text-align: left;
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

.p-bm-af-path + .p-bm-af-path {
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-border);
}

/* The assay-whitespace "why this bucket" panel. */
.p-bm-why__list {
  margin: 0;
  padding-left: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-1-5);
}

.p-bm-public-footer {
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-border);
}
