/* Drug chips in the candidate table, and the support histogram and retention curve figures.
   Theme tokens only; glyphs, patterns and labels carry every state besides colour. */
.drug-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  width: fit-content;
  max-width: 100%;
  margin-top: 0.35rem;
  padding: 0.1rem 0.45rem;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-control);
  background: var(--surface-1);
  color: var(--text-primary);
  font-size: 0.78rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
td .drug-chip {
  display: flex;
}
a.drug-chip {
  text-decoration: underline;
}
a.drug-chip:focus-visible {
  outline: 2px solid var(--color-loom-500);
  outline-offset: 2px;
}
.drug-chip[data-state='not_evaluated'],
.drug-chip[data-state='index_unavailable'] {
  border-style: dashed;
  color: var(--text-secondary);
}
.drug-chip .matrix-glyph {
  font-family: var(--font-mono, monospace);
}
.drug-note {
  margin: 0.6rem 0;
}
.drug-note p {
  margin: 0.2rem 0;
}
.drug-attribution {
  color: var(--text-secondary);
  font-size: 0.8rem;
  overflow-wrap: anywhere;
}
.drug-unavailable {
  padding: 0.5rem 0.7rem;
  border: 1px dashed var(--border-default);
  border-radius: var(--radius-control);
  background: var(--surface-1);
}
.support-figures {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
  gap: 1rem;
  margin: 1rem 0;
}
.support-figures[hidden] {
  display: none;
}
.support-figures .drug-figure {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  min-width: 0;
  padding: 0.8rem;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-control);
  background: var(--surface-1);
}
.support-figures h3 {
  margin: 0;
  font-size: 1rem;
}
.support-figures .drug-scope {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.5;
}
.support-figures .drug-figure-chart {
  min-width: 0;
}
.support-figures .drug-figure-export {
  align-self: flex-start;
}
.support-figures .drug-figure-status:empty {
  display: none;
}
@media (forced-colors: active) {
  .drug-chip,
  .drug-unavailable,
  .support-figures .drug-figure {
    border-color: CanvasText;
  }
  a.drug-chip {
    color: LinkText;
  }
  a.drug-chip:focus-visible {
    outline-color: Highlight;
  }
}
