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


/* ============================================================
   TOKENS
   ============================================================ */

:root {
    --page: #e8d9c2;
    --paper: #f8edda;

    --brown-950: #2d1f19;
    --brown-900: #39261e;
    --brown-850: #453025;
    --brown-800: #513726;
    --brown-700: #65452f;
    --brown-600: #7b5639;

    --cream: #fff6e6;
    --cream-soft: #f5e7d1;
    --cream-muted: #e6d1b5;

    --ink: #2c221c;
    --muted: #786554;

    --red: #c93434;
    --gold: #d79a58;

    --border-dark: #4a2f20;
    --border-mid: #8b6748;

    --shadow:
        0 8px 24px rgba(54, 35, 22, .16);

    --shadow-soft:
        0 4px 14px rgba(54, 35, 22, .10);
}


* {
    box-sizing: border-box;
}


html {
    min-height: 100%;
}


body {
    margin: 0;
    min-height: 100vh;

    display: flex;
    flex-direction: column;

    background: #d8c3a5;

    color: var(--ink);
    font-family: Arial, Helvetica, sans-serif;
}


a {
    color: inherit;
}


/* ============================================================
   SHARED WIDTH
   ============================================================ */

.siteShell {
    width: min(1280px, calc(100% - 40px));
    margin-inline: auto;
}


/* ============================================================
   COMPACT TOP HEADER
   ============================================================ */

.compactHeader {
    position: relative;
    z-index: 30;

    background:
        linear-gradient(
            105deg,
            #241c18 0%,
            #2d211c 60%,
            #38221f 100%
        );

    border-bottom: 1px solid rgba(255,255,255,.08);
}


.compactHeaderInner {
    display: flex;
    align-items: center;
    min-height: 48px;
    gap: 14px;
}


.compactBrand {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;

    font-family: Georgia, "Times New Roman", serif;
    font-size: 18px;
    font-weight: 800;

    text-decoration: none;
    white-space: nowrap;
}


.compactBrandMain {
    color: #fffaf0;
}


.compactBrandNoAds {
    color: #ef4444;
}


.compactSpacer {
    flex: 1;
}


