/* ============================================================
   GUIDE ARTICLE
   Usage: Views/Guides/Get.cshtml; the reading column, the "On this page" rail beside it and the guide masthead.
   ============================================================ */

/* The category pill above the masthead title; site.css's .blog-category forces green text over the masthead image. */
.guide-category {
    margin-bottom: 5px;
    padding: 4px 9px 5px;
    border: var(--bs-border-width) solid var(--bs-white);
    background-color: transparent;
    color: var(--bs-white);
    font-size: 1em;
    text-decoration: none;
}

.guide-category:hover {
    border-color: var(--bs-primary);
    background-color: var(--bs-primary);
    color: var(--bs-white);
    text-decoration: none;
}

/* Teaser image on a "More" tile after the article; a background, as on the guides index, so a missing file shows no broken image. */
.guide-tile__image {
    aspect-ratio: 16 / 9;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

/* md and up: a lone tile puts its image beside its title and teaser. */
@media (min-width: 768px) {
    .guide-tile__image--side {
        flex: 0 0 40%;
    }
}

/* xl and up */
@media (min-width: 1200px) {
    /* site.css caps .uploadedScreenshot at 650px, wider than the column, and other authored images not at all. */
    .guide-article img {
        max-width: 100%;
        height: auto;
    }

    /* The side padding of site.css's .blog-header-container, and the guide masthead header's width below, so the column starts under the masthead title. */
    .guide-frame {
        max-width: 1140px;
        padding-left: 35px;
        padding-right: 35px;
        margin-left: auto;
        margin-right: auto;
    }

    /* The body's frame sits in a 1140px .container whose 12px side padding leaves it 1116px; the masthead and the top bar sit outside it. */
    .blog-header-wrap--guide header {
        max-width: 1116px;
    }

    .guide-frame--bar {
        max-width: 1116px;
    }

    .guide-layout {
        --guide-rail-width: 230px;
        --guide-layout-gap: 60px;
        display: flex;
        justify-content: space-between;
        gap: var(--guide-layout-gap);
    }

    .guide-layout__main {
        flex: 0 1 100%;
        min-width: 0;
    }

    /* A guide with no "On this page" list keeps the column width and left edge a guide with one has, under the masthead title. */
    .guide-layout__main--no-rail {
        flex-basis: calc(100% - var(--guide-rail-width) - var(--guide-layout-gap));
    }

    .guide-layout__rail {
        flex: 0 0 var(--guide-rail-width);
        padding-top: 20px;
    }
}

/* xxl and up: the 1320px .container leaves room for the whole 1140px frame. */
@media (min-width: 1400px) {
    .blog-header-wrap--guide header {
        max-width: 1140px;
    }

    .guide-frame--bar {
        max-width: 1140px;
    }
}

/* md and below: site.css gives every masthead 550px and a 40px title; a guide's is as tall as its content. */
@media (max-width: 767.98px) {
    .blog-header-wrap--guide {
        min-height: 0;
    }

    /* site.css pulls the masthead 50px up under the fixed site header below 1200px. */
    .blog-header-wrap--guide header {
        padding-top: calc(50px + 24px);
        padding-bottom: 32px;
    }

    .blog-header-wrap--guide .blog-title {
        font-size: 32px;
        margin-bottom: 20px;
    }

    /* One meta item per line, so no line starts with site.css's separator. */
    .blog-header-wrap--guide .blog-subnav {
        flex-direction: column;
    }

    .blog-header-wrap--guide .blog-subnav li:nth-child(n+2)::before {
        content: none;
    }
}
