/*
File: /css/cookbooks.css
Version inherited from /pages/cookbooks.php
*/


* {
    box-sizing: border-box;
}


:root {
    --paper: #fffdf8;
    --cream: #fffaf1;
    --red: #c92f2f;
    --red-dark: #982323;
    --gold: #d6a94d;
    --ink: #292722;
    --muted: #716d64;
    --border: rgba(48, 42, 32, .14);
    --shadow: 0 10px 28px rgba(55, 43, 28, .13);
}


html {
    scroll-behavior: smooth;
}


body {
    margin: 0;
    min-height: 100vh;
display: flex;
flex-direction: column;
background:
    linear-gradient(
        165deg,
        rgba(221, 209, 192, 0.80) 0%,
        rgba(203, 182, 155, 0.80) 52%,
        rgba(169, 139, 107, 0.80) 100%
    ),
    url("/images/rusticWall.png");
    color: var(--ink);
    font-family: Arial, Helvetica, sans-serif;
}

main.siteShell {
    flex: 1 0 auto;
}

a {
    color: inherit;
}


button,
input {
    font: inherit;
}


.siteShell {
    width: min(1500px, calc(100% - 28px));
    margin: 0 auto;
}


/*
=========================================================
PAGE INTRO
=========================================================
*/

.pageIntro {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;

    margin: 22px 0 10px;
}


.pageIntroText {
    min-width: 0;
}


.pageIntro h1 {
    margin: 0;

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size:
        clamp(
            2rem,
            4vw,
            3.25rem
        );

    line-height: 1;
}


.pageIntro p {
    max-width: 760px;

    margin:
        7px 0 0;

    color:
        var(--muted);

    line-height:
        1.5;
}


.pageIntroActions {
    flex:
        0 0 auto;
}


.createCookbookButton {
    display:
        inline-flex;

    align-items:
        center;

    justify-content:
        center;

    min-height:
        42px;

    padding:
        10px 17px;

    border-radius:
        999px;

    background:
        var(--red);

    color:
        white;

    font-weight:
        900;

    text-decoration:
        none;

    box-shadow:
        0 5px 14px
        rgba(
            120,
            30,
            30,
            .16
        );
}


.createCookbookButton:hover {
    background:
        var(--red-dark);
}


/*
=========================================================
TOOLBAR / SEARCH
=========================================================
*/

.cookbookToolbar {
    display:
        flex;

    align-items:
        center;

    gap:
        10px;

    margin:
        16px 0 6px;
}


.cookbookSearch {
    flex:
        1;

    display:
        flex;

    gap:
        9px;
}


.cookbookSearch input {
    flex:
        1;

    min-width:
        0;

    padding:
        12px 14px;

    border:
        1px solid
        var(--border);

    border-radius:
        11px;

    background:
        var(--paper);

    color:
        var(--ink);

    box-shadow:
        0 3px 10px
        rgba(
            50,
            40,
            30,
            .05
        );
}


.cookbookSearch input:focus {
    outline:
        2px solid
        rgba(
            201,
            47,
            47,
            .18
        );

    border-color:
        rgba(
            201,
            47,
            47,
            .45
        );
}


.searchButton,
.clearSearchButton {
    display:
        inline-flex;

    align-items:
        center;

    justify-content:
        center;

    min-height:
        42px;

    padding:
        10px 17px;

    border-radius:
        10px;

    font-weight:
        900;

    text-decoration:
        none;
}


.searchButton {
    border:
        0;

    background:
        var(--red);

    color:
        white;

    cursor:
        pointer;
}


.searchButton:hover {
    background:
        var(--red-dark);
}


.clearSearchButton {
    border:
        1px solid
        var(--border);

    background:
        var(--paper);

    color:
        var(--ink);
}


/*
=========================================================
SECTION
=========================================================
*/

.cookbookSection {
    margin-top: 22px;
    position: relative;
}


.sectionHeading {

    position: relative;
z-index: 1;

    display:
        flex;

    align-items:
        end;

    justify-content:
        space-between;

    gap:
        18px;

    margin-bottom:
        12px;
}


.sectionHeading h2 {
    margin:
        0;

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size:
        clamp(
            1.65rem,
            3vw,
            2.35rem
        );
}


.sectionHeading p {
    margin:
        5px 0 0;

    color:
        var(--muted);

    font-size:
        .92rem;
}


