
/*
 * File: /css/searchRecipesPage.css
 * Standalone Advanced Search page styling
 */

:root {
    --background: #f7f8fa;
    --surface: #ffffff;
    --text: #20242b;
    --muted: #68717d;
    --border: #dfe3e8;
    --accent: #c62828;
    --accentDark: #a91f1f;
    --radius: 12px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--background);
    color: var(--text);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
}

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

button:disabled {
    opacity: .45;
    cursor: not-allowed;
}

[hidden] {
    display: none !important;
}

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

/* COMPACT HEADER */

.compactHeader {
    background: #181b20;
    color: #fff;
    border-bottom: 1px solid #343941;
}

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

.compactBrand {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #fff;
    text-decoration: none;
    font-size: 19px;
    font-weight: 800;
    white-space: nowrap;
    letter-spacing: -.5px;
}

.compactBrandNoAds {
    color: #ef5350;
}

.compactDivider {
    width: 1px;
    height: 25px;
    background: #444a53;
    flex-shrink: 0;
}

.compactNav {
    display: flex;
    gap: 15px;
    white-space: nowrap;
}

.compactNav a {
    color: #d9dde3;
    text-decoration: none;
    font-size: 13px;
}

.compactNav a:hover {
    color: #fff;
}

.compactSearchTitle {
    color: #e5e7eb;
    font-size: 13px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.compactSpacer {
    flex: 1;
}

.accountButton {
    color: #fff;
    text-decoration: none;
    border: 1px solid #535963;
    border-radius: 8px;
    padding: 8px 11px;
    font-size: 12px;
    white-space: nowrap;
}

/* SEARCH PAGE */

.searchPage {
    padding-top: 16px;
    padding-bottom: 35px;
}

#searchForm {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
}

.searchMainRow {
    display: flex;
    gap: 9px;
}

.searchInputWrap {
    position: relative;
    flex: 1;
    min-width: 0;
}

#searchQuery {
    width: 100%;
    height: 43px;
    border: 1px solid #cbd2da;
    border-radius: 8px;
    padding: 0 13px;
    font-size: 15px;
    outline: none;
}

#searchQuery:focus,
.filterField select:focus,
.ingredientField input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(198, 40, 40, .08);
}

.searchButton,
.clearButton {
    padding: 0 19px;
    border-radius: 8px;
    font-weight: 700;
    white-space: nowrap;
}

.searchButton {
    background: var(--accent);
    color: #fff;
    border: 1px solid var(--accent);
}

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

.clearButton {
    background: #fff;
    border: 1px solid var(--border);
    color: var(--muted);
}

.clearButton:hover {
    background: #f3f4f6;
}

/* SEARCH SUGGESTIONS */

.searchSuggestions {
    position: absolute;
    z-index: 30;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 9px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, .12);
    max-height: 280px;
    overflow-y: auto;
}

.searchSuggestions button {
    display: block;
    width: 100%;
    padding: 11px 13px;
    border: 0;
    background: transparent;
    text-align: left;
    color: var(--text);
}

.searchSuggestions button:hover {
    background: #f3f4f6;
}

/* SEARCH TYPES */

.searchTypeRow {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 17px;
    margin-top: 14px;
    padding-bottom: 13px;
    border-bottom: 1px solid var(--border);
}

.filterLabel {
    color: var(--muted);
    font-weight: 700;
}

.searchTypeRow label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

input[type="checkbox"] {
    accent-color: var(--accent);
}

/* FILTERS */

.searchFilterGrid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
    padding-top: 14px;
}

.filterField,
.ingredientField {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.filterField label,
.ingredientField label {
    font-size: 12px;
    font-weight: 700;
    color: #515b67;
}

.filterField select,
.ingredientField input,
#searchTags {
    width: 100%;
    min-width: 0;
    height: 38px;
    background: #fff;
    border: 1px solid #cbd2da;
    border-radius: 7px;
    padding: 0 10px;
    color: var(--text);
    outline: none;
}

.ingredientFilters {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 13px;
}

.filterFooter {
    margin-top: 12px;
}

#toggleAdvancedFilters {
    border: 0;
    padding: 5px 0;
    background: transparent;
    color: var(--accent);
    font-weight: 700;
}

#advancedFilters {
    margin-top: 12px;
}

#advancedFilters label {
    display: block;
    margin-bottom: 6px;
    font-weight: 700;
    font-size: 12px;
}

/* VERSION */

.version {
    margin-top: 25px;
    text-align: center;
    font-size: 11px;
    color: #9299a3;
}

/* TABLET */

@media (max-width: 1100px) {

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

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

    .compactSearchTitle {
        display: none;
    }

}

/* SMALL TABLET */

@media (max-width: 800px) {

    .compactHeaderInner {
        flex-wrap: wrap;
        gap: 8px 12px;
        padding-top: 9px;
        padding-bottom: 9px;
    }

    .compactBrand {
        font-size: 17px;
    }

    .compactNav {
        gap: 12px;
    }

    .compactDivider {
        display: none;
    }

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

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

}

