/* Recipes page (templates/theme/template-recipes.php, assets/recipes/recipes.js) */

.bog-recipes {
    --rc-green: #1f9d3d;
    --rc-green-deep: #14722b;
    --rc-green-tint: #edf7ee;
    --rc-ink: #1a2620;
    --rc-muted: #5b6760;
    --rc-line: #e0e4de;
    --rc-card-bg: #fff;
    --rc-radius: 10px;
    --rc-shadow: 0 1px 3px rgb(0 0 0 / 0.08), 0 1px 2px rgb(0 0 0 / 0.06);
    --rc-shadow-hover: 0 8px 18px -6px rgb(0 0 0 / 0.18);

    max-width: 1240px;
    margin: 0 auto;
    padding: 1.5rem 0 3rem;
    color: var(--rc-ink);
}

.bog-recipes *,
.bog-recipes *::before,
.bog-recipes *::after {
    box-sizing: border-box;
}

/* The theme's fixed header is offset by #content's top margin, which collapses through #page unless
   #page is its own block formatting context (same fix as the catalog page). */
body.bog-recipes-page #page {
    overflow-x: clip;
    overflow-y: visible;
    display: flow-root;
}

@media (min-width: 960px) {
    body.bog-recipes-page #content > .col-full,
    body.bog-recipes-page #masthead > .col-full {
        max-width: 1400px;
    }
}

.rc-sr {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* The theme pads <section> on small screens; this page lines everything up on its own container. */
.bog-recipes .rc-browse {
    margin: 0;
    padding: 0;
}

/* ---- Heading ---------------------------------------------------------- */

.rc-head {
    margin-bottom: 1.25rem;
}

.bog-recipes .rc-title {
    margin: 0 0 0.4rem;
    color: var(--rc-ink);
}

.rc-intro {
    max-width: 70ch;
    color: var(--rc-muted);
}

.rc-intro > :last-child {
    margin-bottom: 0;
}

/* ---- Buttons and links ------------------------------------------------ */

.bog-recipes .rc-link {
    padding: 0;
    border: 0;
    background: none;
    box-shadow: none;
    color: var(--rc-green-deep);
    font: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
}

.bog-recipes .rc-link:hover,
.bog-recipes .rc-link:focus-visible {
    color: var(--rc-ink);
    background: none;
}

.bog-recipes .rc-btn {
    padding: 0.8rem 1.8rem;
    border: 1px solid var(--rc-green-deep);
    border-radius: 999px;
    background: #fff;
    color: var(--rc-green-deep);
    font: inherit;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
}

.bog-recipes .rc-btn:hover,
.bog-recipes .rc-btn:focus-visible {
    background: var(--rc-green-deep);
    color: #fff;
}

.bog-recipes :focus-visible {
    outline: 2px solid var(--rc-green);
    outline-offset: 2px;
}

/* ---- Featured row ------------------------------------------------------ */

.rc-featured {
    margin-bottom: 2rem;
    padding: 1rem 1rem 1.25rem;
    border-radius: 14px;
    background: var(--rc-green-tint);
}

.rc-featured-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.bog-recipes .rc-featured-head h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--rc-ink);
}

/* ---- Toolbar ----------------------------------------------------------- */

.rc-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin: 0 0 0.9rem;
}

.rc-search {
    position: relative;
    flex: 1 1 18rem;
    min-width: 0;
}

.rc-search-icon {
    position: absolute;
    top: 50%;
    left: 0.9rem;
    transform: translateY(-50%);
    color: var(--rc-muted);
    pointer-events: none;
}

.bog-recipes .rc-search input[type="search"] {
    width: 100%;
    height: 3rem;
    margin: 0;
    padding: 0 1rem 0 2.6rem;
    border: 1px solid #c9d0c8;
    border-radius: 999px;
    background: #fff;
    box-shadow: none;
    color: var(--rc-ink);
    font-size: 1rem;
}

.bog-recipes .rc-search input[type="search"]:focus {
    border-color: var(--rc-green);
    outline: 2px solid rgb(31 157 61 / 0.25);
    outline-offset: 0;
}

.rc-sort select {
    height: 3rem;
    margin: 0;
    padding: 0 2.2rem 0 1rem;
    border: 1px solid #c9d0c8;
    border-radius: 999px;
    background-color: #fff;
    color: var(--rc-ink);
    font-size: 1rem;
}

/* ---- Type chips -------------------------------------------------------- */

.rc-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.75rem;
}

.bog-recipes .rc-chip {
    flex: 0 0 auto;
    margin: 0;
    padding: 0.5rem 1.05rem;
    border: 1px solid var(--rc-line);
    border-radius: 999px;
    background: #fff;
    box-shadow: none;
    color: var(--rc-ink);
    font: inherit;
    font-size: 1.05rem;
    line-height: 1.4;
    white-space: nowrap;
    cursor: pointer;
}