.accountButton {
    display: inline-flex;
    align-items: center;

    padding: 7px 14px;

    background: #fffaf1;
    border: 1px solid rgba(255,255,255,.45);
    border-radius: 999px;

    color: #2e211b;

    font-size: 12px;
    font-weight: 800;

    text-decoration: none;

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


/* ============================================================
   SHARED NAV
   ============================================================ */

.mainNav {
    position: sticky;
    top: 0;
    z-index: 25;

    background:
        rgba(255, 249, 238, .95);

    backdrop-filter: blur(10px);

    border-top: 1px solid rgba(84, 59, 39, .12);
    border-bottom: 1px solid rgba(84, 59, 39, .25);

    box-shadow:
        0 2px 8px rgba(61, 42, 27, .06);
}


.navInner {
    display: flex;
    align-items: center;

    gap: 2px;

    overflow-x: auto;
    scrollbar-width: none;
}


.navInner::-webkit-scrollbar {
    display: none;
}


.navInner a {
    position: relative;

    padding: 11px 14px;

    color: #38271f;

    font-size: 14px;
    font-weight: 800;

    text-decoration: none;
    white-space: nowrap;

    border-radius: 7px;
}


.navInner a::after {
    content: "";

    position: absolute;
    left: 50%;
    bottom: 5px;

    width: 0;
    height: 2px;

    background: var(--red);

    transform: translateX(-50%);

    transition:
        width .16s ease;
}


.navInner a:hover {
    color: var(--red);
    background: rgba(201, 52, 52, .05);
}


.navInner a:hover::after {
    width: 24px;
}


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

.cookbookPage {
    position: relative;
    z-index: 0;
    isolation: isolate;

    flex:
        1 0 auto;

    padding:
        14px 0 18px;
}

.cookbookPage::before {
    content: "";

    position: absolute;
    z-index: -1;

    top: 0;
    bottom: 0;

    left: 50%;

    width: 100vw;

    transform: translateX(-50%);

    background-image:
        radial-gradient(
            ellipse at 88% 7%,
            rgba(166, 91, 52, .18),
            transparent 34%
        ),
        radial-gradient(
            ellipse at 7% 62%,
            rgba(116, 92, 56, .11),
            transparent 42%
        ),
        linear-gradient(
            180deg,
            rgba(248, 235, 212, .08) 0%,
            rgba(207, 174, 132, .20) 58%,
            rgba(165, 123, 82, .34) 100%
        ),
        url('/images/paperTexture4.png');

    background-position:
        center top,
        center top,
        center top,
        -6px top;

    background-size:
        auto,
        auto,
        auto,
        100% 100%;

    background-repeat:
        no-repeat,
        no-repeat,
        no-repeat,
        no-repeat;
}

.cookbookBack {
    display: inline-flex;
    align-items: center;

    margin:
        0 0 10px;

    color: #493527;

    font-size: 13px;
    font-weight: 800;

    text-decoration: none;
}


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

.cookbookBookPanel {
    overflow: hidden;

    background:
    radial-gradient(
        circle at 92% 12%,
        rgba(239, 181, 118, .22),
        transparent 30%
    ),
    radial-gradient(
        circle at 76% 68%,
        rgba(255, 222, 177, .08),
        transparent 34%
    ),
    linear-gradient(
        118deg,
        #443129 0%,
        #5a4030 53%,
        #946d4b 100%
    );

    border: 3px solid var(--border-dark);
    border-radius: 18px;

    box-shadow:
        var(--shadow),
        inset 0 0 0 1px rgba(255,255,255,.08);
}

/* ============================================================
   COOKBOOK HERO
   ============================================================ */

.cookbookHero {
    position: relative;

    display: grid;

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

gap: 0;

    overflow: hidden;

padding: 9px 18px 0px;

    background: transparent;

    border: 0;

border-radius: 0;

color:
    var(--cream);

box-shadow: none;
}


/* decorative oversized rings */

.cookbookHero::before {
    content: "";

    position: absolute;

    width: 190px;
    height: 190px;

    right: -42px;
    top: -70px;

    border:
        1px solid rgba(255, 221, 179, .16);

    border-radius:
        50%;

    box-shadow:
        0 0 0 22px rgba(255, 221, 179, .04),
        0 0 0 46px rgba(255, 221, 179, .025);

    pointer-events: none;
}


/* small decorative accent */

.cookbookHero::after {
    content: "✦";

    position: absolute;

    right: 32px;
    bottom: 20px;

    color:
        rgba(228, 170, 102, .28);

    font-size: 46px;

    transform: rotate(15deg);

    pointer-events: none;
}

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

    min-width: 0;

    align-self: center;
}


.cookbookCategory {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;

    margin-bottom: 5px;

    color: #e9b274;

    font-size: 11px;
    font-weight: 900;

    letter-spacing: .11em;
    text-transform: uppercase;
}


.cookbookCategory span {
    display: inline-flex;
    align-items: center;
}


.cookbookCategory span::before {
    content: "";

    width: 6px;
    height: 6px;

    margin-right: 7px;

    background: #d38a4e;

    border-radius: 50%;

    box-shadow:
        0 0 0 3px rgba(211,138,78,.12);
}


.cookbookHero h1 {
    margin:
        0;

    flex:
        0 1 auto;

    color:
        #fff8ec;

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

    font-size:
        clamp(52px, 6vw, 68px);

    font-weight:
        900;

    line-height:
        .98;

    letter-spacing:
        -2.5px;

    text-transform:
        none;
}


.cookbookBlurb {
    margin:
        0;

    flex:
        0 1 585px;

    max-width:
        585px;

    text-align:
        right;

    color:
        #fff2df;

    font-size:
        15px;

    font-weight:
        600;

    line-height:
        1.48;
}


.cookbookFullDescription {
    margin: 0;

    color:
        #dfcdb8;

    font-size:
        13.5px;

    line-height:
        1.52;
}

.cookbookHeroMeta > .cookbookActions {
    display: inline-flex;
    align-items: center;
    flex-wrap: nowrap;
    flex: 0 0 auto;
    gap: 10px;
    margin: 0;
}

.cookbookHeroMeta .cookbookActionExplanation {
    white-space: nowrap;
}

.cookbookHeroMeta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;

    gap: 9px 16px;

    margin-top:
        8px;

    padding-top:
        11px;

    border-top:
        1px solid rgba(244, 216, 182, .24);

    color:
        #cfbca6;

    font-size:
        12px;
}