.cookbookResultCount {
    flex:
        0 0 auto;

    color:
        var(--muted);

    font-size:
        .84rem;

    font-weight:
        800;
}


/*
=========================================================
COOKBOOK GRID
=========================================================
*/

.cookbookGrid {
    display:
        grid;

    grid-template-columns:
        repeat(
            4,
            minmax(
                0,
                1fr
            )
        );

    gap:
        16px;
}


/*
=========================================================
COOKBOOK CARD
=========================================================
*/

.cookbookCard {
    position:
        relative;

    min-width:
        0;

    min-height:
        390px;

    display:
        flex;

    flex-direction:
        column;

    overflow:
        hidden;

    border:
        1px solid
        var(--border);

    border-radius:
        18px;

    background:
        var(--paper);

    box-shadow:
        0 5px 18px
        rgba(
            50,
            40,
            30,
            .07
        );

    transition:
        transform .15s ease,
        box-shadow .15s ease,
        border-color .15s ease;

        cursor:
    pointer;
}


.cookbookCard:hover {
    transform:
        translateY(-2px);

    box-shadow:
        var(--shadow);

    border-color:
        rgba(
            201,
            47,
            47,
            .22
        );
}


.cookbookCardFeatured {
    border-color:
        rgba(
            201,
            47,
            47,
            .3
        );
}


/*
=========================================================
COVER
=========================================================
*/

.cookbookCoverLink {
    display:
        block;

    text-decoration:
        none;
}


.cookbookCover {
    position:
        relative;

    height:
        190px;

    display:
        flex;

    align-items:
        center;

    justify-content:
        center;

    overflow:
        hidden;

    background:
        radial-gradient(
            circle at 70% 25%,
            rgba(
                255,
                255,
                255,
                .62
            ),
            transparent 27%
        ),
        linear-gradient(
            135deg,
            rgba(
                201,
                47,
                47,
                .18
            ),
            rgba(
                214,
                169,
                77,
                .38
            )
        );
}


.cookbookCover img {
    width:
        100%;

    height:
        100%;

    display:
        block;

    object-fit:
        cover;

    transition:
    transform .18s ease,
    opacity 1.2s ease-in-out;
}


.cookbookCard:hover
.cookbookCover img {
    transform:
        scale(1.025);
}


.cookbookEmoji,
.cookbookMediaFallback {
    display:
        flex;

    align-items:
        center;

    justify-content:
        center;
}


.cookbookEmoji {
    width:
        100%;

    height:
        100%;

    font-size:
        5.5rem;

    line-height:
        1;
}


.cookbookMediaFallback {
    font-size:
        4rem;
}


.cookbookPlayBadge {
    position:
        absolute;

    left:
        50%;

    top:
        50%;

    width:
        48px;

    height:
        48px;

    display:
        flex;

    align-items:
        center;

    justify-content:
        center;

    transform:
        translate(
            -50%,
            -50%
        );

    border-radius:
        50%;

    background:
        rgba(
            25,
            22,
            19,
            .78
        );

    color:
        white;

    font-size:
        1.1rem;

    pointer-events:
        none;

    box-shadow:
        0 4px 15px
        rgba(
            0,
            0,
            0,
            .22
        );
}


.featuredBadge {
    position:
        absolute;
z-index: 5;
pointer-events: none;
    top:
        10px;

    left:
        10px;

    padding:
        5px 9px;

    border-radius:
        999px;

    background:
        var(--red);

    color:
        white;

    font-size:
        .7rem;

    font-weight:
        900;

    letter-spacing:
        .4px;

    text-transform:
        uppercase;

    box-shadow:
        0 3px 10px
        rgba(
            0,
            0,
            0,
            .15
        );
}


/*
=========================================================
BODY
=========================================================
*/

.cookbookBody {
    flex:
        1;

    display:
        flex;

    flex-direction:
        column;

    padding:
        15px;
}


.cookbookCategory {
    margin-bottom:
        5px;

    color:
        var(--red);

    font-size:
        .72rem;

    font-weight:
        900;

    letter-spacing:
        1.1px;

    text-transform:
        uppercase;
}


.cookbookTitle {
    margin:
        0 0 7px;

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size:
        1.35rem;

    line-height:
        1.15;
}


.cookbookTitle a {
    text-decoration:
        none;
}


.cookbookTitle a:hover {
    color:
        var(--red);
}


.cookbookDescription {
    margin:
        0;

    color:
        var(--muted);

    font-size:
        .88rem;

    line-height:
        1.45;
}