/* MOBILE */

@media (max-width: 550px) {

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

    .compactHeaderInner {
        min-height: 0;
    }

    .compactBrand {
        font-size: 16px;
    }

    .compactNav {
        width: 100%;
        order: 3;
        padding-top: 3px;
    }

    .compactNav a {
        font-size: 12px;
    }

    .accountButton {
        margin-left: auto;
        padding: 6px 8px;
        font-size: 11px;
    }

    .compactSpacer {
        display: none;
    }

    .searchPage {
        padding-top: 10px;
    }

    #searchForm {
        padding: 11px;
    }

    .searchMainRow {
        flex-wrap: wrap;
        gap: 7px;
    }

    .searchInputWrap {
        flex-basis: 100%;
    }

    #searchQuery {
        height: 42px;
        font-size: 14px;
    }

    .searchButton,
    .clearButton {
        flex: 1;
        height: 37px;
        padding: 0 10px;
    }

    .searchTypeRow {
        margin-top: 12px;
        gap: 12px;
    }

    .searchFilterGrid {
        gap: 9px;
        padding-top: 11px;
    }

    .filterField select {
        font-size: 12px;
    }

    .ingredientFilters {
        grid-template-columns: 1fr;
        gap: 9px;
    }

    .resultsSummary h1 {
        font-size: 18px;
    }

    .resultsViewOptions button {
        padding: 7px 10px;
        font-size: 12px;
    }

    .resultsContainer.view-grid {
        gap: 9px;
    }

    .resultContent {
        padding: 10px;
    }

    .resultTitle {
        font-size: 14px;
    }

    .resultDescription {
        font-size: 12px;
    }

    .resultsContainer.view-rows .resultImage,
    .resultsContainer.view-rows .resultImagePlaceholder {
        width: 105px;
        min-width: 105px;
    }

    .resultsContainer.view-rows .resultContent {
        padding: 10px;
    }

    .resultsContainer.view-rows .resultTitle {
        font-size: 14px;
    }

    .resultsContainer.view-rows .resultDescription {
        font-size: 12px;
    }

}

/* ============================================================
   MY RECIPES WITHOUT ADS — SEARCH THEME
   Warm site-wide colors, matching header and recipe cards
   ============================================================ */

/* SITE PALETTE */

:root {
    --background: #e5d9c7;
    --surface: #fffdf8;
    --text: #292722;
    --muted: #716d64;
    --border: rgba(48, 42, 32, .16);
    --accent: #c92f2f;
    --accentDark: #982323;
    --radius: 16px;

    --searchGold: #d6a94d;
    --searchBrown: #39291f;
    --searchCream: #fffaf1;
    --searchShadow: 0 5px 20px rgba(50, 40, 30, .07);
}

body {
    background: var(--background);
    color: var(--text);
}

/* Override the search workspace's inline color variables. */

.bwSearchPage {
    --searchBorder: rgba(48, 42, 32, .17) !important;
    --searchMuted: #716d64 !important;
    --searchPanel: #fffdf8 !important;
    --searchSoft: #f4ecdf !important;
    --searchAccent: #c92f2f !important;

    max-width: 1500px;
}

/* ============================================================
   HEADER — SAME TWO-ROW VISUAL LANGUAGE AS THE MAIN SITE
   ============================================================ */

.compactHeader {
    background:
        linear-gradient(
            to bottom,
            #29221e 0,
            #392522 calc(100% - 40px),
            #fffaf1 calc(100% - 40px),
            #fffaf1 100%
        );
    color: #fff;
    border-bottom: 1px solid rgba(48, 42, 32, .15);
}

.compactHeaderInner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto 40px;
    align-items: center;
    gap: 0 16px;
    min-height: 0;
}

.compactBrand {
    grid-column: 1;
    grid-row: 1;

    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 5px;

    padding: 13px 0 15px;

    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(25px, 3vw, 39px);
    font-weight: 900;
    letter-spacing: -.035em;
    line-height: 1.1;
}

.compactBrandMain {
    color: #fff;
}

.compactBrandNoAds {
    color: #ed4848;
}

.accountButton {
    grid-column: 2;
    grid-row: 1;

    padding: 9px 16px;
    border: 0;
    border-radius: 999px;

    background: #fff;
    color: #292722;

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

.accountButton:hover {
    background: #f5e7d0;
}

.compactNav {
    grid-column: 1 / -1;
    grid-row: 2;

    display: flex;
    align-items: center;
    gap: 3px;

    height: 40px;
    min-width: 0;

    background: #fffaf1;
    box-shadow: 0 0 0 100vmax #fffaf1;
    clip-path: inset(0 -100vmax);

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

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

.compactNav a {
    display: inline-flex;
    align-items: center;

    min-height: 32px;
    padding: 7px 13px;

    border-radius: 8px;

    color: #292722;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
}

.compactNav a:hover {
    background: rgba(201, 47, 47, .09);
    color: #c92f2f;
}

.compactDivider,
.compactSearchTitle,
.compactSpacer {
    display: none;
}

/* ============================================================
   MAIN SEARCH WORKSPACE
   ============================================================ */

.bwSearchPage {
    padding-top: 20px;
}

.bwSearchIntro {
    margin-bottom: 17px;
}

.bwSearchIntro h1 {
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(29px, 3vw, 43px);
    font-weight: 900;
    letter-spacing: -.025em;
    color: #292722;
}

.bwSearchIntro p {
    color: #716d64;
    font-size: 14px;
}

#searchForm {
    background: transparent;
    border: 0;
    padding: 0;
}

/* Main search input */

.bwSearchMainBar #searchQuery {
    border: 1px solid rgba(48, 42, 32, .2);
    border-radius: 11px;
    background: #fffdf8;

    box-shadow: var(--searchShadow);
}