.cookbookHeroMeta span {
    position: relative;
}


.cookbookHeroMeta span + span::before {
    content: "•";

    margin-right:
        16px;

    color:
        #c98854;
}

.cookbookTitleRow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;

    width: 100%;

    margin-bottom: 12px;
}

/* ============================================================
   COOKBOOK TITLE ORNAMENTS
   Styles: diamond, starburst, swirl, minimal
   ============================================================ */

.cookbookTitleRow {
    position: relative;
    isolation: isolate;
}

.cookbookTitleRow h1 {
    position: relative;
    z-index: 1;
}

/* Decorative layer underneath the title */

.cookbookTitleRow::before,
.cookbookTitleRow::after {
    content: "";
    position: absolute;
    pointer-events: none;
    z-index: 0;
    transition:
        opacity .3s ease,
        transform .3s ease;
}

/* 1. DIAMOND */

.cookbookTitleRow[data-ornament="diamond"]::before {
    width: 86px;
    height: 86px;
    left: -15px;
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
    border: 2px solid rgba(231, 178, 113, .32);
    box-shadow:
        0 0 0 12px rgba(231, 178, 113, .035),
        inset 0 0 0 12px rgba(231, 178, 113, .055);
}

.cookbookTitleRow[data-ornament="diamond"]::before {
    animation: diamondEntrance 1.2s ease-out both;
}

@keyframes diamondEntrance {
    from {
        opacity: 0;
        transform: translateY(-50%) rotate(-45deg) scale(.8);
    }
    to {
        opacity: 1;
        transform: translateY(-50%) rotate(45deg) scale(1);
    }
}

/* 2. STARBURST */

.cookbookTitleRow[data-ornament="starburst"]::before {
    content: "✦";
    left: -24px;
    top: 50%;
    transform: translateY(-53%) rotate(-12deg);
    color: rgba(231, 178, 113, .24);
    font-family: Georgia, serif;
    font-size: 130px;
    line-height: 1;
}

.cookbookTitleRow[data-ornament="starburst"]::before {
    animation: starburstEntrance 1.2s ease-out both;
}

@keyframes starburstEntrance {
    from {
        opacity: 0;
        transform: translateY(-53%) rotate(-102deg) scale(.8);
    }
    to {
        opacity: 1;
        transform: translateY(-53%) rotate(-12deg) scale(1);
    }
}

/* 3. ORNAMENTAL SWIRL */

.cookbookTitleRow[data-ornament="swirl"]::before {
    content: "❦";
    left: -23px;
    top: 50%;
    transform: translateY(-52%) rotate(-18deg);
    color: rgba(231, 178, 113, .25);
    font-family: Georgia, serif;
    font-size: 115px;
    line-height: 1;
}

/* 4. MINIMAL — NO ORNAMENT */

.cookbookTitleRow[data-ornament="minimal"]::before,
.cookbookTitleRow[data-ornament="minimal"]::after {
    content: none;
}

/* Ornament selector */

.cookbookOrnamentPicker {
    position: absolute;
    top: -24px;
    right: 0;
    z-index: 5;
}

#cookbookOrnamentSelect {
    padding: 4px 8px;
    background: rgba(47, 32, 24, .85);
    border: 1px solid rgba(215, 154, 88, .45);
    border-radius: 6px;
    color: #f5e7d1;
    font-size: 11px;
    cursor: pointer;
}

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

.cookbookActions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;

    gap: 10px;

    margin-top:
        10px;
}


.cookbookActionButton {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height:
        35px;

    padding:
        8px 14px;

    background:
        linear-gradient(
            180deg,
            #f4d9b7,
            #dfb982
        );

    border:
        1px solid #bd8957;

    border-radius:
        999px;

    color:
        #3b2518;

    font-size:
        12px;

    font-weight:
        900;

    text-decoration:
        none;

    box-shadow:
        0 3px 9px rgba(24, 13, 7, .18);

    transition:
        transform .14s ease,
        box-shadow .14s ease,
        background .14s ease;
}


.cookbookActionButton:hover {
    transform:
        translateY(-1px);

    background:
        linear-gradient(
            180deg,
            #ffe6c4,
            #e7c08c
        );

    box-shadow:
        0 5px 12px rgba(24, 13, 7, .24);
}


.cookbookActionExplanation {
    color:
        #cdb8a0;

    font-size:
        12px;

    line-height:
        1.4;
}