.cookbookAuthor {
    margin-top:
        9px;

    color:
        #81786d;

    font-size:
        .78rem;
}


.cookbookMeta {
    display:
        flex;

    flex-wrap:
        wrap;

    gap:
        6px;

    margin-top:
        auto;

    padding-top:
        13px;
}


.cookbookMeta span {
    padding:
        4px 8px;

    border-radius:
        999px;

    background:
        #efe1ce;

    color:
        #5e554b;

    font-size:
        .72rem;

    font-weight:
        800;
}


/*
=========================================================
ACTIONS
=========================================================
*/

.cookbookActions {
    display:
        grid;

    grid-template-columns:
        1.1fr 1fr 1fr;

    gap:
        7px;

    margin-top:
        12px;

    padding-top:
        12px;

    border-top:
        1px solid
        var(--border);
}


.cookbookAction {
    min-width:
        0;

    min-height:
        36px;

    display:
        inline-flex;

    align-items:
        center;

    justify-content:
        center;

    padding:
        7px 9px;

    border:
        1px solid
        var(--border);

    border-radius:
        9px;

    background:
        #f7f1e8;

    color:
        var(--ink);

    font-size:
        .76rem;

    font-weight:
        900;

    text-decoration:
        none;

    cursor:
        pointer;
}


.cookbookAction:hover {
    border-color:
        rgba(
            201,
            47,
            47,
            .35
        );

    color:
        var(--red);
}


.cookbookActionPrimary {
    border-color:
        var(--red);

    background:
        var(--red);

    color:
        white;
}


.cookbookActionPrimary:hover {
    background:
        var(--red-dark);

    color:
        white;
}


/*
=========================================================
EMPTY / ERROR
=========================================================
*/

.emptyRow {
    margin-top:
        18px;

    padding:
        18px;

    border:
        1px solid
        var(--border);

    border-radius:
        14px;

    background:
        rgba(
            255,
            253,
            248,
            .92
        );

    color:
        var(--muted);
}


/*
=========================================================
VERSION
=========================================================
*/

.version {
    padding:
        16px 0 24px;

    color:
        #5f574e;

    text-align:
        right;

    font-size:
        .78rem;
}

/* =========================================================
   RECIPE-BASED COOKBOOK COVERS
   ========================================================= */

.cookbookCover {
    position: relative;
    overflow: hidden;
}

.cookbookRecipeCoverImage {
    position: absolute;
    inset: 0;

    width: 100%;
    height: 100%;

    object-fit: cover;
    object-position: center;

    display: block;

    opacity: 1;
}

.cookbookRecipeCoverImage {
    transition: opacity 0.9s ease;
}

.cookbookRecipeCoverImageIncoming {
    opacity: 0;
    z-index: 2;
}

.cookbookRecipeCoverImageIncoming.cookbookRecipeCoverImageVisible {
    opacity: 1;
}

.cookbookRecipeCoverImage {
    position: absolute;
    inset: 0;

    width: 100%;
    height: 100%;

    object-fit: cover;
    object-position: center;

    display: block;

    opacity: 1;

    transition:
        opacity 1.2s ease-in-out;

    will-change: opacity;
}


/* New image begins invisible above old image. */
.cookbookRecipeCoverImageIncoming {
    opacity: 0;
    z-index: 2;
}


/* New image fades in. */
.cookbookRecipeCoverImageIncoming.cookbookRecipeCoverImageVisible {
    opacity: 1;
}


/* Old image fades out underneath it. */
.cookbookRecipeCoverImageOutgoing {
    opacity: 0;
    z-index: 1;
}

/*
=========================================================
LARGE TABLET
=========================================================
*/

@media (
    max-width: 1150px
) {

    .cookbookGrid {
        grid-template-columns:
            repeat(
                3,
                minmax(
                    0,
                    1fr
                )
            );
    }

}


/*
=========================================================
TABLET
=========================================================
*/

@media (
    max-width: 850px
) {

    .cookbookGrid {
        grid-template-columns:
            repeat(
                2,
                minmax(
                    0,
                    1fr
                )
            );
    }


    .pageIntro {
        align-items:
            flex-start;

        flex-direction:
            column;
    }


    .pageIntroActions {
        width:
            100%;
    }


    .createCookbookButton {
        width:
            100%;
    }


    .sectionHeading {
        align-items:
            flex-start;

        flex-direction:
            column;

        gap:
            5px;
    }

}