.bog-recipes .rc-chip:hover,
.bog-recipes .rc-chip:focus-visible {
    border-color: var(--rc-green);
    background: #fff;
    color: var(--rc-green-deep);
}

.bog-recipes .rc-chip.is-active {
    border-color: var(--rc-green);
    background: var(--rc-green);
    color: #fff;
}

.rc-chip-count {
    margin-left: 0.15em;
    font-size: 0.85em;
    opacity: 0.65;
}

/* ---- Option checkboxes ------------------------------------------------- */

.rc-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 1.25rem;
    margin-bottom: 0.9rem;
    font-size: 1rem;
}

.bog-recipes .rc-check {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin: 0;
    color: var(--rc-muted);
    font-weight: 400;
    cursor: pointer;
}

.bog-recipes .rc-check input {
    width: 1.15rem;
    height: 1.15rem;
    margin: 0;
    accent-color: var(--rc-green-deep);
}

.rc-status {
    min-height: 1.5em;
    margin: 0 0 0.75rem;
    color: var(--rc-muted);
    font-size: 1rem;
}

/* ---- Grid and cards ---------------------------------------------------- */

.rc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 1rem;
}

.rc-grid[hidden] {
    display: none;
}

.rc-grid-featured {
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.bog-recipes .rc-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--rc-line);
    border-radius: var(--rc-radius);
    background: var(--rc-card-bg);
    box-shadow: var(--rc-shadow);
    color: inherit;
    text-decoration: none;
    transition: box-shadow 0.15s, transform 0.15s, border-color 0.15s;
}

.bog-recipes .rc-card:hover,
.bog-recipes .rc-card:focus-visible {
    border-color: var(--rc-green);
    box-shadow: var(--rc-shadow-hover);
    transform: translateY(-2px);
    color: inherit;
}

.rc-img {
    position: relative;
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--rc-green-tint);
}

.rc-img img {
    display: block;
    width: 100%;
    height: 100%;
    margin: 0;
    object-fit: cover;
}

.rc-ph {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: #8fb89a;
}

.rc-badge {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    padding: 0.2rem 0.65rem;
    border-radius: 999px;
    background: rgb(255 255 255 / 0.94);
    color: var(--rc-green-deep);
    font-size: 0.85rem;
    font-weight: 700;
    line-height: 1.4;
}

.rc-badge-guide {
    background: #f2dc9e;
    color: #5a4410;
}

.rc-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 0.3rem;
    padding: 0.75rem 0.85rem 0.9rem;
}

.rc-card-title {
    color: var(--rc-ink);
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.rc-card-title mark {
    padding: 0 0.1em;
    border-radius: 2px;
    background: #fbe9a6;
    color: inherit;
}

.rc-meta {
    color: var(--rc-green-deep);
    font-size: 0.95rem;
    font-weight: 600;
}

.rc-excerpt {
    display: -webkit-box;
    overflow: hidden;
    color: var(--rc-muted);
    font-size: 1rem;
    line-height: 1.4;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

/* ---- More / empty ------------------------------------------------------ */

.rc-more {
    margin-top: 1.5rem;
    text-align: center;
}

.rc-more[hidden],
.rc-empty[hidden],
.rc-featured[hidden] {
    display: none;
}

.rc-empty {
    padding: 2.5rem 1rem;
    text-align: center;
    color: var(--rc-muted);
}

.rc-empty-title {
    margin-bottom: 0.25rem;
    color: var(--rc-ink);
    font-size: 1.15rem;
    font-weight: 700;
}

.rc-noscript {
    padding: 1rem;
    border-radius: var(--rc-radius);
    background: var(--rc-green-tint);
}

/* ---- Small screens: two compact columns -------------------------------- */

@media (max-width: 599px) {
    .bog-recipes {
        padding-top: 1rem;
    }

    .rc-grid,
    .rc-grid-featured {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.65rem;
    }

    .rc-body {
        padding: 0.6rem 0.65rem 0.7rem;
    }

    .rc-card-title {
        font-size: 1.05rem;
    }

    .rc-excerpt {
        display: none;
    }

    .rc-sort {
        flex: 1 1 100%;
    }

    .rc-sort select {
        width: 100%;
    }

    /* Chips scroll sideways instead of stacking into a tall block. */
    .rc-chips {
        flex-wrap: nowrap;
        margin-right: -1rem;
        padding-right: 1rem;
        padding-bottom: 0.25rem;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .rc-chips::-webkit-scrollbar {
        display: none;
    }

    .rc-featured {
        padding: 0.75rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .bog-recipes .rc-card {
        transition: none;
        transform: none;
    }
}
