/* The recipe book: /recipes.html is a list, and each recipe has its own page under /recipes/ */

/* section label, like the blog's "★ Pinned" */
#talltext .recipe-section {
    margin: 18px 0 6px 0;
    padding: 2px 10px;
    font-size: 20px;
    color: #ffaaba;
    background-color: #664477;
    border: 3px ridge #8899ff;
    display: inline-block;
}

/* the index: one row per recipe: arrow, title, and a host on the right for other sites */
.recipe-index {
    list-style: none;
    margin: 0 0 24px 0;
    padding: 0;
}

#talltext .recipe-index li {
    border-bottom: 2px dotted #8799ff;
}

/* #talltext for specificity: style.css's `.subwindow a` would shrink the row to a centred 80% */
#talltext .recipe-index a {
    width: auto;
    margin: 0;
    display: grid;
    grid-template-columns: auto 1fr auto;
    column-gap: 12px;
    align-items: baseline;
    padding: 8px 10px;
    font-family: 'pc-98-bold';
    font-size: 24px;
    color: #664477;
}

.recipe-index a::before {
    content: "→";
    grid-column: 1;
    grid-row: 1;
}

.recipe-index .recipe-title {
    grid-column: 2;
    grid-row: 1;
}

.recipe-index time,
.recipe-index .recipe-host {
    grid-column: 3;
    grid-row: 1;
    font-family: 'pc-98';
    font-size: 18px;
    color: #8799ff;
    white-space: nowrap;
}

/* the selected row is an inverted bar, PC-98 menu style */
#talltext .recipe-index a:hover,
#talltext .recipe-index a:focus-visible {
    background-color: #664477;
    color: #ffaaba;
    outline: none;
}

#talltext .recipe-index a:hover time,
#talltext .recipe-index a:focus-visible time,
#talltext .recipe-index a:hover .recipe-host,
#talltext .recipe-index a:focus-visible .recipe-host {
    color: #ffaaba;
}

/* someone else's recipe book: a boxed row with a double arrow, since it leaves the site */
#talltext .recipe-elsewhere li {
    border: 3px ridge #8899ff;
    background-color: #ffc4cf;
}

.recipe-elsewhere a::before {
    content: "⇒";
}

/* a recipe's own page */
#talltext .recipe-back {
    display: inline-block;
    margin-top: 6px;
    font-size: 20px;
}

/* room after the last step, so it doesn't sit on the window's bottom edge */
#talltext.recipe-page {
    padding-bottom: 96px;
}

#talltext.recipe-page h1 {
    margin-top: 4px;
}

#talltext.recipe-page h2 {
    margin: 22px 0 8px 0;
}

/* the doc's one-line verdict, boxed like the Elsewhere row */
#talltext .recipe-verdict {
    border: 3px ridge #8899ff;
    background-color: #ffc4cf;
    padding: 8px 14px;
    margin: 14px 0 10px 0;
}

#talltext .recipe-meta {
    font-size: 18px;
    color: #553366;
    margin: 0 0 6px 0;
}

/* links in the text (sources, other recipes) need to look like links: the site's links are bare purple */
#talltext.recipe-page p a,
#talltext.recipe-page li a {
    text-decoration: underline;
}

/* group labels ("Filling", "Gin jus"): h5's default 0.83em is too small to read */
#talltext.recipe-page h5 {
    font-size: 16px;
    margin: 14px 0 0 0;
}

/* ingredient lists span the page now that most recipes have no photo */
#talltext.recipe-page ul:not(.recipe-notes) li {
    font-size: 18px;
    line-height: 1.3;
}

/* the pc-98 font's degree sign is full-width; this pulls the F back next to it */
.deg {
    letter-spacing: -0.5em;
}

/* notes and variant changes are sentences: body text with bullets */
#talltext .recipe-notes li {
    font-family: 'pc-98';
    font-size: 20px;
    line-height: 1.2em;
    color: black;
    margin-bottom: 8px;
}

.recipe-header {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 27px;
}

.recipe-imagebox {
    flex: 0 0 48%;
    margin-top: 8px;
}

/* the photos are PC-98 renders (js/pc98.js at 320px), so scale them without smoothing */
.recipe-imagebox img {
    image-rendering: pixelated;
}

.recipe-ingredientbox {
    flex: 1;
}

#talltext .recipe-ingredientbox h2 {
    margin-top: 4px;
}

/* the steps read like the body text, not like the bold purple lists */
#talltext .recipe-steps li {
    font-family: 'pc-98';
    font-size: 22px;
    line-height: 1.2em;
    color: black;
    margin-bottom: 12px;
}

#talltext .recipe-steps li::marker {
    font-family: 'pc-98-bold';
    color: #664477;
}

@media (max-width: 768px) {
    .recipe-header {
        flex-direction: column;
        gap: 4px;
    }

    .recipe-imagebox {
        flex-basis: auto;
        width: 100%;
    }

    #talltext .recipe-index a {
        font-size: 20px;
        padding: 8px 4px;
    }

    /* the page scrolls as a whole on phones; leave room above the home bar too */
    #talltext.recipe-page {
        padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px));
    }

    /* the only way back on a phone (the sidebar is hidden), so give it a full-size tap target */
    #talltext .recipe-back {
        padding: 10px 0;
    }
}

/* Holo reacts to each recipe's verdict; scripts/build_recipes.py picks the face (happy is style.css's default) */
#right-sidebar.holo-surprise {
    background-image: url("/img/holo/HolosurpriseBGTransparent.png");
}

#right-sidebar.holo-sad {
    background-image: url("/img/holo/HolosadBGTransparent.png");
}