/*
=========================================================
PHONE
=========================================================
*/

@media (
    max-width: 560px
) {

    .siteShell {
        width:
            min(
                100% - 18px,
                1500px
            );
    }


    .cookbookToolbar {
        align-items:
            stretch;

        flex-direction:
            column;
    }


    .cookbookSearch {
        width:
            100%;
    }


    .clearSearchButton {
        width:
            100%;
    }


    .cookbookGrid {
        grid-template-columns:
            1fr;
    }


    .cookbookCard {
        min-height:
            0;
    }


    .cookbookCover {
        height:
            180px;
    }


    .cookbookActions {
        grid-template-columns:
            1fr 1fr;
    }


    .cookbookActionPrimary {
        grid-column:
            1 / -1;
    }

}

/* =========================================================
   COOKBOOKS HERO
   ========================================================= */

.cookbooksHero {
    position: relative;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    min-height: 200px;
    max-height: 220px;
    background-image:
        url("/images/cookbooks-header-1600.webp");

    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    overflow: hidden;
}

.cookbooksHeroOverlay {
    position: absolute;
    inset: 0;

    background:
        linear-gradient(
            90deg,
            rgba(20, 12, 8, 0.78) 0%,
            rgba(20, 12, 8, 0.58) 42%,
            rgba(20, 12, 8, 0.35) 100%
        );

    pointer-events: none;
}

.cookbooksHeroInner {
    position: relative;
    z-index: 1;

    max-width: 1240px;
    margin: 0 auto;
    padding: 24px 24px 26px;
}

.cookbooksHeroTop {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 30px;
}

.cookbooksHeroCopy h1 {
    margin: 0;

    color: #fff8ee;

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size: clamp(2.4rem, 4vw, 3.6rem);
    line-height: 1;
}

.cookbooksHeroCopy p {
    max-width: 482px;
    margin: 10px 0 0;

    color: rgba(255, 248, 238, 0.9);

    font-size: 1rem;
    line-height: 1.45;
}


/* =========================================================
   CREATE COOKBOOK BUTTON
   ========================================================= */

.cookbooksCreateButton {
    flex: 0 0 auto;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    margin-top: 8px;
    padding: 12px 18px;

    border-radius: 999px;

    background: #d52b2f;
    color: #fff;

    font-weight: 700;
    text-decoration: none;

    box-shadow:
        0 5px 16px
        rgba(0, 0, 0, 0.24);

    transition:
        transform 160ms ease,
        background-color 160ms ease;
}

.cookbooksCreateButton:hover {
    background: #bc2226;
    color: #fff;

    transform: translateY(-1px);
}


/* =========================================================
   HERO SEARCH
   ========================================================= */

.cookbooksSearch {
    display: flex;
    align-items: stretch;
    gap: 10px;

    margin-top: 20px;
}

.cookbooksSearch input {
    flex: 1;
    min-width: 0;

    padding: 12px 15px;

    border:
        1px solid
        rgba(255, 255, 255, 0.32);

    border-radius: 9px;

    background:
        rgba(255, 252, 247, 0.96);

    color: #28221d;

    font: inherit;

    box-shadow:
        0 4px 14px
        rgba(0, 0, 0, 0.15);
}

.cookbooksSearch input:focus {
    outline:
        2px solid
        rgba(213, 43, 47, 0.45);

    outline-offset: 1px;
}

.cookbooksSearchButton,
.cookbooksClearButton {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 82px;
    padding: 10px 17px;

    border: 0;
    border-radius: 9px;

    font: inherit;
    font-weight: 700;

    text-decoration: none;

    cursor: pointer;
}

.cookbooksSearchButton {
    background: #d52b2f;
    color: #fff;
}

.cookbooksSearchButton:hover {
    background: #bc2226;
}

.cookbooksClearButton {
    background:
        rgba(255, 248, 238, 0.94);

    color: #33261d;
}

.cookbooksClearButton:hover {
    background: #fff;
}


/* =========================================================
   RESPONSIVE HERO IMAGE
   ========================================================= */

@media (max-width: 1450px) {

    .cookbooksHero {
        background-image:
            url("/images/cookbooks-header-1400.webp");
    }

}


@media (max-width: 900px) {

    .cookbooksHero {
        background-image:
            url("/images/cookbooks-header-1200.webp");

        background-position: center;
    }

    .cookbooksHeroInner {
        padding: 16px 18px;
    }

    .cookbooksHeroTop {
        gap: 14px;
    }

    .cookbooksCreateButton {
        margin-top: 0;
    }

}

