/* GraffiTE documentation, supplementary styles.
   Everything else comes from mkdocs-material; keep this file small. */

/* The palette is the sticker's: black letters with yellow, orange, coral,
   pink, purple, navy and teal layers. Purple carries links, coral the accent;
   the figures pick the same two up through --gt-purple and --gt-coral. */
:root {
  --gt-yellow: #f5e100;
  --gt-orange: #f5851f;
  --gt-coral:  #f2523f;
  --gt-pink:   #f162b3;
  --gt-purple: #7a1fa2;
  --gt-navy:   #23459a;
  --gt-teal:   #2fb3b3;
  --md-accent-fg-color: var(--gt-coral);
  --md-accent-fg-color--transparent: rgba(242, 82, 63, .1);
  --md-accent-bg-color: #fff;
  --md-accent-bg-color--light: rgba(255, 255, 255, .7);
  --md-typeset-a-color: var(--gt-purple);
}
[data-md-color-scheme="slate"] {
  --gt-purple: #c77dff;
  --gt-coral:  #ff7a66;
  --md-typeset-a-color: var(--gt-purple);
}

/* The header is white in light mode and black in dark mode, with a rainbow rule under both.
   Both modes use the same logo: its white outline keeps the black letters visible on black. */
.md-header {
  border-bottom: 4px solid transparent;
  border-image: linear-gradient(90deg, var(--gt-yellow), var(--gt-orange), var(--gt-coral),
                                var(--gt-pink), #b300e6, var(--gt-navy), var(--gt-teal)) 1;
}
.md-header__button.md-logo { display: flex; align-items: center; gap: .6rem; padding: .3rem .4rem; }
.md-header__button.md-logo img { height: 1.9rem; width: auto; }

/* The version, next to the logo on every page. stamp_pages.py --set rewrites the commit. */
:root { --gt-version: "v1.1.0.0 @ bf51777"; }
.md-header__button.md-logo::after {
  content: var(--gt-version);
  font-size: .6rem;
  font-weight: 700;
  letter-spacing: .04em;
  padding: .12rem .5rem;
  border-radius: 999px;
  background: var(--gt-purple);
  color: #fff;
  white-space: nowrap;
}
[data-md-color-scheme="slate"] .md-header__button.md-logo::after { color: #111; }

/* The sticker says the name; the plain-text site name next to it is hidden.
   The second topic, the current page title, still slides in on scroll. */
.md-header__topic:first-child { visibility: hidden; }
.md-tabs { border-bottom: 1px solid var(--md-default-fg-color--lightest); }

/* Inline SVG figures scale with the content column and follow the theme toggle,
   because they inherit Material's CSS custom properties. */
.gt-figure {
  display: block;
  width: 100%;
  height: auto;
  max-width: 780px;
  margin: 0 auto;
}

/* Wide reference tables scroll inside their own box rather than the page body. */
.md-typeset__table {
  width: 100%;
}
.md-typeset table:not([class]) {
  font-size: 0.72rem;
}
.md-typeset table:not([class]) td,
.md-typeset table:not([class]) th {
  padding: 0.5em 0.8em;
}

/* Parameter reference: keep the name column from wrapping mid-flag. */
.md-typeset table:not([class]) td:first-child code {
  white-space: nowrap;
}

/* Source-provenance annotations, e.g. `nextflow.config:52`. */
.src {
  font-size: 0.68rem;
  color: var(--md-default-fg-color--light);
  white-space: nowrap;
}

/* Figure captions sit closer to the figure than Material's default. */
.md-typeset figure figcaption {
  margin-top: 0.4em;
  max-width: 46rem;
  font-style: normal;
}

/* Home page masthead. */
.gt-masthead { text-align: center; margin: 0 0 .4rem; }
.gt-masthead img { max-width: min(560px, 90%); height: auto; }
.gt-tagline { text-align: center; font-size: 1.05rem; font-weight: 700; margin-bottom: 1.6rem; }

/* Mermaid diagrams. Unstyled nodes are neutral, so only Stage 2 is coral. Node text always
   takes the theme's color: Material sets it on .nodeLabel p, which a classDef cannot override, so
   the stage colors go on fills and borders. Wide diagrams scroll inside their own box. */
:root > * {
  --md-mermaid-node-bg-color: var(--md-default-fg-color--lightest);
  --md-mermaid-node-fg-color: var(--md-default-fg-color--light);
}
.md-typeset .mermaid { overflow-x: auto; }
.md-typeset .gt-legend { margin-top: -.4rem; font-size: .68rem; color: var(--md-default-fg-color--light); }

/* Key under a diagram: the same pale fills and borders as the mermaid stage classes. */
.md-typeset .gt-key { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: -.4rem; font-size: .68rem; }
.md-typeset .gt-key span { padding: .05rem .5rem; border: 1px solid; border-radius: .2rem; }
.md-typeset .gt-key-s1 { background: #f5851f2e; border-color: #f5851f !important; }
.md-typeset .gt-key-s2 { background: #f2523f2e; border-color: #f2523f !important; }
.md-typeset .gt-key-s3 { background: #3d63c92e; border-color: #3d63c9 !important; }

/* Command builder on Choosing your inputs, drawn by assets/input-picker.js. */
.md-typeset .gt-picker { margin: 1em 0; padding: .8rem 1rem; border: 1px solid var(--md-default-fg-color--lightest); border-radius: .4rem; }
.md-typeset .gt-picker fieldset { min-width: 0; margin: 0 0 .8rem; padding: 0; border: 0; }
.md-typeset .gt-picker legend { margin-bottom: .3rem; padding: 0; font-weight: 700; }
.md-typeset .gt-picker label { display: flex; align-items: baseline; gap: .5rem; margin: .15rem 0; cursor: pointer; }
.md-typeset .gt-picker input { accent-color: var(--md-accent-fg-color); }
.md-typeset .gt-picker pre { margin: .4rem 0; }
.md-typeset .gt-picker pre > code { display: block; overflow-x: auto; white-space: pre; }
.md-typeset .gt-picker .gt-picker-copy { padding: .3em 1em; font-size: .64rem; }
.md-typeset .gt-picker-error { color: var(--md-accent-fg-color); font-weight: 700; }
