/* ============================================================
   Psilocybin gene cluster: report section + shared figure page
   (psi-cluster.js). Hand-maintained like the other legacy css.
   ============================================================ */

.StrainPsilocybin--intro,
.PsiClusterPage--intro {
  max-width: 80ch;
}

.PsiClusterPage--method {
  margin-top: 1.5em;
  max-width: 80ch;
  font-size: .875rem;
  color: var(--dim-blue-30);
}

.PsiCluster {
  margin-top: var(--body-margin);
  width: 100%;
}

.PsiCluster--loading,
.PsiCluster--error,
.PsiCluster--notAssessed {
  font-style: italic;
}

.PsiCluster--error { color: var(--danger); }

/* ---- summary line (report section) ---- */
.PsiCluster--summary {
  margin: 0 0 1em;
  max-width: 80ch;
}

.PsiCluster--summary b { font-weight: 700; }

/* ---- controls ---- */
.PsiCluster--controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5em 1.25em;
  margin: .75em 0;
  font-size: .875rem;
}

.PsiCluster--controlGroup {
  display: inline-flex;
  align-items: center;
  gap: .375em;
}

.PsiCluster--btn {
  padding: .25em .75em;
  border: 1px solid var(--dim-blue-75);
  border-radius: .25em;
  background: var(--plot-bg, #fff);
  color: var(--base-text-color);
  font: inherit;
  cursor: pointer;
}

.PsiCluster--btn:hover { border-color: var(--brand-blue-aa); color: var(--brand-blue-aa); }

.PsiCluster--btn.is-on {
  border-color: var(--brand-blue-aa);
  background: var(--brand-blue-bright-92);
  color: var(--brand-blue-aa);
  font-weight: 700;
}

.PsiCluster--search {
  padding: .25em .5em;
  border: var(--base-input-border);
  border-radius: .25em;
  font: inherit;
  font-size: .875rem;
  min-width: 14em;
}

/* ---- legend ---- */
.PsiCluster--legend {
  display: flex;
  flex-wrap: wrap;
  gap: .25em 1em;
  margin: .25em 0 .5em;
  font-size: .75rem;
}

.PsiCluster--legendItem {
  display: inline-flex;
  align-items: center;
  gap: .375em;
}

.PsiCluster--legendItem::before {
  content: '';
  display: inline-block;
  width: .625rem;
  height: .625rem;
  background: var(--sw, #999);
  border: 1px solid rgba(0, 0, 0, .15);
}

/* ---- the figure ---- */
.PsiCluster--figure {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.PsiCluster--canvas {
  display: block;
  width: 100%;
  height: auto;
  cursor: crosshair;
}

.PsiCluster--tip {
  position: absolute;
  z-index: var(--z-top);
  max-width: 22em;
  padding: .5em .75em;
  border: 1px solid var(--dim-blue-30);
  background: var(--dim-blue-15);
  color: #fff;
  font-size: .8125rem;
  line-height: 1.4;
  pointer-events: none;
  opacity: 0;
  transition: opacity .1s ease;
}

.PsiCluster--tip.is-open { opacity: 1; }

.PsiCluster--tip b { color: #fff; }

.PsiCluster--tip .-muted { color: var(--dim-blue-75); }

.PsiCluster--caption {
  margin-top: .5em;
  font-size: .75rem;
  color: var(--dim-blue-30);
  max-width: 90ch;
}

/* ---- the sample's variant table ---- */
.PsiCluster--variants {
  margin-top: var(--body-margin);
}

.PsiCluster--variantsHeader {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: .5em 1em;
}

.PsiCluster--variantsHeader h3 { margin: 0; }

.PsiCluster--tableWrap { overflow: auto; }

.PsiCluster--table {
  width: 100%;
  border-collapse: collapse;
  background: var(--plot-bg, #fff);
  font-size: .9375rem;
}

.PsiCluster--table th,
.PsiCluster--table td {
  padding: .3125em .5em;
  border: 1px solid var(--dim-green-90);
  text-align: left;
  vertical-align: top;
}

.PsiCluster--table thead {
  font-size: .8125rem;
  text-transform: uppercase;
}

.PsiCluster--table tbody tr:nth-child(odd) { background: var(--dim-green-95); }

.PsiCluster--table tbody tr:hover { background: var(--brand-blue-bright-92); }

.PsiCluster--table .-num {
  font-family: var(--monospace-font);
  white-space: nowrap;
}

.PsiCluster--table .-gene { font-style: italic; white-space: nowrap; }

.PsiCluster--table .-private { color: var(--dataviz-red-55); font-weight: 700; }

.PsiCluster--table .-cls-missense { color: #b3273b; font-weight: 700; }
.PsiCluster--table .-cls-synonymous { color: #1f7a6d; }
.PsiCluster--table .-cls-splice { color: #6b3fb5; }
.PsiCluster--table .-cls-intron,
.PsiCluster--table .-cls-non-coding { color: var(--dim-blue-45); }

.PsiCluster--carriers a { white-space: nowrap; }

.PsiCluster--carriers .-more { color: var(--dim-blue-45); font-size: .875em; }

.PsiCluster--none { font-style: italic; }

/* ---- link out to the shared figure (report section) ---- */
.PsiCluster--pageLink {
  display: inline-block;
  margin-top: 1em;
  font-weight: 700;
}

@media (min-width: 43.75em) {
  .PsiCluster { margin-top: var(--body-margin-large); }
}

@media print {
  .PsiCluster--controls,
  .PsiCluster--tip,
  .PsiCluster--search { display: none; }
  .PsiCluster--table { font-size: .6875rem; }
}

/* ---- merged psi variants in the report's Variants cards (FEATURE-06) ----
   Source badge per row: Both filled, one-method rows outlined; red/yellow stay the impact colours. */
.PsiSource {
  border: 1px solid var(--dim-blue-85, #c9d6ea);
  border-radius: .25em;
  color: var(--dim-blue-45);
  cursor: help;
  flex-shrink: 0;
  font-size: .6875rem;
  font-weight: 600;
  padding: .1em .45em;
  white-space: nowrap;
}
.PsiSource.-both {
  background-color: var(--brand-blue-bright-92);
  border-color: transparent;
  color: var(--brand-blue-aa);
}
.PsiMerged--reads { font-family: var(--monospace-font); }
.PsiMerged--intro { margin: 0 0 1em; max-width: 80ch; }
.PsiMerged--intro p { margin: 0 0 .5em; }
.PsiMerged--help summary { color: var(--brand-blue-aa); cursor: pointer; }
.PsiMerged--help dl { display: grid; gap: .4em .75em; grid-template-columns: max-content 1fr; margin: .75em 0; }
.PsiMerged--help dt { margin: 0; }
.PsiMerged--help dd { margin: 0; }
@media print {
  .PsiMerged--help:not([open]) { display: none; }
}