.cookbookHeadingCopy {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cookbookHeadingIcon {
    width: 64px;
    height: 64px;
    object-fit: contain;
    flex: 0 0 64px;
    position: relative;
    top: -2px;
}

.cookbooksVegDecoration {
    position: absolute;
    top: -19px;
    left: 77%;
    width: 360px;
    height: auto;
    transform: translateX(-50%);
    z-index: 0;
    pointer-events: none;
}

.compactNavChevron {
    display: none;
    position: absolute;
right: 0px;
top: 50%;
transform: translateY(-50%);
z-index: 2;
}

@media (max-width: 650px) {
    .cookbooksHero {
        max-height: none;
    }

    .cookbooksHeroTop {
        flex-wrap: wrap;
        gap: 10px;
    }

    .cookbooksHeroCopy {
        flex: 1 1 100%;
    }

    .cookbooksCreateButton {
        flex: 0 0 auto;
        margin-top: 0;
    }

.compactNavChevron {

width: 44px;
height: 52px;

display: flex;
align-items: center;
justify-content: flex-end;

padding-right: 7px;

background: linear-gradient(
    to right,
    transparent 0%,
    rgba(31, 27, 25, 0.75) 45%,
    rgba(31, 27, 25, 0.97) 80%
);
}

    .compactNavChevron {
        font-size: 0;
    }

    .compactNavChevron::after {
        content: "›";
        position: absolute;
        right: 5px;
        top: 50%;
        transform: translateY(-50%);

        color: #fff3df;
        font-size: 30px;
        font-weight: 300;
        line-height: 1;
    }

    .sectionHeading h2 {
        display: inline-block;
        background: #fff4df;
        padding: 8px 14px;
        border-radius: 12px;
    }

    .cookbookResultCount {
        display: inline-block;
        width: fit-content;
        background: #fff4df;
        color: #4a3425;
        padding: 7px 12px;
        border-radius: 9px;
    }

    
}

.compactNavChevron[hidden] {
    display: none !important;
}

@media (max-width: 650px) {
    .compactNavChevron {
        display: block;
        flex: 0 0 auto;
        color: #fff3df;
        font-size: 30px;
        font-weight: 300;
        line-height: 1;
        pointer-events: none;
    }
}

/* =========================================================
   REFINED COOKBOOK CARDS
   ========================================================= */

.cookbookCard {
    border: 6px solid #56402e;
    border-radius: 18px;
    background: #755a43;
    padding: 12px;
    box-shadow: 0 7px 20px rgba(35, 22, 12, 0.20);
    justify-content: flex-start;

    transition:
        transform 350ms cubic-bezier(0.22, 1, 0.36, 1),
        border-color 350ms ease,
        box-shadow 350ms ease;
}

.cookbookCard:hover,
.cookbookCardFeatured:hover {
    border-color: #352317;
    box-shadow: 0 14px 32px rgba(35, 22, 12, 0.34);
    transform: translateY(-6px);
}

.cookbookCardFeatured {
    border-color: #56402e;
}

.cookbookCoverLink {
    margin: 3px;
    border-radius: 9px;
    overflow: hidden;
}

.cookbookCover img {
    transition:
        transform 350ms cubic-bezier(0.22, 1, 0.36, 1),
        opacity 1.2s ease-in-out;
}

.cookbookCard:hover .cookbookCover img {
    transform: scale(1.09);
}

.cookbookBody {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 0;
    background: #755a43;
    border-radius: 0;
    justify-content: flex-start;
}

.cookbookInfo {
    flex: 0 0 165px;
    height: 165px;
    min-height: 0;
    overflow: hidden;
    margin-top: 4px;
    padding: 11px 16px 16px;
    background: #917258;
    border: 1px solid rgba(255, 232, 202, 0.20);
    border-radius: 11px;
    color: #fff2df;
}

.cookbookTitle,
.cookbookTitle a {
    color: #fff2df;
}

.cookbookDescription,
.cookbookAuthor {
    color: #f0d9bf;
}

.cookbookMeta {
    margin: auto 0 0;
    padding: 10px 8px 8px;
    background: #755a43;
}

.cookbookActions {
    margin: 0;
    padding: 12px 8px 5px;
    background: #755a43;
    border-top: 1px solid #ae9278;
    border-radius: 0;
}