/* Styling for the generated blog chrome: post metadata, taxonomy pills, the
   standalone category/tag pages and the external links in the menu bar. */

:root {
    --pill-bg: rgba(0, 0, 0, 0.05);
    --pill-fg: var(--fg);
}

.navy, .coal, .ayu {
    --pill-bg: rgba(255, 255, 255, 0.08);
}

/* --- post header ------------------------------------------------------- */

.post-meta {
    color: var(--sidebar-non-existant, #949494);
    font-size: 0.9em;
    margin-bottom: 0.4em;
}

.post-taxonomies {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35em;
    margin-bottom: 1.6em;
}

a.taxonomy-pill {
    background: var(--pill-bg);
    border-radius: 1em;
    color: var(--fg);
    display: inline-block;
    font-size: 0.82em;
    line-height: 1.4;
    padding: 0.15em 0.7em;
    text-decoration: none;
}

a.taxonomy-pill:hover {
    background: var(--links);
    color: var(--bg);
}

a.taxonomy-pill.tag {
    opacity: 0.85;
}

a.taxonomy-pill .count {
    opacity: 0.6;
    font-size: 0.9em;
}

/* --- listings ---------------------------------------------------------- */

.list-date {
    color: var(--sidebar-non-existant, #949494);
    font-size: 0.85em;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.taxonomy-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4em;
    margin: 1.5em 0;
}

ul.taxonomy-posts {
    padding-left: 1.2em;
}

ul.taxonomy-posts li {
    margin-bottom: 0.35em;
}

.taxonomy-page {
    margin: 0 auto;
    max-width: var(--content-max-width, 750px);
    padding: 2em 1em 4em;
}

.taxonomy-breadcrumb,
.taxonomy-summary {
    color: var(--sidebar-non-existant, #949494);
    font-size: 0.9em;
}

/* --- embeds ------------------------------------------------------------ */

.video-embed {
    aspect-ratio: 16 / 9;
    margin: 1.5em 0;
    max-width: 100%;
}

.video-embed iframe {
    border: 0;
    height: 100%;
    width: 100%;
}

figure {
    margin: 1.5em 0;
}

figure img {
    max-width: 100%;
}

figcaption {
    color: var(--sidebar-non-existant, #949494);
    font-size: 0.9em;
    margin-top: 0.5em;
}

/* --- external links in the menu bar ------------------------------------ */

.right-buttons .site-link {
    color: var(--icons);
    font-size: 1.3rem;
    padding: 0 0.3rem;
    text-decoration: none;
}

.right-buttons .site-link:hover {
    color: var(--icons-hover);
}

@media only screen and (max-width: 700px) {
    .right-buttons .site-link.optional {
        display: none;
    }
}

/* --- standalone category/tag pages ------------------------------------- */

.taxonomy-shell {
    padding: 0 var(--page-padding, 15px);
}

.taxonomy-header {
    align-items: baseline;
    border-bottom: 1px solid var(--table-border-color, rgba(0, 0, 0, 0.1));
    display: flex;
    flex-wrap: wrap;
    gap: 0.5em 1em;
    justify-content: space-between;
    margin: 0 auto;
    max-width: var(--content-max-width, 750px);
    padding: 1.2em 1em 0.8em;
}

a.taxonomy-home {
    color: var(--fg);
    font-size: 1.05em;
    font-weight: 600;
    text-decoration: none;
}

.taxonomy-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6em;
}

.taxonomy-nav a {
    color: var(--icons, #757575);
    font-size: 0.85em;
    text-decoration: none;
}

.taxonomy-nav a:hover,
a.taxonomy-home:hover {
    color: var(--links);
}

/* --- taxonomy long tail (terms used by a single post) ------------------- */

details.taxonomy-longtail {
    border-top: 1px solid var(--table-border-color, rgba(0, 0, 0, 0.1));
    margin-top: 2em;
    padding-top: 1em;
}

details.taxonomy-longtail > summary {
    color: var(--sidebar-non-existant, #949494);
    cursor: pointer;
    font-size: 0.9em;
}

details.taxonomy-longtail > summary:hover {
    color: var(--fg);
}

details.taxonomy-longtail .taxonomy-cloud {
    margin-top: 1em;
}

details.taxonomy-longtail a.taxonomy-pill {
    font-size: 0.78em;
    opacity: 0.75;
}

details.taxonomy-longtail a.taxonomy-pill:hover {
    opacity: 1;
}

/* --- mermaid diagrams --------------------------------------------------- */

pre.mermaid {
    overflow-x: auto;
    text-align: center;
}

pre.mermaid svg {
    height: auto;
    max-width: 100%;
}
