/* --- Acellera unified branding ----------------------------------------- */

html[data-theme="light"] .navbar {
    --pst-color-on-background: #21539E;
    --pst-color-text-muted: white;
    --pst-color-primary: #459db9;
    --pst-color-link-hover: #90becc;
}

html[data-theme="light"] .search-button-field {
    --pst-color-text-muted: #5e636a;
    --pst-color-on-background: white;
}

body {
    --pst-heading-color: #459db9;
    --bs-link-decoration: none;
}

/* Make the package-name text match the navbar section links (Installation,
 * Tutorials, ...). Both inherit from --pst-color-text-muted, which we set
 * to white inside the light-mode navbar above and which falls back to
 * pydata's default in dark mode. */
.navbar .logo__title {
    color: var(--pst-color-text-muted);
}

/* Add breathing room between the Acellera logo image and the project-name
 * text link (rendered as two adjacent <a class="navbar-brand"> elements
 * by _templates/navbar-logo.html). */
.navbar .navbar-brand.logo-title-link {
    margin-left: 0.75rem;
}

body a {
    text-decoration: none;
}

/* --- Code-block filename captions -------------------------------------- */

/* Make the caption sit flush atop the code block as a single visual unit,
 * styled as a small monospace filename header. Works in both light and
 * dark themes via pydata-sphinx-theme CSS variables. */

div.literal-block-wrapper {
    margin: 1em 0;
}

div.literal-block-wrapper div.code-block-caption {
    padding: 0.35em 0.75em;
    background-color: var(--pst-color-surface);
    border: 1px solid var(--pst-color-border);
    border-top-left-radius: 0.25rem;
    border-top-right-radius: 0.25rem;
    font-family: var(--pst-font-family-monospace);
    font-size: 0.85em;
    color: var(--pst-color-text-muted);
}

div.literal-block-wrapper div.code-block-caption .caption-text {
    font-weight: 600;
}

/* Square the top of the code box so it sits flush under the caption. */
div.literal-block-wrapper div.highlight {
    margin-top: 0;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}

/* Show the permalink anchor only on hover, like header anchors. */
div.code-block-caption a.headerlink {
    visibility: hidden;
    margin-left: 0.4em;
}
div.code-block-caption:hover a.headerlink {
    visibility: visible;
}

/* --- Executed-cell output blocks --------------------------------------- */

/* Cap the height of executed-cell output blocks so long log spew is scrollable
 * instead of pushing the rest of the page off-screen. */
div.cell_output {
    max-height: 30em;
    overflow: auto;
}

/* Slightly tighter line-height inside log blocks so more lines fit before scroll. */
div.cell_output pre {
    line-height: 1.3;
}