/* ============================================================
   RECIPES PANEL
   ============================================================ */

.cookbookRecipes {
    position: relative;

    margin-top: 0;

padding:
    0px 17px 10px;

overflow:
    hidden;

    background: transparent;

   border: 0;

border-radius: 0;

box-shadow: none;
}


/* subtle line pattern */

.cookbookRecipes::before {
    content: "";

    position: absolute;
    inset: 0;

    pointer-events: none;

    opacity: .30;

    background:
        repeating-linear-gradient(
            135deg,
            transparent 0,
            transparent 28px,
            rgba(255,255,255,.018) 28px,
            rgba(255,255,255,.018) 29px
        );
}


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

    display: flex;
    align-items: center;

    gap: 16px;

    margin-bottom:
        13px;
}


.cookbookSectionHeading h2 {
    order: 1;
    flex: 0 0 auto;

    margin: 0;

    color:
        #fff5e6;

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

    font-size:
        clamp(2.85rem, 4.4vw, 3.45rem);

    font-weight:
        700;

    line-height:
        1;

    letter-spacing:
        0;
}

.cookbookRecipeHeadingTools {
    order: 3;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
    flex: 0 0 auto;
}

.cookbookRecipeArrangeButton {
    border: 1px solid #8a6749;
    background: #f0e2ce;
    color: #4b3323;

    padding: 8px 12px;

    font: inherit;
    font-size: 13px;
    font-weight: 700;

    cursor: pointer;
}


.cookbookRecipeArrangeButton:hover {
    background: #f7ead7;
}

/* line + diamond treatment like Browse sections */

.cookbookSectionHeading::after {
    order: 2;
    content: "";

    flex: 1;

    height: 1px;

    margin-right:
        4px;

    background:
        linear-gradient(
            90deg,
            rgba(215, 154, 88, .68),
            rgba(215, 154, 88, .08)
        );
}

#cookbookRecipeSearch {
    order: 3;
    margin-left: auto;

    position: relative;
    z-index: 2;

    flex:
        0 0 min(310px, 32vw);

    width:
        min(310px, 32vw);

    padding:
        9px 12px;

    background:
        rgba(255, 247, 233, .95);

    border:
        2px solid #8b6242;

    border-radius:
        9px;

    color:
        #3b2b20;

    font:
        inherit;

    font-size:
        12px;

    box-shadow:
        inset 0 1px 2px rgba(56, 34, 19, .08);
}


#cookbookRecipeSearch:focus {
    outline:
        2px solid #d69b61;

    outline-offset:
        2px;
}

.cookbookRecipeCardActions {
    display: flex;
    gap: 8px;

    padding: 9px 10px 10px;

    border-top: 1px solid rgba(107, 73, 50, 0.28);

    background: rgba(255, 248, 238, 0.72);
}


.cookbookRecipeCardButton {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 32px;

    padding: 6px 10px;

    border: 1px solid #8a6749;
    background: #f0e2ce;
    color: #4b3323;

    font: inherit;
    font-size: 12px;
    font-weight: 700;

    text-decoration: none;

    cursor: pointer;
}


.cookbookRecipeCardButton:hover {
    background: #f7ead7;
}


.cookbookRecipeCardButtonPrimary {
    background: #6b4932;
    color: #fff7eb;
}


.cookbookRecipeCardButtonPrimary:hover {
    background: #7d563b;
}


.cookbookRecipeCardButtonDanger {
    border-color: #9a5a4d;
    color: #7b352d;
}

/* ============================================================
   RECIPE GRID
   ============================================================ */

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

    display: grid;

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

    gap:
        14px;
}

.cookbookRecipeCardWrap {
    display: flex;
    flex-direction: column;

    min-width: 0;
    height: 100%;
}


.cookbookRecipeCardWrap .recipeCard {
    flex: 1 1 auto;
}