.bwSearchMainBar #searchQuery:focus,
.bwField input:focus,
.bwField select:focus {
    outline: none;
    border-color: #c92f2f;
    box-shadow: 0 0 0 3px rgba(201, 47, 47, .1);
}

.bwSearchMainBar .searchButton {
    background: #c92f2f;
    color: white;
    font-weight: 800;
}

.bwSearchMainBar .searchButton:hover {
    background: #982323;
}

.bwSearchMainBar .clearButton {
    background: #fffaf1;
    color: #39291f;
    font-weight: 700;
}

.bwSearchMainBar .clearButton:hover {
    background: #f0e2cf;
}

/* ============================================================
   ADVANCED SEARCH AND FILTER SIDEBAR
   ============================================================ */

.bwAdvancedArea,
.bwSearchSidebar,
.bwResultsToolbar {
    border: 1px solid rgba(48, 42, 32, .16);
    border-radius: 15px;
    background: #fffdf8;
    box-shadow: var(--searchShadow);
}

.bwAdvancedToggle {
    background: #f4ecdf;
    color: #982323;
}

.bwAdvancedToggle:hover {
    background: #eee0cb;
}

.bwAdvancedHeading {
    color: #982323;
}

.bwSearchSidebarHeader {
    background: #f4ecdf;
    border-bottom-color: rgba(48, 42, 32, .15);
}

.bwSearchSidebarHeader h2 {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 21px;
    color: #39291f;
}

.bwFilterSection {
    border-bottom-color: rgba(48, 42, 32, .12);
}

.bwFilterSection > summary {
    color: #39291f;
}

.bwFilterSection > summary:hover {
    background: #faf4e9;
}

.bwFilterSection[open] > summary {
    color: #982323;
}

.bwField > label,
.bwFilterSubheading {
    color: #554335;
}

.bwField input,
.bwField select,
.bwResultSettings select {
    background: #fffdf8;
    border-color: rgba(48, 42, 32, .2);
    color: #292722;
}

.bwSearchPage input[type="checkbox"] {
    accent-color: #c92f2f;
}

/* ============================================================
   NOTICES, PAGINATION AND MODAL
   ============================================================ */

.bwSearchNotice {
    background: #f4ecdf;
    color: #655344;
}

.bwSearchPagination button {
    background: #fffdf8;
    border-color: rgba(48, 42, 32, .2);
    color: #39291f;
    font-weight: 700;
}

.bwSearchPagination button:not(:disabled):hover {
    background: #c92f2f;
    border-color: #c92f2f;
    color: white;
}

.bwSearchModalPanel {
    background: #fffdf8;
    border: 1px solid #dcc8ab;
    border-radius: 17px;
}

.bwSearchModalHeader h2 {
    font-family: Georgia, "Times New Roman", serif;
    color: #39291f;
}

.bwSearchModalActions .bwPrimaryButton {
    background: #c92f2f;
    border-color: #c92f2f;
    color: white;
}

/* ============================================================
   MOBILE HEADER
   ============================================================ */

@media (max-width: 800px) {

    .compactHeaderInner {
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-rows: auto 40px;
        gap: 0 8px;
        padding-top: 0;
        padding-bottom: 0;
    }

    .compactBrand {
        font-size: clamp(19px, 4vw, 29px);
        padding: 13px 0;
    }

    .compactNav {
        grid-column: 1 / -1;
        grid-row: 2;
        width: 100%;
        padding: 0;
        gap: 2px;
    }

    .accountButton {
        grid-column: 2;
        grid-row: 1;
        margin-left: 0;
        padding: 7px 11px;
    }
}

@media (max-width: 550px) {

    .compactBrand {
        font-size: clamp(18px, 4.8vw, 25px);
        gap: 4px;
    }

    .compactNav a {
        padding: 7px 11px;
        font-size: 12px;
    }

    .bwSearchPage {
        padding: 13px 11px 30px;
    }

    .bwSearchIntro h1 {
        font-size: 29px;
    }

    .bwSearchWorkspace {
        gap: 12px;
    }

    .resultsContainer.view-grid {
        gap: 10px;
    }

    .resultCard {
        border-radius: 12px;
    }
}