.recipeCard {
    display: flex;
    flex-direction: column;

    min-width: 0;

    overflow: hidden;

    background:
        linear-gradient(
            180deg,
            #fffaf0 0%,
            #f3e4cf 100%
        );

    border:
        2px solid #6b4932;

    border-radius:
        12px;

    color:
        var(--ink);

    text-decoration:
        none;

    box-shadow:
        0 4px 11px rgba(29, 16, 9, .20);

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


.recipeCard:hover {
    transform:
        translateY(-3px);

    border-color:
        #bd8150;

    box-shadow:
        0 8px 18px rgba(29, 16, 9, .28);
}


.recipeCard[hidden],
.emptyRow[hidden] {
    display:
        none !important;
}


.recipeImage {
    position: relative;

    width: 100%;

    aspect-ratio:
        16 / 9;

    overflow:
        hidden;

    background:
        #d6bea0;

    border-bottom:
        2px solid #6b4932;
}


.recipeImage img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;

    transition:
        transform .25s ease;
}


.recipeCard:hover .recipeImage img {
    transform:
        scale(1.025);
}


.recipeMediaFallback {
    display: grid;
    place-items: center;

    width: 100%;
    height: 100%;

    font-size: 42px;
}


.recipeBody {
    display: flex;
    flex: 1;
    flex-direction: column;

    gap: 7px;

    padding:
        12px 12px 10px;
}


.recipeLabel {
    color:
        var(--red);

    font-size:
        10px;

    font-weight:
        900;

    letter-spacing:
        .055em;

    text-transform:
        uppercase;
}


.recipeTitle {
    margin: 0;

    color:
        #2f251f;

    font-family:
        Arial,
        Helvetica,
        sans-serif;

    font-size:
        16px;

    font-weight:
        900;

    line-height:
        1.27;
}


.recipeBlurb {
    display:
        -webkit-box;

    margin: 0;

    overflow:
        hidden;

    color:
        #776657;

    font-size:
        12px;

    line-height:
        1.45;

    -webkit-line-clamp:
        3;

    -webkit-box-orient:
        vertical;
}


.recipeMeta {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;

    gap:
        6px;

    margin-top:
        auto;

    padding-top:
        8px;

    color:
        #806c5b;

    font-size:
        11px;
}


.recipeMeta span:last-child {
    color:
        var(--red);

    font-weight:
        800;
}


/* ============================================================
   EMPTY STATES
   ============================================================ */

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

    padding:
        22px;

    background:
        rgba(255, 246, 230, .94);

    border:
        2px solid #805a3e;

    border-radius:
        11px;

    color:
        var(--muted);

    text-align:
        center;
}


/* ============================================================
   FOOTER SPACING
   ============================================================ */

footer {
    margin-top: 0 !important;
}

footer .footerInner {
    padding-top: 10px !important;
    padding-bottom: 10px !important;
}

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

@media (max-width: 980px) {

    .siteShell {
        width:
            min(100% - 30px, 1280px);
    }


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


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

}


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

@media (max-width: 760px) {

    .cookbookHero {
        grid-template-columns: minmax(0, 1fr);
        gap: 0;
    }

    .cookbookHeroEmoji {
        font-size: 54px;
    }

    .cookbookRecipes {
        padding: 0 14px 9px;
    }

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

    .cookbookSectionHeading {
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: center;
        gap: 10px;
    }

    .cookbookSectionHeading h2 {
        flex: 0 0 auto;
    }

    .cookbookSectionHeading::after {
        display: block;
        flex: 1 1 auto;
        min-width: 0;
    }

    .cookbookRecipeHeadingTools {
        flex: 0 1 200px;
        min-width: 110px;
        margin-left: auto;
    }

    #cookbookRecipeSearch {
        width: 100%;
        min-width: 0;
        flex: 1 1 auto;
        margin-left: 0;
    }

    .cookbookTitleRow[data-ornament="diamond"]::before {
        width: 65px;
        height: 65px;
        left: -8px;
    }

    .cookbookTitleRow[data-ornament="starburst"]::before {
        font-size: 95px;
        left: -12px;
    }

    .cookbookTitleRow[data-ornament="swirl"]::before {
        font-size: 90px;
        left: -12px;
    }
}

/* ============================================================
   MOBILE
   ============================================================ */
@media (max-width: 520px) {

    .siteShell {
        width: calc(100% - 20px);
    }

    .compactBrand {
        font-size: 16px;
    }

    .cookbookPage {
        padding-top: 10px;
    }

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

    .cookbookHero::after {
        display: none;
    }

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

    .recipeImage {
        aspect-ratio: 16 / 8.5;
    }

    .recipeTitle {
        font-size: 15px;
    }

    .cookbookActionExplanation {
        width: 100%;
    }
}