/*****************
***** GLOBAL *****
******************/


:root {
    --primary-orange: #ee4d20;
    --primary-black: #131313;
    --secondary-light-grey: #dad8d8;
    --secondary-mid-grey: #ccc;
    --black: black;
    --white: white;
    --primary-grey: #555;
    --primary-grey-hover: #252424;
    --green: #4CAF50;
    --green-hover:#247d27;
    --red: #f44336;
    --dark-red: #f44336;
    --logo-font: "Limelight", sans-serif;

    /* New Design Colors */
    --color-green: #1a3a2a;
    --color-green-mid: #2c5a40;
    --color-green-light: #3d7a57;
    --color-cream: #f5f0e8;
    --color-cream-dark: #ede6d6;
    --color-rose: #c8455a;
    --color-rose-light: #e8687a;
    --color-gold: #d4a843;
    --color-text-dark: #1a2620;
    --color-text-mid: #4a6258;
    --color-text-light: #8aaa98;
    --color-border: rgba(26,58,42,0.1);
    --color-lavendar: #ede8f7;
    --color-lavendar-dark: #6b5aad;

    /* Shorthand aliases for add-side-dishes page */
    --green: #1a3a2a;
    --green-mid: #2c5a40;
    --green-light: #3d7a57;
    --bg: #eaf4ed;
    --cream: #f5f0e8;
    --cream-dark: #ede6d6;
    --rose: #c8455a;
    --rose-light: #e8687a;
    --gold: #d4a843;
    --text-dark: #1a2620;
    --text-mid: #4a6258;
    --text-light: #8aaa98;
    --border: rgba(26,58,42,0.1);

    /* --primary-background: #ccebd0; */
    --primary-background: #e6f7e8;
    /* --primary-green: #59e36c; */
    --primary-green: #4CAF50;
    --primary-mid-green-hover: #358c41;
    /* --primary-green-hover: #1a421f; */
    /* --primary-header: #1a421f; */
    --primary-green-hover: #102b13;
    --primary-header: #102b13;
    --primary-pink: #dc536a;
    --primary-pink-hover:#bb384e;
    --primary-text-font: "Open Sans", sans-serif;
}

body {
    font-family: var(--primary-text-font);
    font-weight: 400;
    text-align: center;
    align-content: center;
    color: var(--black);
    /* background: linear-gradient(to bottom, rgba(255, 255, 255, 0) -960%, white 100%), url(/static/images/home_background.jpg) no-repeat center top; */
    background-size: 100% auto;
}


body {
    /* background-color: var(--primary-green-hover); */
    /* background-color: var(--color-cream); */
    background-color: #e6f7e8;
    /* color: white; */
    color: var(--primary-black)
}

.home-section.meal-plans-section,
.home-section.meals-section {
    /* background-color: var(--secondary-mid-grey); */
    background-color: var(--primary-green);
}

.home-container h3 {
    /* color: var(--primary-green-hover); */
    color: var(--white)
}

.preview-list li {
    background-color: var(--white);
}

.meals-section .preview-list li {
    /* border: 2px solid var(--primary-green-hover) */
}

.meals-section .preview-list li:hover,
.preview-list li:hover {
    /* border: 4px solid var(--primary-green-hover) */
}

.preview-dot {
    background-color: var(--primary-green)
}

/* .ingredients-section a {
    background-color: var(--primary-black);
    color: white;
}

.ingredients-section a:hover {
    background-color: var(--primary-grey);
} */


.content-cont {
    width: 80%;
    margin: auto;
    position: relative;
}

/* Ensure .page overrides width for redesigned pages */
/* .content-cont > .page {
    width: 100% !important;
    margin: 0 auto !important;
    padding: 36px 28px 100px !important;
} */

body:has(.main) .content-cont {
    width: 100%;
    margin: 0;
}


html, body {
    height: 100%;
    width: 100%;
    margin: 0;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

.content-cont {
    flex: 1;
    text-align: left;
    margin-bottom: 100px;
    margin-top: 100px;
}

@media (max-width: 500px) {
    .content-cont {
        width: 90%;
        margin-top: 70px !important;
    }
}

header {
    text-align: center;
}

h1 {
    text-align: center;
}


a {
    text-decoration: none;
    color: var(--primary-green)
}

ul {
    padding-left: 0px;
}

li {
    list-style: none;
    padding-left: 0;
}

input::placeholder,
textarea::placeholder,
select {
    font-style: normal;
    font-size: .8em;
    font-family: var(--primary-text-font)
}

select {
    line-height: 1.2;               /* ensures vertical space */
    padding: 0.5em 1em;             /* control internal spacing */
    min-height: 40px;               /* at least 40px, but grow if padding/font need it so text isn't cut off */
    box-sizing: border-box;         /* ensures padding fits inside */ 
}

@media (max-width: 768px) {
    input::placeholder,
    textarea::placeholder,
    select,
    input,
    textarea {
        font-size: 16px;            /* smaller font size for mobile */
        line-height: 1.2;           /* maintain vertical space */
        padding: 0.5em 0.75em;      /* adjust padding for smaller screens */
    }
}

footer {
    height: 75px;
    padding-top: 25px;
    padding-bottom: 25px;
    background: var(--secondary-mid-grey);
    margin-top: 100px;
}

button {
    font-family: var(--primary-text-font);
}

/*****************
***** HEADER *****
******************/


.site-title {
    font-family: var(--primary-text-font);
    font-size: 1.5em;
    background-color: transparent;
    margin-top: 0;
    margin-bottom: 0;
    padding-top: 0;
    padding-bottom: 0;
    color: var(--white);
    position: relative;
}

.site-title h1 {
    margin-bottom: 0;
    margin-top: 0;
}

.site-title img {
    max-height: 0;
    display: none;
}

.site-title h4 {
    margin-top: 0;
    font-size: .8em;
    margin-bottom: 0px;
    font-weight: 300;
    display: none;
}

.site-title:has(~ .content-cont > p) {
    margin-bottom: 0;
}




/***************
***** MENU *****
****************/


.menu-bar {
    display: none;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 3rem;
    margin-bottom: 20px;
    /* background: linear-gradient(to bottom, #ff272e, #ee4d20); */
    /* background: var(--primary-black); */
    background: var(--primary-header);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.subhead {
    display: none;
    color: var(--white);
    font-size: 1rem;
}

.menu-items {
    display: none;
    align-items: center;
}

.menu-items a {
    margin-left: 1rem;
    text-decoration: none;
    color: var(--white);
}

.menu-items a:first-child {
    margin-left: 0;
}

.menu-items a:hover {
    text-decoration: underline;
}


/* .btn-back {
    color: white !important;
    background: var(--primary-green-hover);
    padding: 10px 20px !important;
    border-radius: 5px;
} */

.btn-desktop {
    display: inline-block;
    transition: .3s ease;
    font-size: .7em !important;
}

.btn-desktop:hover {
    background: var(--primary-grey-hover);
}

.btn-mobile {
    display: none;
    padding: 2px 5px !important;
}

.side-dish-subhead {
    color: var(--secondary-mid-grey)
}

@media (max-width: 768px) {
    .menu-bar {
        flex-direction: column;
        margin-bottom: 15px;
        padding: .75rem;
    }

    .subhead {
        display: none;
    }

    .menu-items {
        font-size: 0.8em;
        align-items: center;
    }

    .btn-desktop {
        display: none;
    }

    .btn-mobile {
        display: block;
    }

    .btn-back {
        background-color: var(--primary-green)
    }

}


/*****************
***** FORMS ******
******************/

form div {
    /* margin: 30px 0; */
}

input {
    width: 275px;
    height: 40px;
    padding: 5px 10px;
    border-radius: 5px;
    border: 1px solid var(--primary-black);
    box-sizing: border-box;
}

input:focus {
    outline: none;
    border: 2px solid var(--primary-green);
}

/* button {
    padding: 10px 20px;
    border-radius: 5px;
    border: none;
    background-color: var(--primary-grey);
    color: var(--white);
    transition: .3s ease;
} */

/* button:hover {
    background-color: var(--primary-green-hover);
    color: var(--primary-green-hover);
    cursor: pointer;
} */


/*****************
***** LOGIN ******
******************/


.login-subtitle span {
    font-size: 1.3em;
    color: var(--primary-green);
}


.new-user-link {
    margin: 35px 0px;
}

.new-user-link a {
    color: var(--primary-pink);
    font-weight: 700;
    background: var(--secondary-light-grey);
    padding: 10px 20px;
    border-radius: 5px;
    transition: background-color .2s ease, color .3s ease;
}

.new-user-link a:hover {
    background: var(--primary-pink-hover);
    color: var(--white);
}

.login-remember-me {
    margin: 20px 0px;
}

.login-remember-me input {
    margin: 10px 10px;
    width: 16px;
    height: 16px;
}

.login-remember-me input,
.login-remember-me label {
    vertical-align: middle
}

.login-submit {
    margin-bottom: 10px;
}

.login-submit button {
    background: var(--primary-pink);
    transition: .3s ease;
}

.login-submit button:hover {
    background: var(--primary-pink-hover);
}   

.forgot-password-link {
    margin-top: 0;

}

.forgot-password-link a {
    font-size: 0.8em;
    font-weight: 300;
    color: var(--primary-green);
    font-style: italic;
    margin-top: 0;
}


/**********************
***** RESET PASS ******
**********************/

.password-wrapper {
    position: relative;
    max-width: 400px;
    width: 275px;
    margin: auto;
    margin-bottom: 50px;
}

.password-wrapper input {
    width: 100%;
    padding-right: 40px;
    box-sizing: border-box;
    padding: 0px 40px 0px 10px;
    height: 40px;
}

.toggle-password {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
}

.toggle-password:hover {
    background-color: var(--white);
}

.toggle-password svg {
    height: 20px;
    width: 20px;
    fill: var(--primary-grey);
}

.content-cont:has(> h2.reset-header) {
    text-align: center
}

/****************
***** HOME ******
****************/

.side-by-side-sections {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 30px;
    text-align: left;
}


.side-by-side-sections .home-section {
    flex: 1 1 42%;
    padding: 25px;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
}

.home-section.meals-section {
    background-color: var(--primary-green-hover);

}

.home-section.meal-plans-section {
    background-color: var(--primary-pink-hover);
}

.side-by-side-sections .section-header {
    display: flex;
    justify-content: space-between;
}

.home-section h3 {
    color: white;
}

.section-header div {
    margin: 1em;
    /* background: var(--white); */
    border-radius: 5px;
    padding: 8px 10px;
    /* font-size: .9em; */
    transition: background-color 0.2s ease, color 0.3s ease;
}

.section-header div:hover {
    /* background-color: var(--primary-black); */
}

.section-header div:hover a {
    color: var(--white)
}

.preview-list {
    padding: 0;
    margin: 0;
    flex-grow: 1;
}

.preview-list li {
    margin: 10px 0;
    margin-left: 0;
    text-align: left;
    background: var(--white);
    border-radius: 5px;
    transition: border 0.3s ease;
    display: flex;
    align-items: center;
    border: 2px solid transparent;
    box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.4);
}

.preview-list li a {
    color: var(--primary-black);
    transition: color 0.1s ease;
    width: 100%;
    padding: 10px 15px;
    display: flex;
    align-items: center;
}

.meals-section .preview-list li:hover {
    /* border: 2px solid var(--primary-green); */
    border: 2px solid rgba(16, 43, 19, .7);
    box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.4);
}

.meal-plans-section .preview-list li:hover {
    border: 2px solid var(--primary-pink);
    box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.4);
}

/* .meal-plans-section .preview-list li.no-meals-home:hover {
    border: none;
} */

.preview-list p {
    margin: 0px;
}

.see-all-link {
    margin-top: 25px;
    display: flex;
    justify-content: space-between;
}

.see-all-link a {
    color: var(--primary-green-hover);
    padding: 5px 10px;
    background: var(--white);
    border-radius: 5px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.see-all-link a:hover {
    background-color: var(--primary-black);
    color: var(--white);
}

.preview-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    background-color: var(--primary-green);
    border-radius: 50%;
    margin-right: 20px;
    vertical-align: middle;
}

.preview-list .preview-dot {
    background-color: var(--primary-pink)
}

.ingredients-section {
    margin-top: 20px;
    display: flex;
    gap: 100px;
    justify-content: center;
    background: var(--primary-green-hover);
    padding-top: 20px;
    padding-bottom: 20px;
    border-radius: 10px;
}

.ingredients-section a {
    color: var(--primary-green-hover);
    padding: 15px 25px;
    background-color: var(--white);
    border-radius: 5px;
    transition: background-color 0.3s ease, color 0.3s ease;
    font-weight: 600;
}

.ingredients-section a:hover {
    background-color: var(--primary-green);
    color: var(--white);
}

@media (max-width: 768px) {

    .side-by-side-sections {
        gap: 40px;
    }

    .side-by-side-sections .home-section {
        flex: 1 1 100%;
    }

    .home-section.meals-section {
        background-color: var(--primary-green-hover);
        order: 2;
    }

    .home-section.meal-plans-section {
        background-color: var(--primary-pink-hover);
        order: 1;
    }

    .ingredients-section {
        flex-direction: column;
        align-items: center;
        gap: 20px;
        background: none;
    }

    .ingredients-section a {
        margin: auto;
        width: 200px;
        text-align: center;
        background-color: var(--primary-green);
        transition: all .3 ease;
        color: var(--white);
        font-weight: 600;
    }

    .ingredients-section a:hover {
        background-color: var(--primary-grey-hover);
    }
}


/*****************
***** MEALS ******
*****************/


.meals-page,
.meal-plans-page,
.home-container {
    max-width: 1000px;
    margin: auto;
}


/* Filter container styling */
.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 15px;
    align-items: center;
    justify-content: space-between;
}



/* Search input */
/* #mealSearch {
    font-size: 1rem;
    border: 1px solid var(--secondary-mid-grey);
    border-radius: 6px;
    width: 250px;
    transition: border-color 0.2s ease;
    flex-grow: 1;
    height: 44px;
} */


/* @media (max-width: 786px) {
    #mealSearch {
        width: 100%;
        padding-left: 0px;
    }
} */


#mealSearch:focus {
    border-color: #007bff;
    outline: none;
}

#mealSearch::placeholder {
    font-size: 1em;
    color: var(--primary-black)
}

/* Cuisine dropdown */
/* #cuisineFilter {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--secondary-mid-grey);
    border-radius: 6px;
    background-color: var(--white);
    transition: border-color 0.2s ease;
    width: auto;
} */

#cuisineFilter:focus {
    border-color: #007bff;
    outline: none;
}


.meal-box,
.ingredient-box {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 1rem;
    border: 1px solid var(--secondary-mid-grey);
    border-radius: 8px;
    /* margin-bottom: 1rem; */
    background-color: var(--secondary-light-grey);
}

.meal-info,
.ingredient-info {
    flex: 1;
    margin-left: 10px;
}

.meal-info h3,
.ingredient-info h3 {
    margin-bottom: 0.3rem;
    margin-top: 0.3rem;
    text-align: left;
    color: var(--primary-green-hover)
}

.meal-meta,
.meal-extras {
    display: flex;
    gap: 1.5rem;
    font-size: 0.9rem;
    color: var(--primary-grey);
    margin-top: 0.3rem;
}

.meal-extras {
    flex-direction: column;
    width: 85%;
    gap: .3em;
    text-align: left;
    font-size: 0.8em;
}

.meal-extras .notes {
    font-style: italic;
}

.meal-extras .notes-label {
    font-style: normal;
    font-weight: 700;
    font-size: 1em;

}

.meal-extras a {
    color: var(--primary-green);
    text-decoration: none;
}

.meal-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-left: 1rem;
}

.ingredient-actions {
    display: flex;
    gap: 1rem;
    margin-left: 1rem;
}

.meal-plan-container {
    position: relative;
}

.meal-actions a,
.ingredient-actions a,
.meal-plan-container a {
    padding: 9px 20px;
    border: none;
    border-radius: 5px;
    text-decoration: none;
    color: var(--white);
    font-size: 0.9rem;
    text-align: center;
}

.meal-plan-container .actions {
    text-align: center;
}

.meal-plan-container .actions:has(.btn-desktop),
.edit-meal-plan-container .actions:has(.btn-desktop) {
    text-align: left !important;
    justify-content: flex-start;
}

.meal-plan-container .actions button {
    margin-top: 0px;
}

.edit-btn,
.edit-ingred-btn {
    background-color: var(--green);
    transition: .3s ease;
}

.edit-btn:hover,
.edit-ingred-btn:hover {
    background-color: var(--green-hover);
}

@media (max-width: 786px) {
    .meals-page .delete-btn {
        height: 33px;
        width: 61px;
        font-size: .8em;
    }
    
    .edit-ingred-btn {
        font-weight: 600;;
    }
    
}


.delete-btn,
.delete-ingred-btn {
    background-color: var(--primary-grey);
    font-size: 0.9rem;
    border: none;
    transition: .3s ease;
}

.delete-btn:hover,
.delete-ingred-btn {
    background-color: var(--primary-grey-hover);
}

.add-meal-btn,
.reset-filters-btn,
.bulk-meal-btn,
.add-ingred-btn {
    padding: 10px 20px;
    color: white;
    border-radius: 5px;
    font-size: .8em;
    transition: all .3s ease;
}

.add-meal-btn {
    background-color: var(--primary-pink);
}

.add-meal-btn:hover {
    background-color: var(--primary-pink-hover);
}

.add-ingred-btn {
    background-color: var(--primary-green);
}
.add-ingred-btn:hover {
    background-color: var(--primary-green-hover);
}
.reset-filters-btn {
    background-color: var(--primary-pink);
}
.reset-filters-btn:hover {
    background-color: var(--primary-pink-hover);
}
.bulk-meal-btn {
    background-color: var(--primary-green-hover);
}
.bulk-meal-btn:hover {
    background-color: var(--primary-mid-green-hover);
}

.edit-tags-btn {
    background-color: var(--primary-black);
}

.edit-tags-btn:hover {
    background-color: var(--primary-grey);
}

/* ════════════════════════════════════════════════════════════════ */
/* BULK ADD MEALS PAGE - REDESIGN STYLES */
/* ════════════════════════════════════════════════════════════════ */

.bulk-add-page {
    /* margin-top: 73px; */
    padding: 36px 28px 100px;
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
}

.bulk-add-page .page-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 20px;
    animation: fadeDown 0.4s ease both;
}

.bulk-add-page .page-eyebrow {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-light);
    margin-bottom: 8px;
}

.bulk-add-page .page-title {
    font-family: 'Outfit', sans-serif;
    font-size: 32px;
    font-weight: 500;
    color: var(--green);
    letter-spacing: -0.5px;
}

.page-info {
    margin-bottom: 28px;
    animation: slideUp 0.4s ease 0.05s both;
}

.info-primary {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 4px;
    margin-top: 0;
}

.info-secondary {
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 0;
    margin-top: 0;
}

.form-card {
    background: white;
    border-radius: 20px;
    padding: 28px;
    box-shadow: 0 2px 8px rgba(26, 58, 42, 0.06), 0 4px 16px rgba(26, 58, 42, 0.04);
    margin-bottom: 20px;
    animation: slideUp 0.4s ease 0.1s both;
}

.form-field {
    margin-bottom: 24px;
}

.form-field:last-child {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-light);
    margin-bottom: 10px;
}

.form-label-hint {
    font-size: 10px;
    font-weight: 400;
    color: var(--text-light);
    margin-left: 6px;
}

.form-input {
    width: 100%;
    padding: 13px 16px;
    border: 1.5px solid rgba(26, 58, 42, 0.12);
    border-radius: 12px;
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-dark);
    background: white;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.form-input:focus {
    border-color: var(--green-light);
    box-shadow: 0 0 0 3px rgba(61, 122, 87, 0.1);
}

.form-input::placeholder {
    color: var(--text-light);
}

.form-select {
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid rgba(26, 58, 42, 0.12);
    border-radius: 12px;
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-dark);
    background: white;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238aaa98' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}

.form-select:focus {
    border-color: var(--green-light);
    box-shadow: 0 0 0 3px rgba(61, 122, 87, 0.1);
}

.form-select::-ms-expand {
    display: none;
}

.form-divider {
    height: 1px;
    background: rgba(26, 58, 42, 0.1);
    margin: 28px 0;
}

.bulk-add-selects {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

@media (max-width: 640px) {
    .bulk-add-selects {
        grid-template-columns: 1fr;
    }
}

.meal-entry-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(26, 58, 42, 0.1);
}

.meal-entry-title {
    font-family: 'Outfit', sans-serif;
    font-size: 16px;
    font-weight: 500;
    color: var(--green);
    margin: 0;
}

.btn-remove-meal {
    background: none;
    border: none;
    font-size: 16px;
    color: var(--text-light);
    cursor: pointer;
    padding: 6px 10px;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-remove-meal:hover {
    color: var(--rose);
    background: none;
}

.bulk-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid rgba(26, 58, 42, 0.1);
}

.bulk-add-page .btn {
    padding: 13px 24px;
    border: none;
    border-radius: 12px;
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.18s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    letter-spacing: 0.2px;
    width: 100%;
}

.bulk-add-page .btn-primary {
    background: var(--green);
    color: var(--cream);
    box-shadow: 0 4px 14px rgba(26, 58, 42, 0.2);
}

.bulk-add-page .btn-primary:hover {
    background: var(--green-mid);
    box-shadow: 0 6px 20px rgba(26, 58, 42, 0.3);
    transform: translateY(-1px);
}

.bulk-add-page .btn-secondary {
    background: white;
    color: var(--text-mid);
    border: 1.5px solid rgba(26, 58, 42, 0.12);
}

.bulk-add-page .btn-secondary:hover {
    background: var(--cream-dark);
    color: var(--text-dark);
    border-color: rgba(26, 58, 42, 0.2);
}

.bulk-add-page .btn-primary {
    margin-top: 12px;
    margin-bottom: 0;
    padding: 14px 24px;
    font-size: 15px;
    font-weight: 600;
}

@media (max-width: 640px) {
    .bulk-add-page {
        padding: 24px 16px 100px;
    }

    .page-title {
        font-size: 24px;
    }

    .form-card {
        padding: 20px;
    }

    .bulk-add-selects {
        grid-template-columns: 1fr;
    }
}

.bulk-add-selects {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.meals-page .filters-row {
    display: flex;
    flex-wrap: wrap;
    /* gap: 10px; */
    margin-bottom: 10px;
    justify-content: space-between;
}

.meals-page .filters-row-1 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* width: 100%; */
    /* margin-bottom: 20px; */
    gap: 5px;
    flex-grow: 1;
}

.meals-page .filters-row-drops {
    display: flex;
    justify-content: space-between;
    /* margin: auto; */
}

.meals-page .filters-row select {
    width: auto;
    margin-right: 5px;
}

.buttons-row {
    justify-content: center;
    display: flex; 
    margin-bottom: 50px;
    margin-top: 20px;
}

.meal-button-links {
    flex-grow: 1;
    display: flex;
    gap: 20px;
}

.meal-filter-links {
    display: flex;
    gap: 5px;
}



@media (max-width: 786px) {
    .meal-plans-page .meal-meta,
    .meals-page .meal-meta,
    .edit-meal-plan-container .meal-meta {
        flex-direction: column;
        gap: 0;
        text-align: left;
        font-size: .8em;
    }

    .meals-plans-page .filters {
        flex-wrap: none;
        flex-direction: column;
    }

    .meal-plans-page h3, 
    .meals-page h3 {
        font-size: 1.2em;
    }

    .buttons-row {
        gap: 5px !important;
    }

    .bulk-actions {
        display: flex;
        gap: 10px;
        justify-content: center;
    }

    .bulk-actions button {
        margin: 0;
        font-size: .8em;
    }

    .meal-button-links {
        gap: 5px;
        justify-content: space-evenly;
        flex-grow: 0;
    }


    .meals-page .filters-row {
        gap: 10px;
    }

    .meals-page .filters-row-drops {
        margin: auto;
    }
}

/***************************
***** View/Edit MEALS ******
***************************/

.form-group {
    width: 100%;
    max-width: 400px;
    margin: auto;
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: bold;
    margin-bottom: 0.5rem;
    text-align: left;
    padding-left: 15px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.5rem;
    border-radius: 6px;
    border: 1px solid var(--secondary-mid-grey);
    font-size: 1rem;
    font-family: var(--primary-text-font);
}

textarea {
    resize: vertical;
}

.website-link span {
    font-size: 0.8em;
    font-weight: 300;
} 

/* General form styling */
.form-group {
    margin-bottom: 1.5rem;
}

.meal-detail-container:has(#bulk-meal-form),
.meal-detail-container:has(.meal-form) {
    text-align: center;
}

.meal-detail-container:has(#bulk-meal-form) .actions,
.meal-detail-container:has(.meal-form) .actions {
    text-align: left;
}


.meal-detail-container label {
    font-weight: bold;
    margin-bottom: 0.5rem;
    display: block;
}

.meal-detail-container input, select, textarea {
    width: 100%;
    /* padding: 0.75rem; */
    border: 1px solid var(--secondary-mid-grey);
    border-radius: 5px;
    background-color: var(--white);
    box-sizing: border-box; /* Ensure padding and border don't affect total width */
}

.meal-detail-container input:focus, 
.meal-detail-container select:focus,
.meal-detail-container textarea:focus {
    border-color: var(--primary-green);
    outline: none; 
}

  /* Dropdown (select) styling */
.meal-detail-container select {
    -webkit-appearance: none; /* Remove default dropdown arrow */
    -moz-appearance: none;
    appearance: none;
    cursor: pointer;
    padding-right: 30px; /* Space for custom dropdown icon */
    color: grey;
}

  /* Custom arrow for select */
.meal-detail-container select::-ms-expand {
    display: none;
}

.meal-detail-container select:focus {
    border-color: var(--primary-green);
}

.meal-detail-container .select-wrapper {
    position: relative;
}

  /* For multi-select (categories) styling */
.meal-detail-container select[multiple] {
    height: 100px; /* Allow resizing based on the number of selected items */
    padding-right: 30px; /* Space for custom dropdown icon */
    padding-left: 10px; /* Slight padding for better alignment */
    border-radius: 5px;
}

.meal-detail-container select[multiple] option {
    padding: 5px 10px; /* Reduced padding for each option */
}

  /* Custom select dropdown arrow */
.meal-detail-container .select-wrapper::after {
    content: '▼';
    font-size: 1.2rem;
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    pointer-events: none; 
}

  /* Option styling */
.meal-detail-container select option {
    padding: 10px;
}

/* Optional: Apply styling for focused and hovered states */
.meal-detail-container select:focus, select:hover {
    border-color: var(--primary-green);
}

.meal-detail-container option:checked {
    background-color: var(--primary-green);
    color: var(--white);
}

/* Main container for form and ingredients */
.meal-content {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-top: 30px;
}

/* Left column: Meal Form */
.meal-form {
    flex: 1;
    max-width: 60%; /* Ensures the form takes up 60% of the space */
}

.meal-actions {
    display: grid;
    gap: 10px;
    margin: auto;
    grid-template-columns: 1fr 1fr;
    text-align: center;
    max-width: 400px;
}

.meal-actions button {
    margin: auto;
}

.btn-edit {
    background-color: var(--primary-green);
    transition: .3s ease;
}

.btn-edit:hover {
    background-color: var(--primary-green-hover);
}

.btn-delete {
    background-color: var(--primary-grey-hover);
    transition: .3s ease;
}

.btn-delete:hover {
    background-color: var(--primary-grey);
}

.new-meal-form {
    max-width: 100%;
}

.meal-actions:has(.delete-meal-btn) {
    grid-template-columns: 1fr 1fr 1fr;
}

.meal-actions:has(.delete-meal-btn) button {
    padding: 10px 15px;
    height: 40px;
}

.meal-detail-container .btn-cancel {
    background: var(--primary-pink);
}

.meal-detail-container .btn-cancel:hover {
    background: var(--primary-pink-hover)
}

.btn-cancel {
    background: var(--primary-green);
    font-size: .8em;
}

.btn-cancel:hover {
    background: var(--primary-black);
}

.switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 30px;
    margin-left: 15px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    background-color: #ccc;
    border-radius: 34px;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 24px;
    width: 24px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    border-radius: 50%;
    transition: .4s;
}

input:checked + .slider {
    background-color: #4CAF50;
}
input:checked + .slider:before {
    transform: translateX(24px);
}

@media (max-width: 786px) {
    .meal-content {
        flex-direction: column;
        gap: 0px;
    }

    .meal-form {
        max-width: 100%; /* Full width on smaller screens */
    }

    .meal-deets {
        flex-direction: column;
        align-items: center;
    }

    .meal-deets #category {
        height: 60px;
    }

    .meal-actions {
        grid-template-columns: 1fr;
    }


    .meal-detail-container .meal-actions {
        display: flex;
        flex-direction: row;
        justify-content: center;
        align-items: center;
    }

    

    .meal-detail-container .meal-actions button,
    .meal-detail-container .meal-actions a {
        /* height: 40px; */
        font-size: 11.5px;
        margin: 0px;
        display: block;
    }

    .btn-cancel {
        padding: 5px 5px;
    }

    .meal-plans-page .meal-actions,
    .meals-page .meal-actions {
        grid-template-columns: 1fr;
    }

    .meal-plans-page .meal-actions a,
    .meal-plans-page button,
    .meals-page .meal-actions a, 
    .meals-page button {
        padding: 7px 15px;
    }

}

#cuisine,
#category {
    font-size: .8em;
}

@media (min-width: 786px) {
    #cuisine {
    width: 200px;
}

    #category {
        width: 185px;
    }
}

.meal-deets {
    display: flex;
    max-width: 400px;
    margin: auto;
    align-items: flex-start;
    /* gap: 20px; */
    flex-direction: column;
}

.meal-deets .form-group {
    margin: 15px 0px;
    width: auto;
}

.meal-deets-subgroup {
    display: flex;
    flex-direction: row;
    margin: 0px auto;
    width: 100%;
}

.toggle-group {
    margin-top: 0px !important;
}

.form-group:has(#category) {
    margin-bottom: 0px;
}

.form-group:has(#cuisine) {
    margin-right: 15px;
    width: 100%;
}

.form-group:has(#tag-container) {
    margin: 0px 0px 20px;
    flex-grow: 1;
}

#tags-form-group {
    margin-top: 0px;
}

#tags {
    width: 275px;
    padding: 8px;
    border-radius: 6px;
    border: 1px solid #ccc;
}

.input-help {
    font-size: 0.85em;
    margin-top: 4px;
    display: block;
}

.meal-deets-subgroup:has(.toggle-group) {
    align-items: top;
    justify-content: space-between;
    gap: 15px;
}

.tag-input-container {
    display: flex;
    flex-wrap: wrap;
    border: 1px solid #ccc;
    padding: 0px 6px;
    border-radius: 6px;
    gap: 6px;
    background: #fff;
    margin: 0px;
    position: relative;
}

.tag-input-container input {
    border: none;
    flex: 1;
    min-width: 100px;
    padding: 4px;
    outline: none;
    width: auto;
}


.tag-chip {
    background-color: var(--primary-green);
    border-radius: 30px;
    padding: 1px 10px;
    display: inline-flex;
    align-items: center;
    font-size: 0.8em;
    color: var(--white);
    margin-top: 5px;
    margin-bottom: 5px;
}

.remove-tag {
    margin-left: 8px;
    cursor: pointer;
    color: var(--white);
    font-size: 1.5em;
    padding-bottom: 3px;
}

.tag-suggestions {
    position: absolute;
    background: white;
    border: 1px solid #ccc;
    border-radius: 30px;
    z-index: 1000;
    max-height: 50px;
    overflow-y: auto;
    width: auto;
    margin: 0px;
    right: 5px;
    top: 6px;
}

.suggestion-item {
    padding: 8px 10px;
    cursor: pointer;
    margin: 0px;
    font-size: .8em;
}

.suggestion-item:hover {
    /* background-color: #f0f0f0; */
    /* background-color: pink; */
}


@media (max-width: 786px) {

    .meal-deets {
        gap: 0px;
    }

    .meal-deets-subgroup,
    .form-group:has(#category) {
        width: 100%;
    }

    .toggle-group {
        margin-top: 0px !important;
    }


}



/* Right column: Ingredients */
.ingredients-column {
    flex: 0.5;
    max-width: 35%; /* The ingredients column will take up about half the width of the form */
    background-color: var(--secondary-mid-grey);
    padding: 0px 25px;
    border-radius: 20px;
    padding-bottom: 30px;
}

.ingredients-column h4 {
    color: var(--primary-black)
}

.ingredients-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    /* margin-top: 50px; */
}


/* Each ingredient item box */
.ingredient-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 10px 10px 10px;
    background-color: var(--white);
    border: 1px solid #ddd;
    border-radius: 10px;
    height: 25px;
}

.ingredient-name {
    flex: 1;
    text-align: left;
}

.ingredient-name p {
    margin-bottom: 0px;
    font-size: .9em;
    margin-top: 0px;
    font-weight: 600;
    color: var(--primary-green);
}

p.ingredient-category {
    font-size: 0.6em;
    color: var(--primary-grey);
    font-weight: 300;
    margin-top: 0px;
    margin-bottom: 0px;
}

.ingredient-dots {
    display: flex;
    gap: 5px;
}

.dot {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background-color: #ddd;
    border: 1px solid var(--primary-mid-green-hover);
    padding: 0px;
}

.dot:hover {
    background-color: var(--primary-green);
}

.dot.filled {
    background-color: var(--primary-mid-green-hover);
}

.btn-remove {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--primary-pink);
    cursor: pointer;
    padding: 10px;

}

.btn-remove:hover {
    background-color: var(--white);
    color: var(--primary-pink-hover)
}

/* Basic styling for the form fields */
.form-group {
    margin-bottom: 20px;
}

.suggestions-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 10;
    background: white;
    border: 1px solid var(--secondary-mid-grey);
    max-height: 200px;
    overflow-y: auto;
    display: none;
}

.suggestion-item {
    padding: 5px 10px;
    cursor: pointer;
    color: var(--primary-grey)
}

.suggestion-item:hover {
    background-color: var(--primary-green);
    color: var(--white)
}

@media (max-width: 786px) {
    .ingredients-column {
        max-width: 100%;
        margin-top: 50px;
    }

}

.ingredient-list-info {
    font-size: .7em;
    color: var(--primary-grey);
}

.ingredient-list-info a {
    color: var(--primary-pink-hover);
    font-weight: 600;
}

.actions {
    text-align: center;
}

.edit-meal-plan-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.edit-meal-plan-container {
    width: 80%;
    margin: auto;
    text-align: center;
}

.edit-meal-plan-container .actions {
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.edit-meal-plan-container .actions:has(.finalize-btn) {
    flex-direction: column;
}

@media (max-width: 786px) {

    .edit-meal-plan-container {
        width: 100%;
    }

    .edit-meal-plan-header {
        flex-direction: column;
        gap: 20px;
        margin-bottom: 0px;
    }

    .edit-meal-plan-header h2 {
        margin: 0px;
    }

    .edit-meal-plan-header .actions {
        margin-bottom: 0px;
    }
}

.edit-meal-plan-container .meal-box {
    padding: .8rem 2rem;
}

.edit-meal-plan-container .meal-info {
    text-align: left;
    margin-top: 0px;
    margin-bottom: 0px;
    width: 60%;
}

.edit-meal-plan-container .meal-info h3 {
    margin-bottom: 0px;
    margin-top: 0px;
    color: var(--primary-green)
}

.edit-meal-plan-container .meal-info p {
    margin-bottom: 0px;
    margin-top: 0px;
}

.edit-meal-plan-container .meal-actions {
    grid-template-columns: 1fr;
}


.meal-box {
    margin: auto;
    display: flex;
    align-items: center;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 10px;
    margin-bottom: 10px;
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}


.meal-plan-container .meal-box {
    max-width: 550px;
    flex-direction: row;
}


@media (max-width: 786px) {
    .edit-meal-plan-container .actions {
        margin-top: 0;
    }

    .edit-meal-plan-container .meal-box {
        flex-wrap: wrap;
        padding: .8rem 1rem;
    }

    .edit-meal-plan-container .meal-info {
                min-width: 150px
    }

    .edit-meal-plan-container .meal-actions {
        text-align: left;
        margin-left: 15px;
        margin-top: 5px;
    }

    .add-side-dishes-container .meal-actions {
        margin-left: 35px;
    }

    .edit-meal-plan-container .meal-actions select {
        padding: 5px 10px;
    }
}

select.side-dish-select {
    background-color: white;
    transition: background-color 0.3s ease;
}
select.side-dish-select.selected {
    background-color: #d4edda; /* light green */
}


.meal-plan-details {
    color: var(--primary-grey)
}

.meal-plan-details p {
    text-align: center;
}

.meal-checkbox {
    transform: scale(1.5);
    width: auto;
    margin-left: 15px;
    margin-right: 25px;
}

.meal-info h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding-right: 5px;
}

.meal-info p {
    text-align: left;
    margin: 0;
    color: var(--primary-grey)
}

.star {
    cursor: pointer;
    font-size: 1.5rem;
    color: #ccc;
    transition: color 0.3s ease;
    margin-left: 15px;
    margin-right: 25px;
}

.star.favorited {
    color: rgb(255, 174, 0);
}

@media (max-width: 786px) {
    .star {
        margin-left: 2px;
        margin-right: 10px;
    }
}

.actions button {
    margin-left: 0;
    margin-right: 0;
}

#replace-btn {
    background-color: var(--primary-pink);
    color: var(--white);
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    transition: .3s ease;
}

#replace-btn:hover {
    background-color: var(--primary-pink-hover);
    color: var(--white);
}

.remove-btn {
    background-color: var(--primary-grey);
    transition: .3s ease;
    border: none;
}

.add-sides-btn {
    background-color: var(--primary-green);
    color: var(--white);
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    transition: .3s ease;
    font-size: .8em;
}

.add-sides-btn:hover {
    background-color: var(--green);
    color: var(--white);
}

.finalize-btn {
    background: var(--primary-green);
    height: 40px;
}

.finalize-btn:hover {
    background: var(--green);
}


.meal-header {
    max-width: 400px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-left: 15px;
    margin: auto;
}
.btn-remove-meal {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
}
.btn-remove-meal:hover {
    background-color: transparent;

}

.submit-bulk-btn,
.add-bulk-meal-btn {
    margin-left: 1rem;
    margin-right: 1rem;
    font-size: 0.8em;
}

.submit-bulk-btn {
    background-color: var(--green);
    transition: .3s ease;
    box-sizing: content-box;
}

.submit-bulk-btn:hover {
    background-color: var(--green-hover);
}

.add-bulk-meal-btn {
    background-color: var(--primary-pink);
}

.add-bulk-meal-btn:hover {
    background-color: var(--primary-pink-hover);
}

.pagination-controls {
    margin-top: 1rem;
    text-align: center;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    row-gap: 15px;
    width: 90%;
    margin: auto;
}

.page-btn {
    margin: 0 4px;
    padding: 6px 12px;
    border: none;
    background: #e2e2e2;
    cursor: pointer;
    border-radius: 4px;
    color: black;
}

.page-btn.active {
    background: #555;
    color: white;
    font-weight: bold;
}


.ingredients-page {
    max-width: 70%;
    margin: auto;
}

.ingredients-page .page-header {
    flex-direction: row;
}

@media (max-width: 786px) {
    .ingredients-page {
        max-width: 100%;
    }
}

.ingredients-page .filters {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.ingredients-page .filters-inputs {
    display: flex;
    flex-direction: row;
    gap: 10px;
    width: 100%;
}

@media (max-width: 786px) {
    .ingredients-page .filters-inputs {
        flex-direction: column;
        gap: 10px;
    }
}


.ingredients-page .filters-inputs input {
    width: 100%;
}

.ingredients-page .filters-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin: auto;
}




.ingredients-page .filters select {
    width: auto;
}


.inline-form-box input,
.inline-form-box select {
    padding: 6px;
    width: 100%;
    height: 40px;
}

.inline-form-box {
    border: 2px dashed #ccc;
    background: #f9f9f9;
    margin-bottom: 15px;
    border-radius: 8px;
    display: flex;
    gap: 30px;
    padding: 15px 20px;
}

#inlineIngredientFormContainer {
    width: 100%;
    margin-bottom: 0;
}


#inlineIngredientForm .ingredient-info,
#inlineIngredientFormContainer .ingredient-info {
    margin: 0px;
    display: flex;
    gap: 20px;
}


#inlineIngredientForm .ingredient-actions,
#inlineIngredientFormContainer .ingredient-actions {
    display: flex;
    gap: 15px;
    margin: 0px;
}

#inlineIngredientForm select,
#inlineIngredientFormContainer select {
    width: 150px;
}

@media (max-width: 786px) {
    #inlineIngredientForm select,
    #inlineIngredientFormContainer select {
        width: 130px;
    }

    .inline-form-box {
        flex-direction: column;
        gap: 10px;
        padding: 15px 10px; 
    }

    #inlineIngredientForm .ingredient-info,
    #inlineIngredientFormContainer .ingredient-info {
        width: 100%;
        gap: 10px;
    }

    .inline-form-box input,
    .inline-form-box select {
        width: 100%;
    }

    #inlineIngredientForm .ingredient-actions,
    #inlineIngredientFormContainer .ingredient-actions {
        flex-direction: row;
    }
}

.meal-plan-header {
    display: flex;
    width: 90%;
    margin: auto;
    justify-content: space-between;
    align-items: center;
    max-width: 450px;
}

@media (max-width: 786px) {
    .meal-plan-header {
        margin-bottom: 35px;
        flex-direction: column;
    }
}

.grocery-link-div a {
    background: var(--primary-pink);
    padding: 10px 20px !important;
    color: white !important;
    transition: .3s ease;
    border: 2px solid var(--primary-pink-hover);
}

.grocery-link-div a:hover {
    background: var(--primary-pink-hover);
}

@media (max-width: 786px) {
    .grocery-link-div a {
        padding: 7px 15px !important;
        font-size: .8em;
    }
}

.grocery-list-page {
    padding: 1rem;
}

.grocery-categories-container {
    column-count: 2;
    column-gap: 50px;
    overflow: hidden;
    padding-top: 2rem;
    padding-bottom: 2rem;
}

.grocery-list-page .btn-back {
    color: white;
    top: 38px;
    background: var(--primary-green);
    padding: 10px 20px;
    border-radius: 5px;
}

.grocery-list-page .btn-back:hover{
    background: var(--primary-grey);
}

/* .btn-mobile {
    display: none;
}

.btn-desktop {
    display: block;
} */


.new-plan-quantity-label {
    font-size: .7em;
    font-weight: 400;
}


@media (max-width: 786px) {
    .grocery-categories-container {
        column-count: 1;
        column-gap: 0px;
    }

    .grocery-list-page .btn-back {
        padding: 5px 8px;
        top: 42px;
    }

    .btn-mobile {
        display: inline-block;
    }

    .btn-desktop {
        display: none;
    }
}

.grocery-list-page {
    /* padding-top: 4rem; */
    padding-bottom: 4rem;
}

.category-block {
    break-inside: avoid;
    page-break-inside: avoid;
    margin-bottom: 2rem;
}

.category-block h2 {
    margin-top: 0;
}

.grocery-category {
    break-inside: avoid;
    /* margin-top: 2rem; */
    font-size: 1.4rem;
    padding-bottom: 4px;
    text-align: left;
}

.grocery-box {
    display: block; 
    background: #fff;
    padding: .5rem 1rem .5rem;
    margin: 0.75rem 0;
    border-radius: 12px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
    break-inside: avoid;
}


.ingredient-name {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 0rem;
    color: var(--primary-green-hover);
    margin-top: 0rem;
}

.meal-usage-list {
    font-size: 0.75rem;
    color: var(--primary-grey);
}

.meal-line {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin: 0.2rem 0;
}

.quantity-grocery-dots {
    display: flex;
    gap: 4px;
    margin-left: auto;
}

.grocery-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ccc;
    display: inline-block;
}

.grocery-dot.filled {
    background: var(--primary-green);
}

.ingredient-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.quantity-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--primary-pink-hover);
    background: #f0f0f0;
    padding: 2px 8px;
    border-radius: 6px;
    font-variant: small-caps;
    margin-left: auto;
}

.quantity-label:has(.quantity-smidge) {
    background: var(--secondary-light-grey);
}
.quantity-smidge {
    color: var(--primary-pink-hover);
}

.quantity-label:has(.quantity-little) {
    background: #d9fba9;
}
.quantity-little {
    color: #228d08;
}

.quantity-label:has(.quantity-medium) {
    background: lightblue;
}
.quantity-medium {
    color: darkblue;
}

.quantity-label:has(.quantity-lot) {
    background: #f0ab80;
}
.quantity-lot {
    color: #872104;
}

.quantity-label:has(.quantity-whole-lot) {
    background: lightcoral;
}
.quantity-whole-lot {
    color: darkred;
}

.ingredients-page .ingredient-box {
    height: auto;
    margin-bottom: 1rem;
}

/* ════════════════════════════════════════════════════════════════ */
/* REDESIGNED GROCERY LIST PAGE - NEW LAYOUT */
/* ════════════════════════════════════════════════════════════════ */

.grocery-list-page { margin-top: 73px; padding: 40px 28px 110px; max-width: 720px; margin-left: auto; margin-right: auto; }

.grocery-list-page .page-header { display: flex; flex-direction: column; align-items: flex-start; margin-bottom: 20px; animation: fadeDown 0.4s ease both; }
.grocery-list-page .page-eyebrow { font-size: 11px; font-weight: 500; letter-spacing: 2px; text-transform: uppercase; color: var(--text-light); margin-bottom: 8px; }
.grocery-list-page .page-title { font-family: 'Outfit', sans-serif; font-size: 36px; font-weight: 500; color: var(--green); letter-spacing: -0.5px; }

.grocery-list-page .stats-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 10px 0 16px; animation: fadeDown 0.4s ease 0.05s both; }
.grocery-list-page .stat-pill { font-size: 12px; font-weight: 500; padding: 5px 12px; border-radius: 20px; background: white; color: var(--text-mid); border: 1.5px solid var(--border); box-shadow: 0 1px 3px rgba(26,58,42,0.05); }
.grocery-list-page .stat-pill.checked { background: #e8f4ee; color: var(--green-mid); border-color: rgba(61,122,87,0.15); }

.grocery-list-page .toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 22px; animation: fadeDown 0.4s ease 0.07s both; }
.grocery-list-page .toolbar .stat-pill { background: var(--rose-light); color: white; border-color: var(--rose); box-shadow: 0 2px 8px rgba(200,69,90,0.2); font-weight: 600; flex: 0.2; }

@media (max-width: 640px) {
    .grocery-list-page .toolbar .stat-pill {
        flex: 1;
        text-align: center;
    }
}


.grocery-list-page .btn-toolbar { padding: 8px 15px; border-radius: 22px; font-size: 12px; font-weight: 500; font-family: 'DM Sans', sans-serif; cursor: pointer; transition: all 0.15s; border: 1.5px solid var(--border); background: white; color: var(--text-mid); box-shadow: 0 1px 3px rgba(26,58,42,0.05); }
.grocery-list-page .btn-toolbar:hover { border-color: var(--green-light); color: var(--green); }
.grocery-list-page .btn-toolbar.danger:hover { border-color: var(--rose); color: var(--rose); background: #fdf4f5; }

.grocery-list-page .add-item-wrap { display: flex; gap: 8px; margin-bottom: 32px; animation: fadeDown 0.4s ease 0.09s both; }
.grocery-list-page .add-item-input { flex: 1; padding: 12px 16px; border-radius: 14px; border: 1.5px solid var(--border); background: white; font-family: 'DM Sans', sans-serif; font-size: 14px; color: var(--text-dark); outline: none; transition: border-color 0.2s, box-shadow 0.2s; }
.grocery-list-page .add-item-input:focus { border-color: var(--green-light); box-shadow: 0 0 0 3px rgba(61,122,87,0.1); }
.grocery-list-page .add-item-input::placeholder { color: var(--text-light); }
.grocery-list-page .btn-add { padding: 12px 20px; border-radius: 14px; border: none; background: var(--green); color: var(--cream); font-family: 'DM Sans', sans-serif; font-size: 13px; font-weight: 500; cursor: pointer; transition: all 0.18s; white-space: nowrap; box-shadow: 0 4px 12px rgba(26,58,42,0.2); }
.grocery-list-page .btn-add:hover { background: var(--green-mid); transform: translateY(-1px); }

/* Plans section - collapsible */
.grocery-list-page .plans-section { margin-bottom: 32px; animation: fadeDown 0.4s ease 0.11s both; }
.grocery-list-page .plans-block { background: var(--green); border-radius: 18px; padding: 16px 18px; box-shadow: 0 2px 12px rgba(26,58,42,0.18); }
.grocery-list-page .plans-block-hdr { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; cursor: pointer; user-select: none; }
.grocery-list-page .plans-block-title { font-size: 10px; font-weight: 600; letter-spacing: 2px; text-transform: uppercase; color: rgba(245,240,232,0.5); }
.grocery-list-page .plans-block-chevron { font-size: 10px; color: rgba(245,240,232,0.4); transition: transform 0.22s; }
.grocery-list-page .plans-section.open .plans-block-chevron { transform: rotate(180deg); }
.grocery-list-page .plans-list { display: none; flex-direction: column; gap: 8px; }
.grocery-list-page .plans-section.open .plans-list { display: flex; }

.grocery-list-page .plan-row { display: flex; align-items: center; gap: 12px; background: rgba(255,255,255,0.08); border-radius: 12px; padding: 11px 14px; border: 1px solid rgba(245,240,232,0.1); }
.grocery-list-page .plan-row-info { flex: 1; min-width: 0; }
.grocery-list-page .plan-row-name { font-family: 'Outfit', sans-serif; font-size: 14px; font-weight: 500; color: var(--cream); margin-bottom: 2px; }
.grocery-list-page .plan-row-meta { font-size: 11px; color: rgba(245,240,232,0.45); }
.grocery-list-page .btn-remove-plan { padding: 6px 12px; border-radius: 20px; font-size: 11px; font-weight: 500; font-family: 'DM Sans', sans-serif; cursor: pointer; white-space: nowrap; border: 1px solid rgba(245,240,232,0.2); background: rgba(255,255,255,0.1); color: rgba(245,240,232,0.65); transition: all 0.18s; }
.grocery-list-page .btn-remove-plan:hover { background: rgba(200,69,90,0.3); border-color: rgba(200,69,90,0.5); color: #fca5b0; }

/* Category sections */
.grocery-list-page .cat-section { margin-bottom: 28px; animation: slideUp 0.45s ease both; }
.grocery-list-page .cat-header { display: flex; align-items: center; gap: 10px; padding: 0 2px 10px; }
.grocery-list-page .cat-title { font-size: 11px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; color: var(--text-light); }
.grocery-list-page .cat-line { flex: 1; height: 1px; background: var(--border); }

/* Grocery item - main container */
.grocery-list-page .g-item { display: flex; align-items: center; border-radius: 16px; margin-bottom: 7px; background: white; box-shadow: 0 2px 6px rgba(26,58,42,0.06), 0 4px 14px rgba(26,58,42,0.04); border: 1.5px solid transparent; transition: border-color 0.2s, box-shadow 0.2s, background 0.2s; padding-right: 12px; }
.grocery-list-page .g-item:hover { border-color: rgba(26,58,42,0.07); box-shadow: 0 4px 16px rgba(26,58,42,0.09); }

.grocery-list-page .g-item.checked { background: #f7fbf8; box-shadow: none; border-color: rgba(26,58,42,0.05); }
.grocery-list-page .g-item.checked .g-name { color: var(--text-light); text-decoration: line-through; text-decoration-color: rgba(138,170,152,0.6); }
.grocery-list-page .g-item.checked .g-source { opacity: 0.45; }
.grocery-list-page .g-item.checked .qty-pill { opacity: 0.35; }
.grocery-list-page .g-item.checked .g-check { background: var(--green); border-color: var(--green); color: white; }
.grocery-list-page .g-item.checked .g-remove { opacity: 0; pointer-events: none; }

.grocery-list-page .g-inner { flex: 1; display: flex; align-items: center; gap: 14px; padding: 14px 12px 14px 18px; cursor: pointer; }

.grocery-list-page .g-check { width: 24px; height: 24px; border-radius: 50%; flex-shrink: 0; border: 2px solid var(--border); background: white; display: flex; align-items: center; justify-content: center; font-size: 12px; color: transparent; font-weight: 700; transition: all 0.2s; pointer-events: none; }

.grocery-list-page .g-info { flex: 1; min-width: 0; }
.grocery-list-page .g-name { 
    font-family: 'Outfit', sans-serif; 
    font-size: 15px; 
    font-weight: 500; 
    color: var(--text-dark); 
    margin-bottom: 2px; 
    transition: color 0.2s; 
    max-width: 200px;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: scroll;
}

@media (max-width: 640px) {
    .grocery-list-page .g-name {
        max-width: 160px;
    }
}


.grocery-list-page .g-source { font-size: 11px; color: var(--text-light); display: flex; flex-direction: column; gap: 2px; margin-top: 1px; }
.grocery-list-page .g-meal { display: flex; align-items: center; gap: 5px; }

.grocery-list-page .dots { display: flex; gap: 3px; align-items: center; flex-shrink: 0; }
.grocery-list-page .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green-light); flex-shrink: 0; }
.grocery-list-page .dot.empty { background: transparent; border: 1.5px solid rgba(138,170,152,0.35); }

.grocery-list-page .qty-pill { font-size: 11px; font-weight: 600; padding: 4px 10px; border-radius: 20px; flex-shrink: 0; transition: opacity 0.2s; letter-spacing: 0.2px; }
.grocery-list-page .qty-smidge { background: #fdf6e3; color: #9a7020; border: 1px solid rgba(212,168,67,0.28); }
.grocery-list-page .qty-little  { background: #e8f4ee; color: var(--green-mid); border: 1px solid rgba(44,90,64,0.18); }
.grocery-list-page .qty-medium  { background: #d4eadd; color: var(--green); border: 1px solid rgba(26,58,42,0.2); }
.grocery-list-page .qty-lot     { background: var(--rose); color: white; border: none; }

.grocery-list-page .g-remove { width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0; border: 1.5px solid var(--border); background: transparent; display: flex; align-items: center; justify-content: center; font-size: 12px; cursor: pointer; color: var(--text-light); transition: all 0.18s; pointer-events: all; }
.grocery-list-page .g-remove:hover { background: #fdf4f5; border-color: var(--rose); color: var(--rose); }

/* Bottom nav for mobile */
.grocery-list-page .bottom-nav { position: fixed; bottom: 0; left: 0; right: 0; background: rgba(234,244,237,0.97); backdrop-filter: blur(16px); border-top: 1px solid var(--border); display: flex; padding: 10px 0 18px; }
.grocery-list-page .bn-inner { display: flex; }
.grocery-list-page .bn-item { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; cursor: pointer; }
.grocery-list-page .bn-icon { font-size: 20px; }
.grocery-list-page .bn-label { font-size: 10px; font-weight: 500; color: var(--text-light); }
.grocery-list-page .bn-item.active .bn-label { color: var(--green); font-weight: 600; }
.grocery-list-page .bn-center { flex: 1; display: flex; align-items: center; justify-content: center; margin-top: -22px; }
.grocery-list-page .bn-fab { width: 54px; height: 54px; background: var(--green); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 22px; box-shadow: 0 4px 18px rgba(26,58,42,0.38); cursor: pointer; transition: transform 0.2s; }
.grocery-list-page .bn-fab.active {
    box-shadow: 0 0 0 3px rgba(26, 58, 42, 0.18), 0 4px 16px rgba(26, 58, 42, 0.35);
}

.bn-fab:hover { transform: scale(1.08); }

@media (max-width: 640px) {
  .grocery-list-page { padding: 28px 14px 110px; }
  .grocery-list-page .bottom-nav { display: flex; }
}

/******************
***** FOOTER ******
******************/

.footer-content {
    display: flex;
    justify-content: space-between;
    width: 80%;
    margin: auto;
}

.footer-content p {
    margin: 0px 0px 5px;
    color: white;
}

.footer-content button {
    height: 45px;
}

.footer-content button:hover {
    background-color: var(--primary-black);
    color: var(--white);
}

@media (max-width: 786px) {
    footer {
        padding-top: 5px;
        padding-bottom: 5px;
    }

    .footer-content {
        margin: 15px auto;
    }

    footer button {
        height: 35px;
        align-self: center;
    }
}


/*** trying out dark ***/

/* body {
    background-color: var(--primary-background);
    color: white;
}

.home-section.meal-plans-section,
.home-section.meals-section {
    background-color: var(--primary-green);
}

.home-container h3 {
    color: var(--white)
}

.preview-list li {
    background-color: var(--white);
}

.meals-section .preview-list li:hover,
.preview-list li:hover {
    border: 2px solid var(--primary-green-hover)
}

.preview-dot {
    background-color: var(--primary-green)
} */

/* .ingredients-section a {
    background-color: var(--primary-black);
    color: white;
}

.ingredients-section a:hover {
    background-color: var(--primary-grey);
} */


h1 {
    /* color: white; */
    color: var(--primary-green-hover);
}

.btn-edit {
    background-color: var(--green);
}

.btn-edit:hover {
    background-color: var(--green-hover);
}

.add-ingred-btn:hover,
.meal-plan-container button:hover {
    background-color: var(--primary-black);
}

.meal-plan-details {
    /* color: white; */
}

.meal-plan-container button {
    margin-top: 50px;
    background: var(--primary-green)
}

.meal-plan-container button:hover {
    background: var(--green) !important;
}

.meal-plan-container h3 a {
    font-size: 1em;
    text-align: left;
    color: var(--primary-green-hover);
}

.meal-plan-container a {
    color: var(--primary-grey);
    padding: 0px;
}


.ingredients-page {
    color: var(--black);
}

.ingredient-actions .btn-primary {
    background: var(--primary-green);
}


footer {
    background: var(--primary-header)
}

@media (max-width: 768px) {
    .home-section.meal-plans-section,
    .home-section.meals-section {
        /* background-color: var(--secondary-mid-grey); */
        /* background-color: var(--primary-pink-hover); */
    }

    .preview-list li {
        background-color: var(--white);
    }
    
    .preview-list li:hover {
        border: 2px solid var(--primary-green-hover)
    }

    .home-container .star {
        margin-left: 12px;
        margin-right: 0px;
    }

    .ingredient-actions {
        flex-direction: column;
        gap: .5rem;
    }

    .ingredient-actions button {
        padding: 7px 15px;
    }

    .ingredient-actions .delete-btn,
    .meal-actions .delete-btn {
        width: 73px;
        height: 33px;
        font-size: .75em;
    }
}


.side-dish-label {
    display: inline-block;
    margin: 8px 0;
    padding: 6px 12px;
    background-color: #f0f8f5;
    border: 1px solid #b2d8c6;
    border-radius: 15px;
    font-size: 0.9rem;
    color: #2c6e49;
    font-weight: 500;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-right: 20px;
}

@media (max-width: 786px) {
    .meal-plan-container .meal-box {
        flex-wrap: wrap;
    }

    .side-dish-label {
        order: 4;
        margin: 0px 0px 5px 35px;
    }

    .meal-plan-container .meal-info {
        min-width: 60%;
    }
}


#btn-mp-cancel {
    background-color: var(--primary-black);
    padding: 10px 20px;
    border-radius: 5px;
    color: var(--white);
    margin-left: 15px;
    margin-right: 15px;
    font-size: .8em;
}

#btn-mp-cancel:hover {
    background-color: var(--primary-grey)
}

.selected-meals {
    list-style: none;
    padding: 0;
    width: 90%;
    margin: auto;
    margin-top: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.selected-meal-item {
    padding: 5px 10px;
    border-radius: 5px;
    display: flex;
    align-items: center;
    font-size: 0.8em;
    width: 100%;
    background: var(--secondary-mid-grey);
    color: var(--primary-black);
    justify-content: space-between;
}

.selected-meal-item div {
    margin: 0px;
}

button.meals-select-remove-btn {
    background-color: var(--secondary-mid-grey);
    /* background-color: pink; */
    border: none;
    color: var(--primary-pink);
    margin: 0px;
    font-size: 1.5em;
    cursor: pointer;
    padding: 0px 7px 2px;
    font-weight: 700;
    transition: .3s ease;
    border-radius: 25px;
}

button.meals-select-remove-btn:hover {
    background-color: var(--primary-pink-hover) !important;
    color: var(--white);
    border-radius: 30px;
}


.search-result-item {
    cursor: pointer;
    padding: 5px;
}

.search-result-item:hover {
    background-color: var(--secondary-light-grey);
    color: black;
}

.plus-symbol {
    margin-right: 8px;
    color: green;
    font-weight: bold;
}

#categoryFilter {
    padding: .6rem;
}

.grocery-list-page .actions:has(.btn-back) {
    text-align: left;
}

#combineGroceryListBtn {
    background: var(--primary-pink);
    transition: .3s ease;
    /* height: 38px; */
}

#combineGroceryListBtn:hover {
    background: var(--primary-pink-hover);
}

.combine-grocery-container {
    display: flex;
    justify-content: space-between;
    align-items: right;
}

.combine-action-buttons {
    display: flex;
    gap: 10px;
    justify-content: right;
    margin-bottom: 15px;
}

.combine-action-buttons button {
    background: var(--primary-pink);
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    font-size: .8em;
    transition: .3s ease;
}

.combine-action-buttons button:hover {
    background: var(--primary-pink-hover);
}

.disabled-btn {
    opacity: 0.5;
    pointer-events: none;
}

.meal-box-container {
    margin-top: 30px;
}

#add-meal-plan-btn.mobile {
    display: none;
}

.meal-plan-filters-inputs {
    display: flex;
    gap: 20px;
}

@media (max-width: 786px) {
    .meal-plan-filters-inputs {
        flex-direction: column;
        gap: 10px;
        margin: auto;
        text-align: center;
    }

    #add-meal-plan-btn {
        margin: auto;
    }

    .meal-plans-page .filters {
        text-align: center;
    }

    #add-meal-plan-btn.desktop {
        display: none;
    }

    #add-meal-plan-btn.mobile {
        display: block;
        padding: 8px 15px;
    }

    .combine-grocery-container {
        gap: 10px;
        margin: auto;
    }

    .combine-actions-buttons {
        margin-right: 5px;
    }

    .combine-action-buttons a {
        padding: 8px 15px;
    }

    .add-to-combine-btn.btn-success {
        background: var(--primary-pink-hover)
    }
}


.scratch-list-page {
    margin: 40px auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 0 16px;
}

.scratch-item-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #e5e7eb; /* light gray */
    padding: 12px 16px;
    border-radius: 8px;
    /* box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); */
}

.scratch-item-details {
    display: flex;
    gap: 30px;
    align-items: center;
}

.scratch-item-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.scratch-category-name {
    font-size: 0.8em;
    color: var(--primary-grey-hover);
}

.scratch-item-name {
    flex-grow: 1;
    font-size: 16px;
    font-weight: 700;
    color: var(--primary-black)
}

.scratch-quantity-dots {
    display: flex;
    gap: 6px;
    margin-right: 16px;
    align-items: center;
}

.scratch-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #ccc; /* unfilled */
    cursor: pointer;
    border: 1px solid var(--primary-green);
    margin: 0px;
}

.scratch-dot:first-of-type {
    margin-left: 10px;
}

.scratch-item-quantity-label {
    color: var(--primary-black);
    font-weight: 600;
    font-family: .9em;
}

.scratch-dot.filled {
    background-color: var(--primary-green); /* filled */
    cursor: pointer;
}

.remove-button {
    background: var(--primary-grey);
    border: none;
    color: var(--white);
    cursor: pointer;
    transition: .3s ease;
}

.remove-button:hover {
    background: var(--primary-pink-hover);
}

.scratch-list-page .edit-btn {
    padding: 3px 5px;
    margin-right: 10px;
}

.scratch-list-page #new-item-form {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--secondary-mid-grey);
    border-radius: 5px;
    height: 95px;
    padding: 0px 15px;
    gap: 15px;
}

.scratch-form-actions {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.scratch-form-actions button {
    width: 58px;
    box-sizing: content-box;
    padding: 5px 10px;
}

.scratch-list-page h1 {
    text-align: center;
    margin-bottom: 0px;
}

.scratch-list-page #add-new-item-btn {
    height: 38px;
    background-color: var(--primary-pink);
    transition: .3s ease;
    font-weight: 700;;
}

.scratch-list-page #add-new-item-btn:hover {
    background-color: var(--primary-pink-hover);
}

.scratch-list-page .clear-all-btn {
    height: 40px;
}

.scratch-list-page .clear-all-btn:hover {
    background-color: var(--primary-grey-hover);
}

#new-item-quantity-dots,
.scratch-item-quantity {
    margin: 0px;
}

.scratch-item-quantity {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
    justify-content: center;
    flex-grow: 1;
}

#new-item-note {
    width: 200px;
}

#submit-add-item-btn {
    background-color: var(--primary-green);
}

#submit-add-item-btn:hover {
    background-color: var(--primary-green-hover);
}

.scratch-categories-container {
    column-count: 2;
    column-gap: 50px;
    overflow: hidden;
    padding-top: 2rem;
    padding-bottom: 2rem;
}

.scratch-note {
    font-size: 0.8em;
    color: var(--primary-grey);
    margin-top: 0px;
    text-align: center;
}

.scratch-item-note .scratch-note {
    margin-top: 10px;
}

.scratch-item-note {
    margin: 0px
}

#new-item-ingredient-wrapper {
    flex-grow: 1;
}

#new-item-ingredient-wrapper #new-item-name {
    width: 100%;
}

.scratch-item-left {

}


@media (max-width: 786px) {
    .scratch-categories-container {
        column-count: 1;
        column-gap: 0px;
    }

    .scratch-list-page #new-item-form {
        height: auto;
        flex-wrap: wrap;
        justify-content: space-around;
        padding: 0px 10px;
        gap: 5px;
    }

    .scratch-list-page #add-new-item-btn {
        height: 40px;
        width: 150px;
        text-align: center;
        /* margin: auto; */
    }

    .shrink-text {
        flex: 1 1 auto; 
        min-width: 0; 
        font-size: 1.5rem;
        overflow: hidden;
        text-overflow: ellipsis; 
        white-space: nowrap;    
    }

    .scratch-item-quantity {
        gap: 5px;
    }

    .scratch-quantity-dots {
        margin-top: 0px;
        margin-bottom: 0px;
    }

    #new-item-ingredient-wrapper {
        margin-bottom: 0px;
        margin-top: 15px;
    }

    .scratch-form-actions {
        flex-direction: row;
        margin-top: 10px;
        margin-bottom: 15px;
    }
}

.scratch-list-page .edit-form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.scratch-list-page .edit-form input {
    flex-grow: 1;
    margin-right: 20px;
}

.scratch-edit-buttons {
    margin: 0px;
}

.scratch-edit-save {
    background-color: var(--primary-green);
    transition: .3s ease;
}

.scratch-edit-save:hover {
    background-color: var(--primary-green-hover);
}

.scratch-list-page  .actions {
    text-align: left;
}

.scratch-list-page .header-button {
    text-align: center;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.scratch-list-box {
    margin-top: 30px;
}

.scratch-list-box .meal-actions {
    grid-template-columns: 1fr;
}

.add-to-combine-btn:hover {
    background: var(--green)
}

.add-to-combine-btn.btn-success {
    background: var(--primary-green)
}

.login-page,
.new-user-page {
    max-width: 900px;
    margin: 73px auto 60px;
    padding: 32px 24px;
}

.new-user-page .form-card {
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}

.new-user-page .page-header {
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}

.new-user-page .page-info {
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}

.forgot-password-page {
    max-width: 900px;
    margin: 73px auto 60px;
    padding: 32px 24px;
}

.forgot-password-page .form-card {
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}

.forgot-password-page .page-header {
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}

.forgot-password-page .page-info {
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}

.subscription-success-page {
    max-width: 900px;
    margin: 73px auto 60px;
    padding: 32px 24px;
}

.subscription-success-page .form-card {
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}

.subscription-success-page .page-header {
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}

.subscription-success-page .page-info {
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}

.success-message {
    text-align: center;
    padding: 40px 24px;
}

.success-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    background: rgba(61, 122, 87, 0.1);
    border-radius: 50%;
    font-size: 32px;
    color: var(--green);
    margin-bottom: 24px;
    animation: slideUp 0.4s ease-out both;
}

.success-title {
    font-family: 'Outfit', sans-serif;
    font-size: 20px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 12px;
}

.success-description {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.6;
}

.subscription-canceled-page {
    max-width: 900px;
    margin: 73px auto 60px;
    padding: 32px 24px;
}

.subscription-canceled-page .form-card {
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}

.subscription-canceled-page .page-header {
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}

.subscription-canceled-page .page-info {
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}

.canceled-message {
    text-align: center;
    padding: 40px 24px;
}

.canceled-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    background: rgba(200, 69, 90, 0.1);
    border-radius: 50%;
    font-size: 32px;
    color: var(--rose);
    margin-bottom: 24px;
    animation: slideUp 0.4s ease-out both;
}

.canceled-title {
    font-family: 'Outfit', sans-serif;
    font-size: 20px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 12px;
}

.canceled-description {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.6;
}

.reset-password-page {
    max-width: 900px;
    margin: 73px auto 60px;
    padding: 32px 24px;
}

.reset-password-page .form-card {
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}

.reset-password-page .page-header {
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}

.reset-password-page .page-info {
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}

.password-input-wrapper {
    position: relative;
    display: flex;
}

.toggle-password {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    transition: color 0.2s;
}

.toggle-password:hover {
    color: var(--text-dark);
}

.toggle-password svg {
    width: 20px;
    height: 20px;
}
}

.checkbox-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-right: 15px;
    margin: 0px;
}

.checkbox-group label {
    flex-grow: 1;
    margin-left: -5px;
    margin-bottom: 0px;
}

.checkbox-group input {
    width: 25px;
}

.checkbox-group input[type="checkbox"] {
    accent-color: var(--primary-green);
    color: var(--white) !important;
}

.profile-page .form-actions {
    text-align: center;
}

.profile-page .form-actions button {
    margin: 0px 10px;
    padding: 10px 20px;
    background-color: var(--primary-pink);
    color: var(--white);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: .3s ease;
}

.profile-page .form-actions button:hover {
    background-color: var(--primary-pink-hover);
}

.profile-page {
    text-align: center;
}

.profile-page .actions {
    text-align: left;
}

.empty-scratch-list {
    text-align: center;
    margin-top: 75px;
}

.meal-list-tag {
    /* background: var(--secondary-light-grey); */
    background: #c0e2ed;
    padding: 3px 8px;
    border-radius: 15px;
    margin-right: 5px;
    margin-left: 5px;
    font-size: .8em;
}

.edit-meal-help-text {
    font-size: .8em;
    line-height: 1.5em;
}

.edit-meal-help-text:first-of-type {
        margin-top: 50px;

}

.edit-meal-help-text a {
    color: var(--primary-green-hover);
    background: var(--white);
    padding: 1px 8px;
    border-radius: 15px;
    transition: all .3s ease;
}

.edit-meal-help-text a:hover {
    background: var(--secondary-mid-grey)
}

.profile-page .toggle-group label {
    text-align: left;
    padding-left: 10px;
}

.profile-page .toggle-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 15px auto 10px 10px;
    justify-content: flex-start;
}

.profile-page .toggle-label-left,
.profile-page .toggle-label-right {
    font-size: 0.9em;
    color: var(--primary-black);
    font-weight: 600;
}

.profile-page .switch {
    position: relative;
    width: 44px;
    height: 28px;
    margin: 0px;
}

.profile-page .switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.profile-page .slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: var(--primary-green);
    transition: 0.4s;
    border-radius: 28px;
}

.profile-page .slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 5px;
    bottom: 4px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

.profile-page input:checked + .slider {
    background-color: var(--primary-green);
}

.profile-page input:checked + .slider:before {
    transform: translateX(24px);
}

.preferences-description {
    text-align: left;
    font-size: .7em;
    margin-left: 10px;
    margin-top: 0px;
    color: var(--primary-grey);
}

.profile-page .toggle-group {
    margin-top: 2.5em !important;
}

.max-occurance + .preferences-description {
    margin-top: 10px;
}

.form-sections {
    display: flex;
    gap: 50px;
    margin: auto;
    justify-content: center;
    width: 90%;
    max-width: 850px;
}

.form-section {
    width: 50%;
}

.profile-page .form-actions {
    margin-top: 0px !important
}

@media (max-width: 786px) {
    .form-sections {
        flex-direction: column;
        gap: 0px;
    }

    .form-section {
        width: 100%;
    }

    .profile-page .preferences-section .form-group {
        margin-bottom: 30px;
    }

}

.side-dish-input-label {
    width: 80px;
}

.meal-tags-section {
    margin-top: 40px;
}

.tag-row {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
    margin-top: 0px;
}

.delete-tag-btn {
    background-color: var(--primary-black);
    color: white;
    border: none;
    padding: 0.2em 0.5em .25em;
    margin-left: 0.5rem;
    border-radius: 15px;
    cursor: pointer;
}

.delete-tag-btn:hover {
    background-color: #c82333;
}

.tag-input-div {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.contact-page {
    text-align: center;
    margin: auto;
    width: 60%;
}

.contact-page input {
    width: 100%;
}

.contact-page button {
    background-color: var(--primary-pink);
    transition: all .3 ease;
}

.contact-page button:hover {
    background-color: var(--primary-pink-hover);
}

.no-meals-home {
    color: var(--primary-black);
    padding: 15px 10px;
}

.preview-list.meal-list-home {
    height: 280px;
    overflow: auto;
    scroll-behavior: auto;
}


.btn-premium {
    background-color: var(--primary-green);
    color: white;
    padding: 10px 15px;
    border-radius: 5px;
    transition: all .3s ease;
}

.btn-premium:hover {
    background-color: var(--green);
}

.btn-cancel {
    color: var(--primary-pink-hover);
    background: none;
    text-decoration: underline;
}

.btn-cancel:hover {
    background: none;
}

.canceled-span {
    color: var(--primary-pink);
    font-weight: 600;
}

.subscription-group {
    margin-top: 30px;
    text-align: center;
}

.subscription-type-group {
    text-align: left;
    margin-bottom: 50px;
}

.subscription-type {
    text-align: left;
    padding-left: 15px;
}

.subscription-type-box {
    background-color: var(--white);
    border-radius: 50px;
    padding: 8px 15px;
    color: black;
    margin-left: 15px;
    text-align: left;
}

.subscription-type-box.premium {
    background-color: var(--primary-green);
}

.subscription-end-date {
    font-size: 12px;
    padding-left: 15px;
    margin-top: -5px;
    font-style: italic;
}

.subscription-success-page {
    text-align: center;
}

@media (max-width: 876px) {
    .add-meal-btn,
    .reset-filters-btn,
    .bulk-meal-btn,
    .meals-page button {
        padding: 5px 8px;
    }
}

/* ════════════════════════════════════════════════════════════════ */
/* EDIT TAGS PAGE - REDESIGN STYLES */
/* ════════════════════════════════════════════════════════════════ */

.edit-tags-page {
    /* margin-top: 73px; */
    padding: 36px 28px 100px;
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
}

.edit-tags-page .page-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 20px;
    animation: fadeDown 0.4s ease both;
}

.edit-tags-page .page-eyebrow {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-light);
    margin-bottom: 8px;
}

.edit-tags-page .page-title {
    font-family: 'Outfit', sans-serif;
    font-size: 32px;
    font-weight: 500;
    color: var(--green);
    letter-spacing: -0.5px;
}

.edit-tags-page .page-info {
    margin-bottom: 28px;
    animation: slideUp 0.4s ease 0.05s both;
}

.edit-tags-page .info-primary {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 4px;
    margin-top: 0;
}

.edit-tags-page .info-secondary {
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 0;
    margin-top: 0;
}

.edit-tags-page .info-secondary a {
    color: var(--green);
    font-weight: 500;
    text-decoration: none;
}

.edit-tags-page .info-secondary a:hover {
    text-decoration: underline;
}

.edit-tags-page .form-card {
    background: white;
    border-radius: 20px;
    padding: 28px;
    box-shadow: 0 2px 8px rgba(26, 58, 42, 0.06), 0 4px 16px rgba(26, 58, 42, 0.04);
    animation: slideUp 0.4s ease 0.1s both;
}

.tag-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tag-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--cream);
    border-radius: 12px;
    border: 1.5px solid transparent;
    transition: all 0.18s;
    animation: slideUp 0.4s ease-out both;
}

.tag-item:nth-child(1) { animation-delay: 0.12s; }
.tag-item:nth-child(2) { animation-delay: 0.16s; }
.tag-item:nth-child(3) { animation-delay: 0.20s; }
.tag-item:nth-child(4) { animation-delay: 0.24s; }
.tag-item:nth-child(5) { animation-delay: 0.28s; }
.tag-item:nth-child(n+6) { animation-delay: 0.32s; }

.tag-item:hover {
    background: white;
    border-color: var(--green-light);
    box-shadow: 0 4px 12px rgba(26, 58, 42, 0.08);
}

.tag-form {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
}

.tag-input-group {
    flex: 1;
    display: flex;
    align-items: center;
}

.tag-input {
    flex: 1;
    padding: 11px 14px;
    border: 1.5px solid rgba(26, 58, 42, 0.12);
    border-radius: 10px;
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-dark);
    background: white;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.tag-input:focus {
    border-color: var(--green-light);
    box-shadow: 0 0 0 3px rgba(61, 122, 87, 0.1);
}

.tag-input::placeholder {
    color: var(--text-light);
}

#create-tag-row {
    background: rgba(61, 122, 87, 0.06);
    border-color: rgba(61, 122, 87, 0.2);
}

#create-tag-row:hover {
    background: rgba(61, 122, 87, 0.1);
    border-color: rgba(61, 122, 87, 0.3);
}

.btn-update-tag {
    padding: 10px 18px;
    background: var(--green);
    color: var(--cream);
    border: none;
    border-radius: 10px;
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.18s;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(26, 58, 42, 0.15);
    letter-spacing: 0.2px;
}

.btn-update-tag:hover {
    background: var(--green-mid);
    box-shadow: 0 4px 12px rgba(26, 58, 42, 0.25);
    transform: translateY(-1px);
}

.btn-delete-tag {
    padding: 10px 18px;
    background: #fdeef0;
    color: var(--rose);
    border: 1.5px solid rgba(200, 69, 90, 0.2);
    border-radius: 10px;
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.18s;
    white-space: nowrap;
    letter-spacing: 0.2px;
}

.btn-delete-tag:hover {
    background: var(--rose);
    color: white;
    border-color: var(--rose);
    transform: translateY(-1px);
}

.btn-add-tag {
    padding: 10px 18px;
    background: var(--green);
    color: var(--cream);
    border: none;
    border-radius: 10px;
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.18s;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(26, 58, 42, 0.15);
    letter-spacing: 0.2px;
}

.btn-add-tag:hover {
    background: var(--green-mid);
    box-shadow: 0 4px 12px rgba(26, 58, 42, 0.25);
    transform: translateY(-1px);
}

.upgrade-prompt {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 28px;
    background: linear-gradient(135deg, rgba(200, 69, 90, 0.08) 0%, rgba(212, 168, 67, 0.06) 100%);
    border: 1.5px solid rgba(200, 69, 90, 0.15);
    border-radius: 16px;
    text-align: center;
}

.upgrade-icon {
    font-size: 48px;
    flex-shrink: 0;
}

.upgrade-text {
    flex: 1;
}

.upgrade-title {
    font-family: 'Outfit', sans-serif;
    font-size: 18px;
    font-weight: 500;
    color: var(--green);
    margin: 0 0 6px 0;
}

.upgrade-description {
    font-size: 14px;
    color: var(--text-mid);
    margin: 0;
}

.upgrade-prompt .btn-primary {
    flex-shrink: 0;
}

@media (max-width: 640px) {
    .edit-tags-page {
        padding: 24px 16px 100px;
        margin-top: 0px;
    }

    .page-title {
        font-size: 24px;
    }

    .form-card {
        padding: 20px;
    }

    .tag-item {
        flex-wrap: wrap;
        padding: 12px;
    }

    .tag-form {
        flex-direction: column;
        width: 100%;
        gap: 8px;
    }

    .tag-input-group {
        width: 100%;
    }

    .btn-update-tag,
    .btn-delete-tag {
        flex: 1;
        width: 100%;
        padding: 10px 12px;
        font-size: 12px;
    }

    .upgrade-prompt {
        flex-direction: column;
        gap: 16px;
        padding: 20px;
        text-align: center;
    }

    .upgrade-prompt .btn-primary {
        width: 100%;
    }
}

li.no-meal-plans {
    background: var(--primary-pink-hover) !important;
    box-shadow: none;
    color: white;
}

li.no-meal-plans:hover {
    background: none !important;
    /* border: 2px solid var(--primary-green) !important; */
    box-shadow: none !important;
    border: 2px solid transparent !important;
}

.make-it-mine {
    display: flex;
    font-size: .7em;
    align-items: center;
    gap: 15px;
}

.make-it-mine img {
    height: 35px;
}

.make-it-mine p {
    max-width: 185px;
    font-style: italic;
    text-align: left;
}

.make-it-mine button {
    flex-grow: 1;
    background: var(--primary-green)
}

.make-it-mine button:hover {
    background: var(--primary-mid-green-hover)
}

.upgrade-required {
    background: var(--secondary-light-grey) !important;
}

.switch-wrapper {
    position: relative;
    display: inline-block;
    margin: 6px 0px;
}

/* Position the lock in the center of the slider circle */
.lock-overlay {
    position: absolute;
    top: -40%;
    left: 42%;
    transform: translate(-50%, -50%);
    pointer-events: none; /* allows click-through to disabled toggle */
    font-size: 0.8rem;
    color: #555;
    z-index: 2;
    user-select: none;
}

/* Optional: reduce opacity to hint it's disabled */
.switch-wrapper.locked .slider {
    opacity: 0.6;
}

.disabled-meal-box {
    background: var(--secondary-mid-grey)
}

.disabled-meal-box .star {
    color: var(--primary-grey)
}

.no-tags-message {
    font-weight: 400;
    font-size: .7em;
    font-style: italic;
    margin-left: 10px;
}

.no-tags-message a {
    color: var(--primary-green);
    font-size: 1em;
    font-style: italic;
}

.form-group:has(.no-tags-message) select {
    height: 50px;
}

.new-user-button {
    background: var(--primary-green);
}

.new-user-button:hover {
    background: var(--primary-mid-green-hover)
}

.ingredient-labels {
    display: flex;
    justify-content: space-between;
    width: 95%;
    color: var(--primary-black);
    font-size: .9em;
    margin: 20px auto 10px;
    
}

.ingredient-labels p {
    margin: 0;
}

.ingredient-labels p span {
    border: 1px black solid;
    border-radius: 50%;
    padding: 0px 5px;
    font-weight: 700;
    font-size: .8em;
    cursor: pointer;
}


.ingredient-modal {
    display: flex;
    justify-content: center;
    align-items: center;
    position: fixed;
    z-index: 1001;
    /* left: 0;
    top: 0; */
    height: 100%;
    width: 100%;
    background-color: rgba(0,0,0,0.5);
}

.ingredient-modal.hidden {
    display: none;
}

.modal-container {
    color: white;
}

.modal-container h1 {
    color: white;
}

.home-modal-content,
.ingredient-modal-content {
    background-color: var(--primary-green);
    padding: 20px;
    border-radius: 8px;
    font-size: 1em;
    width: 70%;
    margin: auto;
    text-align: left;

}

.ingredient-modal-content {
    max-width: 650px;
    width: 90%;
    position: relative;
}

.close-btn {
    float: right;
    cursor: pointer;
    font-size: 20px;
}

.modal-content h2 {
    margin: 0px;
}

.modal-content p.subhead {
    margin-top: 0px;
    font-size: .8em;
}

.ingredient-modal-content .subhead {
    text-align: center;
}

.home-modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}
.home-modal.hidden {
    display: none;
}

.home-modal-content {
    background: var(--primary-green);
    border-radius: 10px;
    padding: 2rem;
    width: 90%;
    max-width: 650px;
    position: relative;
    text-align: center;

    max-height: 80vh;      /* Limit height to viewport */
    overflow-y: auto;      /* Allow vertical scrolling if needed */
    color: white;
}

.home-modal-page {
    display: none;
    font-size: 1.1rem;
}
.home-modal-page:not(.hidden) {
    display : block;
    padding: 0px 20px;
}

@media (max-width: 786px) {
    .home-modal-content {
            padding: 2rem .5rem;
    }

    .home-modal-page:not(.hidden) {
        padding: 0px 30px;
    }
}

.home-modal-nav {
    margin-top: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.home-modal-nav button {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
}

.home-modal-close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    border-radius: 50%;
    padding: 0px 10px;
}

.meals-default-icon,
.side-dish-icon {
    height: 20px;
    margin-bottom: -3px;
}

.tooltip {
    position: relative;
    display: inline-block;
    cursor: pointer;
}

.tooltip .tooltip-text {
    visibility: hidden;
    background-color: #333;
    color: #fff;
    text-align: left;
    border-radius: 5px;
    padding: 6px 10px;
    position: absolute;
    z-index: 10;
    bottom: 125%; /* place above the icon */
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    white-space: nowrap;
    transition: opacity 0.2s;
    font-size: 0.8rem;
}

.tooltip .tooltip-text::after {
    content: "";
    position: absolute;
    top: 100%; /* bottom of tooltip */
    left: 50%;
    margin-left: -5px;
    border-width: 6px;
    border-style: solid;
    border-color: #333 transparent transparent transparent;
}

.tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

.icon-key {
    font-size: .8em;
    width: 58%;
    margin: 50px auto;
}

.icon-key img {
    margin-right: 8px;
}

@media (max-width: 786px) {
    .icon-key {
        width: 90%;
    }
}

.meal-plan-error-flash {
    background: var(--primary-green);
    border-radius: 5px;
    margin: 20px auto;
    width: 60%;
    padding: 20px;
    text-align: center;
}

.edit-meal-plan-container .meal-meta {
    margin: 0px;
    flex-direction: column;
    font-size: .8em;
    gap: 0px;
}

.category-info {
    font-size: .6em;
    text-align: left;;
}

.onboarding-emoji {
    font-size: 1.5em;
    vertical-align: middle;
}

.modal-wordmark {
    color: var(--white);
    position: relative;
    top: 1px;
    font-size: 1.2em;
}


.modal-text {
    width: 70%;
    padding: 0px 30px;
    margin-top: 20px;
}

.modal-text ul {
    width: 60%;
    margin: 0 auto;
    text-align: left;
}

.modal-text p:last-child {
    margin-bottom: 0px;
}

.home-modal-page .meals-preview,
.home-modal-page .meal-plan-preview,
.home-modal-page .quantity-dots-preview {
    display: flex;
    font-size: .9em;
    align-items: center;
    min-height: 350px;
}

@media (max-width: 786px) {
    .home-modal-page .meals-preview,
    .home-modal-page .meal-plan-preview,
    .home-modal-page .quantity-dots-preview {
        flex-direction: column;
        align-items: center;
    }


    .home-modal-page .meals-preview .modal-text,
    .home-modal-page .meal-plan-preview .modal-text,
    .home-modal-page .quantity-dots-preview .modal-text {
        width: 100%;
    }
}

.home-modal-page .meals-preview .modal-image,
.home-modal-page .meal-plan-preview .modal-image,
.home-modal-page .quantity-dots-preview .modal-image {
    align-items: center;
    margin: 15px auto auto 20px;
    flex-grow: 1;
}

.home-modal-page .meals-preview img,
.home-modal-page .meal-plan-preview img,
.home-modal-page .quantity-dots-preview img {
    max-height: 350px;
}

@media (max-width: 786px) {
    .meal-plan-container h1 {
        font-size: 1.8em;
    }
}

.home-modal-page h2 {
    margin: 0px;
}

.image-sequence-1,
.image-sequence-2,
.image-sequence-3 {
    position: relative;
    width: 300px; /* adjust as needed */
    height: 250px;
}

.image-sequence-1 img,
.image-sequence-2 img,
.image-sequence-3 img {
    position: absolute;
    top: 0;
    left: 30px;
    opacity: 0;
}

@media (max-width: 786px) {

    .home-modal-page .meals-preview .modal-image,
    .home-modal-page .meal-plan-preview .modal-image,
    .home-modal-page .quantity-dots-preview .modal-image {
        margin: auto;
    }

    .home-modal-page .meals-preview img,
    .home-modal-page .meal-plan-preview img,
    .home-modal-page .quantity-dots-preview img {
        max-height: 250px;
    }


    .image-sequence-1,
    .image-sequence-2,
    .image-sequence-3 {
        position: relative;
        width: 300px;
        height: 275px;
        right: -18%;
        top: 30px;
    }
    
}

.image-sequence-1 img {
    animation: fadeImagesOne 9s infinite ease-in-out;
}

.image-sequence-2 img {
    animation: fadeImagesTwo 12s infinite ease-in-out;
}

/* image-rotation: 2 images, rotate every 6s instead of 12s total */
.image-sequence-3 img {
    animation: fadeImagesThree 6s infinite ease-in-out;
}

/* image-sequence: 3 images */
.image-sequence-1 img:nth-child(1) { animation-delay: 0s; }
.image-sequence-1 img:nth-child(2) { animation-delay: 3s; }
.image-sequence-1 img:nth-child(3) { animation-delay: 6s; }

/* image-sequence: 4 images */
.image-sequence-2 img:nth-child(1) { animation-delay: 0s; }
.image-sequence-2 img:nth-child(2) { animation-delay: 3s; }
.image-sequence-2 img:nth-child(3) { animation-delay: 6s; }
.image-sequence-2 img:nth-child(4) { animation-delay: 9s; }

/* image-sequence: 2 images */
.image-sequence-3 img:nth-child(1) { animation-delay: 0s; }
.image-sequence-3 img:nth-child(2) { animation-delay: 3s; }


/* Shared keyframes for three-image sequence */
@keyframes fadeImagesOne {
    0%   { opacity: 0; }
    5%   { opacity: 1; }
    33%  { opacity: 1; }
    38%  { opacity: 0; }
    100% { opacity: 0; }
}

/* Shared keyframes for four-image sequence */
@keyframes fadeImagesTwo {
    0% { opacity: 0; }
    8% { opacity: 1; }
    25% { opacity: 1; }
    33% { opacity: 0; }
    100% { opacity: 0; }
}

/* Keyframes for two-image rotation */
@keyframes fadeImagesThree {
    0% { opacity: 0; }
    8% { opacity: 1; }
    48% { opacity: 1; }
    56% { opacity: 0; }
    100% { opacity: 0; }
}



.modal-subscription-lists {
    display: flex;
    margin: 30px auto;
    justify-content: center;
}

.modal-subscription-lists .list-title {
    text-align: left;
    font-variant: small-caps;
    margin-top: 0px;
    font-weight: 700;
}

.modal-subscription-lists ul {
    list-style-position: inside;
    padding-left: 0;
    margin-bottom: 0px;
}

.modal-subscription-lists li {
    font-size: .75em;
    text-align: left;
    margin-top: 8px;
}

.subscription-list {
    width: 50%;
    padding-left: 15px;
}

.subscription-list:first-child {
    width: 40%;
}

.subscription-list:nth-child(2) {
    border-left: 1px solid white;
    padding-left: 30px;
}

@media (max-width: 786px) {
    .modal-subscription-lists {
        flex-direction: column;
        padding-left: 30px;
    }

    .subscription-list:first-child {
        width: 100%;
        margin-bottom: 30px;
    }

    .subscription-list {
        width: 100%;
        padding-left: 0px;
    }

    .subscription-list:nth-child(2) {
        border-left: none;
        padding-left: 0px;
        
    }

}

#free-plan-plus {
    font-weight: 600;
}

.choose-plan {
    text-align: left;
    margin-left: 30px;
    margin-top: 0px;
    margin-bottom: 20px;
}

.modal-subscription-box {
    background-color: var(--primary-green-hover);
    border-radius: 10px;
    padding: 20px 10px;
}

.modal-subscription-buttons {
    display: flex;
    justify-content: center;
    gap: 120px;
    margin-top: 15px;
    margin-left: -10%;
}

.start-free {
    background-color: var(--primary-grey);
}

.start-free:hover {
    background-color: var(--primary-grey-hover);
}

@media (max-width: 786px) {
    
    .start-free {
        display: none;
    }

    .modal-subscription-buttons {
        margin-left: 0px;
    }
}

.modal-upgrade {
    background-color: var(--primary-pink);
    border-radius: 5px;
    color: white;
    font-size: .8em;
    padding: 10px 20px;
}

.modal-upgrade:hover {
    background-color: var(--primary-pink-hover);
}

ul.custom-checkmarks {
    list-style: none;
    padding-left: 0;
}

ul.custom-checkmarks li {
    position: relative;
    padding-left: 2.5em;
    margin-bottom: 0.5em;
}

/* Blue circle with checkmark */
ul.custom-checkmarks li.blue::before,
ul.custom-checkmarks li.green::before {
    content: "✔";
    position: absolute;
    left: 0;
    top: 0.1em;
    width: 1.5em;
    height: 1.5em;
    line-height: 1.5em;
    border-radius: 50%;
    text-align: center;
    font-size: 0.9em;
    font-weight: bold;
    color: white;
}

ul.custom-checkmarks li.blue::before {
    background-color: var(--primary-green); /* blue */
}

ul.custom-checkmarks li.green::before {
    background-color: var(--green); /* green */
}

.home-modal-nav button.inactive {
    color: var(--primary-green);
    pointer-events: none; /* Prevent clicking */
}

.home-modal-page:has(.modal-subscription-lists) {
    padding: 0px 0px;
}

@media (max-width: 786px) {
    .home-modal-page:has(.modal-subscription-lists) {
        padding: 20px 0px;
    }

    .home-modal-page:has(.modal-subscription-lists) h2 {
        margin: auto 15px;
    }
}

.help-modal-icon {
    position: relative;
    top: 0;
    right: -45%;
}

.help-icon img {
    height: 30px;
}

@media (max-width: 786px) {
    .help-icon img {
        height: 20px;
    }
}

.onboarding-opt-out {
    margin-top: 2rem;
    text-align: center;
}

.submit-opt-out {
    background: none;
    margin-left: 1em;
    padding: 0.4em 1em;
    font-size: 0.7em;
    font-weight: 600;
    text-decoration: underline;
}


.free-trial-link {
    background-color: var(--primary-pink);
    border-radius: 5px;
    padding: 10px 20px;
    color: white;
}

.free-trial-link:hover {
    background-color: var(--primary-pink-hover);
}

#freeTrialModal {
    position: fixed;
    top: -30px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.free-trial-modal-content {
    background: var(--primary-green);
    padding: 20px;
    border-radius: 8px;
    width: 300px;
    text-align: center;
}

#freeTrialModal.hidden {
    display: none;
}

#freeTrialCodeInput {
    margin-bottom: 15px;
}

.footer-deets a {
    color: var(--primary-green)
}

.meal-checkbox:checked {
    accent-color: var(--primary-green)
}

/* ═══════════════════════════════════════════════════════════════ */
/* ░░░░░░░░░░░░░░░  HOME PAGE REDESIGN STYLES  ░░░░░░░░░░░░░░░░░░ */
/* ═══════════════════════════════════════════════════════════════ */

:root {
    --green: #1a3a2a;
    --green-mid: #2c5a40;
    --green-light: #3d7a57;
    --cream: #f5f0e8;
    --cream-dark: #ede6d6;
    --rose: #c8455a;
    --rose-light: #e8687a;
    --gold: #d4a843;
    --text-dark: #1a2620;
    --text-mid: #4a6258;
    --text-light: #8aaa98;
}

/* ── HERO STRIP ── */
.hero-strip {
    margin-top: 0;
    background: var(--green);
    padding: 93px 32px 44px 32px;
    position: relative;
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
}

.hero-strip::before {
    content: '';
    position: absolute;
    top: -60px;
    right: -60px;
    width: 280px;
    height: 280px;
    background: radial-gradient(circle, rgba(200, 69, 90, 0.25) 0%, transparent 70%);
    pointer-events: none;
}

.hero-strip::after {
    content: '';
    position: absolute;
    bottom: -40px;
    left: 20%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(61, 122, 87, 0.4) 0%, transparent 70%);
    pointer-events: none;
}

.hero-greeting {
    font-family: 'DM Sans', sans-serif;
    font-size: 12px;
    font-weight: 500;
    color: var(--green-light);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.hero-headline {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(22px, 7vw, 36px);
    font-weight: 300;
    color: var(--cream);
    line-height: 1.15;
    margin-bottom: 6px;
}

.hero-headline em {
    font-style: italic;
    color: var(--rose-light);
}

.hero-sub {
    font-size: 13px;
    color: var(--text-light);
    font-weight: 300;
}

/* ── QUICK STATS ── */
.stats-row {
    display: flex;
    gap: 12px;
    padding: 20px 32px;
    background: var(--green);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    width: 100%;
    box-sizing: border-box;
}

.stat-pill {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 12px 18px;
    flex: 1;
    text-align: center;
}

.stat-num {
    font-family: 'Outfit', sans-serif;
    font-size: 26px;
    font-weight: 500;
    color: var(--cream);
    line-height: 1;
    margin-bottom: 3px;
}

.stat-label {
    font-size: 11px;
    color: var(--text-light);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* ── MAIN CONTENT ── */
.main {
    padding: 28px 20px 120px;
    display: flex;
    flex-direction: column;
    gap: 28px;
    max-width: 520px;
    margin: 20px auto 0;
}

.main-content-wrapper {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.main-left,
.main-right {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

/* Mobile: Generate CTA to appear first */
.main-right {
    order: 1;
}

.main-left {
    order: 2;
}

/* Desktop 2-column layout */
@media (min-width: 1024px) {
    .main {
        max-width: 1200px;
        padding: 28px 40px 120px;
        margin: 60px auto 0;
    }

    .main-content-wrapper {
        flex-direction: row;
        gap: 40px;
    }

    .main-left {
        flex: 1;
        order: 1;
    }

    .main-right {
        flex: 1;
        order: 2;
    }
}

/* ── SECTION HEADER ── */
.section-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 14px;
}

.section-title {
    font-family: 'Outfit', sans-serif;
    font-size: 20px;
    font-weight: 500;
    color: var(--green);
    letter-spacing: -0.3px;
}

.section-link {
    font-size: 12px;
    font-weight: 500;
    color: var(--rose);
    text-decoration: none;
    letter-spacing: 0.3px;
    transition: all 0.2s;
}

.section-link:hover {
    color: var(--rose-light);
}

/* ── MEAL CARDS ── */
.meal-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* .meal-card {
    background: white;
    border-radius: 14px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 1px 3px rgba(26, 58, 42, 0.07), 0 4px 12px rgba(26, 58, 42, 0.04);
    transition: transform 0.18s, box-shadow 0.18s;
    cursor: pointer;
    animation: slideUp 0.4s ease both;
    text-align: left;
} */

.meal-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(26, 58, 42, 0.12);
}

.meal-card:nth-child(1) { animation-delay: 0.05s; }
.meal-card:nth-child(2) { animation-delay: 0.10s; }
.meal-card:nth-child(3) { animation-delay: 0.15s; }
.meal-card:nth-child(4) { animation-delay: 0.20s; }
.meal-card:nth-child(5) { animation-delay: 0.25s; }

@keyframes slideUp {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
}

.meal-emoji {
    width: 42px;
    height: 42px;
    background: var(--cream);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.meal-info {
    flex: 1;
    min-width: 0;
}

.meal-tags {
    display: flex;
    gap: 5px;
}

.tag {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.3px;
    padding: 2px 7px;
    border-radius: 20px;
    text-transform: uppercase;
}

.tag-cuisine {
    background: var(--color-lavendar);
    color: var(--color-lavendar-dark);
}

.tag-type {
    background: #fdeef0;
    color: var(--rose);
}

.meal-fav {
    font-size: 22px;
    opacity: 0.85;
}

/* ── ADD BUTTON ── */
.add-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 13px;
    border-radius: 14px;
    border: 1.5px dashed rgba(26, 58, 42, 0.2);
    background: transparent;
    color: var(--text-mid);
    font-size: 13px;
    font-weight: 500;
    font-family: 'DM Sans', sans-serif;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 4px;
}

.add-btn:hover {
    border-color: var(--green);
    color: var(--green);
    background: rgba(26, 58, 42, 0.03);
}

/* ── PLAN CARDS ── */
.plan-card {
    background: var(--green);
    border-radius: 16px;
    padding: 16px 18px 16px 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    cursor: pointer;
    transition: transform 0.18s, box-shadow 0.18s;
    animation: slideUp 0.4s ease both;
    position: relative;
    overflow: hidden;
}

.plan-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(26, 58, 42, 0.25);
}

.plan-card:nth-child(1) { animation-delay: 0.1s; }
.plan-card:nth-child(2) { animation-delay: 0.18s; }

.plan-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--rose-light);
    flex-shrink: 0;
    box-shadow: 0 0 0 3px rgba(232, 104, 122, 0.25);
}

.plan-info {
    flex: 1;
}

.plan-name {
    font-family: 'Outfit', sans-serif;
    font-size: 16px;
    font-weight: 500;
    color: var(--cream);
    margin-bottom: 2px;
}

.plan-meta {
    font-size: 11px;
    color: var(--text-light);
    letter-spacing: 0.3px;
}

.plan-arrow {
    font-size: 18px;
    color: rgba(245, 240, 232, 0.3);
}

/* ── GENERATE CTA ── */
.generate-cta {
    background: var(--rose);
    border-radius: 18px;
    padding: 22px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: transform 0.18s, box-shadow 0.18s;
    box-shadow: 0 4px 20px rgba(200, 69, 90, 0.3);
    animation: slideUp 0.5s ease 0.3s both;
    width: 100%;
    max-width: 560px;
    margin: 0 auto 28px;
}

.generate-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(200, 69, 90, 0.4);
}

@media (max-width: 640px) {
    .generate-cta {
        max-width: 90%;
        padding: 18px 20px;
        margin: 0 auto 20px;
    }
}

.cta-text-small {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: rgba(245, 240, 232, 0.7);
    margin-bottom: 4px;
}

.cta-text-big {
    font-family: 'Outfit', sans-serif;
    font-size: 22px;
    font-weight: 500;
    color: var(--cream);
    letter-spacing: -0.3px;
}

.cta-icon {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
}

/* ── QUICK ACTIONS ── */
.quick-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.quick-action {
    background: white;
    border-radius: 14px;
    padding: 16px;
    cursor: pointer;
    transition: transform 0.18s, box-shadow 0.18s;
    box-shadow: 0 1px 3px rgba(26, 58, 42, 0.07);
    animation: slideUp 0.4s ease 0.35s both;
}

.quick-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(26, 58, 42, 0.1);
}

.qa-icon {
    font-size: 24px;
    margin-bottom: 8px;
}

.qa-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 2px;
}

.qa-sub {
    font-size: 11px;
    color: var(--text-light);
}

/* ── BOTTOM NAV ── */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(245, 240, 232, 0.92);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--color-border);
    display: flex;
    padding: 10px 0 18px;
    z-index: 50;
}

.bn-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    cursor: pointer;
    padding: 4px 0;
    transition: all 0.2s;
}

.bn-icon {
    font-size: 20px;
}

.bn-label {
    font-size: 10px;
    font-weight: 500;
    color: var(--color-text-light);
    letter-spacing: 0.3px;
}

.bn-item.active .bn-label {
    color: var(--color-green);
}

.bn-item.active .bn-icon {
    filter: none;
}

.bn-item:hover {
    background: rgba(26, 58, 42, 0.02);
}

.bn-center {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: -22px;
}

.bn-fab {
    width: 64px;
    height: 64px;
    background: var(--color-green);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    box-shadow: 0 4px 16px rgba(26, 58, 42, 0.35);
    cursor: pointer;
    transition: transform 0.18s, box-shadow 0.18s;
}

.bn-fab:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 20px rgba(26, 58, 42, 0.45);
}

.no-meals-home,
.no-meal-plans {
    color: var(--text-light);
    font-style: italic;
    padding: 20px;
    text-align: center;
}

/* ── HOME PAGE ONLY ── */
body:has(.main) .menu-bar {
    display: none !important;
}

body:has(.main) footer {
    display: none !important;
}

/* ── NAV (Fixed Top) ── */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 32px;
    background: rgba(245, 240, 232, 0.92);
    backdrop-filter: blur(12px);
    /* border-bottom: 1px solid var(--color-border); */
    box-shadow: 1px 1px 6px var(--color-green)
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.nav-logo-img {
    width: 36px;
    height: 36px;
    object-fit: contain;
}

.nav-logo-text {
    font-family: 'Outfit', sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: var(--color-green);
    letter-spacing: -0.5px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-links a {
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    color: var(--color-text-mid);
    padding: 7px 14px;
    border-radius: 20px;
    transition: all 0.2s;
    letter-spacing: 0.2px;
}

.nav-links a:hover {
    background: var(--color-cream-dark);
    color: var(--color-green);
}

.nav-links a.active {
    background: var(--color-green);
    color: var(--color-cream);
}

.nav-dice-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--color-green);
    color: white;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    padding: 0 !important;
    margin-right: 8px;
    transition: all 0.2s;
    font-size: 20px !important;
}

.nav-dice-btn:hover {
    background: var(--color-rose) !important;
    transform: scale(1.08);
}

/* Mobile: hide nav links */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
}

/****************************
***** MEAL EDIT PAGE CSS *****
*****************************/

/* Page Layout */
.page {
    margin-top: 73px;
    padding: 32px 24px 60px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

/* Hide menu bar on pages using new layout */
body:has(.page) .menu-bar {
    display: none;
}

/* Back Button */
.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    color: var(--green);
    background: var(--cream-dark);
    text-decoration: none;
    transition: all 0.2s;
    border: none;
    position: static;
    margin-bottom: 16px;
    z-index: 50;
    margin-left: -60px;

}

.page .btn-back:hover {
    background: var(--cream);
    color: var(--green-light);
}

/* Back button for edit-tags-page and bulk-add-page */
.edit-tags-page .btn-back,
.bulk-add-page .btn-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    color: var(--green);
    background: var(--cream-dark);
    text-decoration: none;
    transition: all 0.2s;
    border: none;
    position: static;
    margin-bottom: 16px;
    z-index: 50;
}

.edit-tags-page .btn-back:hover,
.bulk-add-page .btn-back:hover {
    background: var(--cream);
    color: var(--green-light);
}

/* Back button for meal-plan-page */
.meal-plan-page .btn-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    color: var(--green);
    background: var(--cream-dark);
    text-decoration: none;
    transition: all 0.2s;
    border: none;
    position: static;
    margin-bottom: 16px;
    z-index: 50;
}

.meal-plan-page .btn-back:hover {
    background: var(--cream);
    color: var(--green-light);
}

/* Mobile responsive back buttons */
@media (max-width: 640px) {
    .btn-back,
    .edit-tags-page .btn-back,
    .bulk-add-page .btn-back,
    .meal-plan-page .btn-back {
        padding: 8px 12px;
        font-size: 11px;
        border-radius: 16px;
        margin-left: 0px;
    }
}

.page-header {
    margin-bottom: 32px;
    animation: fadeDown 0.4s ease both;
    display: flex;
    flex-direction: column;
}

/* Center header only on new meal creation page (single column) */
.page:has(.grid > div:first-child:last-child) .page-header {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.page-eyebrow {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-light);
    margin-bottom: 6px;
}

.page-title {
    font-family: 'Outfit', sans-serif;
    font-size: 32px;
    font-weight: 500;
    color: var(--green);
    letter-spacing: -0.5px;
    line-height: 1.1;
    margin: 0;
    text-align: left;
}

.page-title em {
    font-style: italic;
    color: var(--rose);
}

/* Two-Column Grid */
.grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: start;
}

.grid > div:first-child:last-child {
    grid-column: 1 / -1;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.grid > div:first-child:last-child .card {
    width: 750px;
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 680px) {
    .grid {
        grid-template-columns: 1fr;
    }
}

/* Card */
.card {
    background: white;
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(26,58,42,0.07), 0 4px 16px rgba(26,58,42,0.04);
    animation: slideUp 0.4s ease both;
}

.card:nth-child(1) {
    animation-delay: 0.05s;
}

.card:nth-child(2) {
    animation-delay: 0.12s;
}

.card-title {
    font-family: 'Outfit', sans-serif;
    font-size: 17px;
    font-weight: 500;
    color: var(--green);
    margin-bottom: 20px;
    margin-top: 0;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(26,58,42,0.12);
}

h3.card-title {
    margin: 0 0 20px 0;
}

/* Star Button */
.star-btn {
    transition: transform 0.2s, opacity 0.2s;
    opacity: 1;
    color: var(--black);
}

.star-btn:hover {
    transform: scale(1.15);
    opacity: 1;
    /* color: var(--rose); */
}

.star-btn.favorited {
    /* color: var(--rose); */
}

/* Form Fields */
.field {
    margin-bottom: 18px;
}

.field:last-of-type {
    margin-bottom: 0;
}

.field-label {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-light);
    margin-bottom: 7px;
    display: block;
}

.field-input {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid rgba(26,58,42,0.12);
    border-radius: 12px;
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    color: var(--text-dark);
    background: var(--cream);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    -webkit-appearance: none;
    appearance: none;
}

.field-input:focus {
    border-color: var(--green-light);
    box-shadow: 0 0 0 3px rgba(61,122,87,0.1);
}

.field-input.large {
    font-family: 'Outfit', sans-serif;
    font-size: 18px;
    font-weight: 500;
    padding: 13px 16px;
}

textarea.field-input {
    resize: vertical;
    min-height: 80px;
    line-height: 1.5;
    font-family: 'DM Sans', sans-serif;
}

/* Select Dropdown */
select.field-input {
    font-style: normal;
    padding-right: 36px;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%234a6258' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 20px;
    cursor: pointer;
}

select.field-input::-ms-expand {
    display: none;
}

/* Two-Column Fields */
.field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 18px;
}

/* Category Pills */
.pill-group {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.pill {
    padding: 6px 12px;
    border-radius: 18px;
    font-size: 12px;
    font-weight: 500;
    border: 1.5px solid rgba(26,58,42,0.12);
    background: #f9f8f6;
    color: var(--text-mid);
    cursor: pointer;
    transition: all 0.18s;
    white-space: nowrap;
}

.pill:hover {
    border-color: var(--green-light);
    color: var(--green);
}

.pill.active {
    background: var(--green);
    border-color: var(--green);
    color: var(--cream);
}

/* Tags */
.tags-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 0px 12px;
    border: 1.5px solid rgba(26,58,42,0.12);
    border-radius: 12px;
    background: var(--cream);
    min-height: 38px;
    align-items: center;
    cursor: text;
    transition: border-color 0.2s;
}

.tags-wrap:focus-within {
    border-color: var(--green-light);
}

.tag-chip {
    display: flex;
    align-items: center;
    gap: 4px;
    background: var(--green);
    color: var(--cream);
    border-radius: 20px;
    padding: 3px 10px;
    font-size: 12px;
    font-weight: 500;
}

.tag-chip-x {
    cursor: pointer;
    opacity: 0.6;
    font-size: 14px;
    line-height: 1;
}

.tag-chip-x:hover {
    opacity: 1;
}

.tags-input {
    border: none !important;
    background: transparent !important;
    outline: none !important;
    box-shadow: none !important;
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    color: var(--text-dark);
    flex: 1;
    min-width: 80px;
    padding: 0;
}

/* Toggle Switch */
.toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-top: 1px solid var(--border);
    margin-top: 6px;
}

.toggle-info {}

.toggle-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-dark);
}

.toggle-sub {
    font-size: 11px;
    color: var(--text-light);
    margin-top: 1px;
}

.toggle {
    position: relative;
    width: 44px;
    height: 26px;
    flex-shrink: 0;
}

.toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-track {
    position: absolute;
    inset: 0;
    background: #ede6d6;
    border-radius: 13px;
    cursor: pointer;
    transition: background 0.2s;
    border: 1.5px solid rgba(26,58,42,0.12);
}

.toggle-track::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    background: white;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: transform 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.toggle input:checked + .toggle-track {
    background: var(--green);
    border-color: var(--green);
}

.toggle input:checked + .toggle-track::after {
    transform: translateX(18px);
}

/* Buttons */
.actions {
    display: flex;
    gap: 10px;
    margin-top: 12px;
    flex-wrap: nowrap;
    align-items: center;
}

.btn {
    padding: 13px 24px;
    border: none;
    border-radius: 14px;
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.18s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    letter-spacing: 0.2px;
    flex: 1;
    white-space: nowrap;
}

.btn-primary {
    background: var(--green);
    color: var(--cream);
    box-shadow: 0 4px 14px rgba(26,58,42,0.25);
    flex: 2;
}

.btn-primary:hover {
    background: var(--green-mid);
    box-shadow: 0 6px 20px rgba(26,58,42,0.35);
    transform: translateY(-1px);
}

.btn-danger {
    background: white;
    color: var(--rose);
    border: 1.5px solid rgba(200,69,90,0.2);
}

.btn-danger:hover {
    background: #fdeef0;
    border-color: var(--rose);
    transform: translateY(-1px);
}

.btn-ghost {
    background: transparent;
    color: var(--green-mid);
    border: 1.5px solid var(--green-mid);
}

.btn-ghost:hover {
    /* background: var(--green); */
    background: #c2dec5;
    /* color: var(--cream); */
    border-color: var(--green);
    transform: translateY(-1px);
}

/* Ingredients Card */
.ingredients-card {
    background: var(--green);
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 4px 24px rgba(26,58,42,0.2);
    position: relative;
    overflow: hidden;
}

.ingredients-card::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(200,69,90,0.2) 0%, transparent 70%);
    pointer-events: none;
}

.ingredients-card .card-title {
    color: var(--cream);
    border-bottom-color: rgba(255,255,255,0.1);
}

/* Ingredient Search */
.ingredient-search-container {
    position: relative;
    margin-bottom: 16px;
}

.ingredient-search {
    position: relative;
    margin-bottom: 0;
}

.ingredient-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    opacity: 0.5;
}

.ingredient-search input {
    width: 100%;
    padding: 10px 14px 10px 34px;
    border: 1.5px solid rgba(255,255,255,0.12);
    border-radius: 12px;
    background: rgba(255,255,255,0.08);
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    color: var(--cream);
    outline: none;
    transition: border-color 0.2s, background 0.2s;
}

.ingredient-search input::placeholder {
    color: rgba(245,240,232,0.35);
}

.ingredient-search input:focus {
    border-color: rgba(255,255,255,0.25);
    background: rgba(255,255,255,0.12);
}

.ingredient-suggestions {
    position: absolute;
    background: var(--green);
    /* border: 1px solid rgba(255,255,255,0.12); */
    border-top: none;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
    z-index: 1000;
    max-height: 200px;
    overflow-y: auto;
    width: 100%;
    top: 100%;
    left: 0;
    margin-top: 2px;
    padding: 4px 0;
    display: none;
}

.ingredient-suggestions .suggestion-item {
    padding: 8px 14px;
    cursor: pointer;
    font-size: 13px;
    color: var(--cream);
    margin: 0;
    transition: background 0.2s;
    background: var(--green-mid);
}

.ingredient-suggestions .suggestion-item:hover {
    background: rgba(255,255,255,0.1);
}

.ingredient-suggestions .suggestion-add-ingredient {
    border-top: 1px solid rgba(255,255,255,0.1);
    margin-top: 4px;
    padding-top: 10px;
    padding-bottom: 10px;
    background: var(--green-mid);
}

.ingredient-suggestions .suggestion-add-ingredient:hover {
    background: rgba(255,255,255,0.12);
}

/* Ingredient Box Styling */
.ingredients-list .ingredient-box {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 10px;
    transition: background 0.2s;
}

.ingredients-list .ingredient-box:hover {
    background: rgba(255,255,255,0.08);
}

.ingredients-list .ingredient-name {
    flex: 1;
}

.ingredients-list .ingredient-name p {
    margin: 0;
    font-size: 13px;
    color: var(--cream);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ingredients-list .ingredient-category {
    font-size: 11px;
    color: rgba(245,240,232,0.4);
    margin-top: 2px;
}

.ingredients-list .ingredient-dots {
    display: flex;
    gap: 5px;
    align-items: center;
}

.ingredients-list .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 1.5px solid rgba(245,240,232,0.3);
    background: transparent;
    cursor: pointer;
    transition: all 0.15s;
    padding: 0;
}

.ingredients-list .dot:hover {
    border-color: rgba(245,240,232,0.6);
}

.ingredients-list .dot.filled {
    background: var(--rose-light);
    border-color: var(--rose-light);
    box-shadow: 0 0 4px rgba(232,104,122,0.4);
}

.ingredients-list .btn-remove {
    background: none;
    border: none;
    color: rgba(245,240,232,0.25);
    cursor: pointer;
    font-size: 16px;
    padding: 0;
    transition: color 0.2s;
}

.ingredients-list .btn-remove:hover {
    color: var(--rose-light);
}

/* Ingredient List */
.ingredient-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 2px;
}

.ingredients-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 2px;
}

.ingredient-list::-webkit-scrollbar {
    width: 3px;
}

.ingredient-list::-webkit-scrollbar-track {
    background: transparent;
}

.ingredient-list::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.15);
    border-radius: 3px;
}

.ingredient-row {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    padding: 10px 12px;
    transition: background 0.18s;
}

.ingredient-row:hover {
    background: rgba(255,255,255,0.1);
}

.ingredient-info {
    flex: 1;
    min-width: 0;
}

.ingredient-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--cream);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ingredient-category {
    font-size: 11px;
    color: rgba(245,240,232,0.45);
    margin-top: 1px;
}

/* Quantity Controls */
.qty-control {
    display: flex;
    align-items: center;
    gap: 5px;
}

.qty-dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    border: 1.5px solid rgba(245,240,232,0.35);
    background: transparent;
    cursor: pointer;
    transition: all 0.15s;
}

.qty-dot.filled {
    background: var(--rose-light);
    border-color: var(--rose-light);
    box-shadow: 0 0 6px rgba(232,104,122,0.5);
}

.qty-dot:hover {
    border-color: rgba(245,240,232,0.6);
}

.qty-label {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.5px;
    color: rgba(245,240,232,0.5);
    min-width: 32px;
    text-align: right;
    text-transform: uppercase;
}

.qty-level-2 .qty-label {
    color: var(--rose-light);
}

.qty-level-3 .qty-label {
    color: var(--gold);
}

.remove-btn {
    background: none;
    border: none;
    color: rgba(245,240,232,0.25);
    cursor: pointer;
    font-size: 14px;
    padding: 0 4px;
    transition: color 0.2s;
}

.remove-btn:hover {
    color: var(--rose-light);
}

/* Quantity Legend */
.qty-legend {
    display: flex;
    gap: 14px;
    margin-bottom: 16px;
    padding: 10px 12px;
    background: rgba(255,255,255,0.05);
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.07);
}

.qty-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: rgba(245,240,232,0.5);
}

.qty-legend-dots {
    display: flex;
    gap: 3px;
}

.legend-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(245,240,232,0.2);
    border: 1px solid rgba(245,240,232,0.2);
}

.legend-dot.on {
    background: var(--rose-light);
    border-color: var(--rose-light);
}

/* Animations */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 680px) {
    .page {
        padding: 24px 16px 60px;
    }

    .page-title {
        font-size: 24px;
    }

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

    .field-row {
        grid-template-columns: 1fr;
    }

    .card {
        padding: 16px;
    }

    .actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .ingredient-list {
        max-height: 300px;
    }
}

@media (max-width: 768px) {
    nav {
        padding: 12px 16px;
    }

    .nav-logo-text {
        font-size: 18px;
    }

    .nav-links {
        display: none;
    }
}

/* ────────────────────────────────────────────────────
   PAGE REDESIGN STYLES (from dinnr-meals.html)
   ──────────────────────────────────────────────────── */

.page {
    margin-top: 73px;
    padding: 36px 28px 100px;
    max-width: 960px;
    margin-left: auto;
    margin-right: auto;
}

/* PAGE HEADER */
.page-header {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    animation: fadeDown 0.4s ease both;
    gap: 20px;
}

.page-header > div:first-child {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.page-eyebrow {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--color-text-light);
    margin-bottom: 5px;
}

.page-title {
    font-family: 'Outfit', sans-serif;
    font-size: 32px;
    font-weight: 500;
    color: var(--color-green);
    letter-spacing: -0.5px;
    line-height: 1.1;
}

.header-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* BUTTONS */
.btn {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 11px 20px;
    border-radius: 12px;
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: all 0.18s;
    white-space: nowrap;
    text-decoration: none;
}

.btn-primary {
    background: var(--color-green);
    color: var(--color-cream);
    box-shadow: 0 4px 14px rgba(26, 58, 42, 0.2);
}

.btn-primary:hover {
    background: var(--color-green-mid);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(26, 58, 42, 0.3);
}

.btn-secondary {
    background: white;
    color: var(--color-text-mid);
    border: 1.5px solid var(--color-border);
}

.btn-secondary:hover {
    background: var(--color-cream-dark);
    color: var(--color-text-dark);
}

.btn-ghost {
    background: transparent;
    color: var(--color-text-light);
    border: 1.5px solid var(--color-border);
    padding: 11px 16px;
    flex: 0 0 auto;
}

.btn-ghost:hover {
    color: var(--color-rose);
    border-color: var(--color-rose);
}

/* TOOLBAR */
.toolbar {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
    flex-wrap: wrap;
    animation: slideUp 0.4s ease 0.05s both;
}

.search-wrap {
    position: relative;
    flex: 1;
    min-width: 200px;
}

.search-icon {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    color: var(--color-text-light);
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: 11px 14px 11px 38px;
    border: 1.5px solid var(--color-border);
    border-radius: 12px;
    background: white;
    font-family: 'DM Sans', sans-serif;
    font-size: 12px;
    color: var(--color-text-dark);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-shadow: 0 1px 3px rgba(26, 58, 42, 0.05);
}

.search-input:focus {
    border-color: var(--color-green-light);
    box-shadow: 0 0 0 3px rgba(61, 122, 87, 0.1);
}

.search-input::placeholder {
    color: var(--color-text-light) !important;
    font-style: italic;
}

.search-clear {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 16px;
    color: var(--color-text-light);
    padding: 4px 8px;
    transition: opacity 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-clear:hover,
.search-clear:focus,
.search-clear:active {
    background: transparent;
    outline: none;
}

.filter-select {
    padding: 11px 32px 11px 12px;
    border: 1.5px solid var(--color-border);
    border-radius: 12px;
    background: white;
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: var(--color-text-mid);
    outline: none;
    cursor: pointer;
    appearance: none;
    flex: 0 1 180px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238aaa98' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    box-shadow: 0 1px 3px rgba(26, 58, 42, 0.05);
}

/* FILTER PILLS ROW */
.filter-pills {
    display: flex;
    gap: 7px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    animation: slideUp 0.4s ease 0.08s both;
    align-items: center;
}

.filter-pill {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    border: 1.5px solid var(--color-border);
    background: white;
    color: var(--color-text-mid);
    cursor: pointer;
    transition: all 0.18s;
}

.filter-pill:hover {
    border-color: var(--color-green-light);
    color: var(--color-green);
}

.filter-pill.active {
    background: var(--color-green);
    border-color: var(--color-green);
    color: var(--color-cream);
}

.filter-pill.active-rose {
    background: var(--color-rose);
    border-color: var(--color-rose);
    color: white;
}

.filter-divider {
    width: 1px;
    height: 20px;
    background: var(--color-border);
    margin: 0 2px;
}

.results-meta {
    font-size: 12px;
    color: var(--color-text-light);
    font-weight: 500;
    margin-left: auto;
}

/* TAB BAR */
.subtab-bar {
    display: flex;
    gap: 4px;
    margin-bottom: 24px;
    padding: 4px;
    background: white;
    border-radius: 14px;
    width: fit-content;
    box-shadow: 0 1px 3px rgba(26,58,42,0.07);
    animation: slideUp 0.4s ease 0.04s both;
}

.subtab {
    padding: 9px 22px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    color: var(--color-text-mid);
    cursor: pointer;
    border: none;
    background: transparent;
    position: relative;
    display: flex;
    align-items: center;
    gap: 7px;
    transition: all 0.18s;
    font-family: 'DM Sans', sans-serif;
}

.subtab:hover {
    color: var(--color-green);
}

.subtab.active {
    color: var(--color-cream);
    background: var(--color-green);
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(26,58,42,0.2);
}

.subtab-count {
    font-size: 11px;
    font-weight: 600;
    padding: 1px 6px;
    border-radius: 10px;
    background: rgba(255,255,255,0.2);
}

.subtab:not(.active) .subtab-count {
    background: var(--color-cream-dark);
    color: var(--color-text-light);
}

/* PANELS */
.panel {
    display: none;
    animation: fadeIn 0.3s ease-in;
}

.panel.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* INGREDIENTS PANEL SPECIFIC */
.ingredients-list-container {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.ingredient-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: white;
    border: 1.5px solid var(--color-border);
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(26,58,42,0.06);
    transition: all 0.18s;
}

.ingredient-box:hover {
    border-color: var(--color-border);
    box-shadow: 0 4px 12px rgba(26,58,42,0.1);
}

.ingredient-box.inline-form-box {
    flex-direction: column;
    gap: 12px;
    padding: 16px;
}

.ingredient-info {
    flex: 1;
    text-align: left;
    min-width: 200px;
}

.ingredient-info h3 {
    font-size: 15px;
    font-weight: 500;
    color: var(--color-text-dark);
    margin-bottom: 4px;
}

.ingredient-info small {
    font-size: 12px;
    color: var(--color-text-light);
}

.ingredient-info input,
.ingredient-info select {
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid var(--color-border);
    border-radius: 8px;
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    color: var(--color-text-dark);
    margin-top: 6px;
    outline: none;
    transition: border-color 0.2s;
}

.ingredient-info input:focus,
.ingredient-info select:focus {
    border-color: var(--color-green-light);
    box-shadow: 0 0 0 3px rgba(61,122,87,0.1);
}

.ingredient-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.edit-btn,
.delete-btn {
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}

.edit-btn {
    background: var(--color-cream-dark);
    color: var(--color-text-mid);
}

.edit-btn:hover {
    background: var(--color-green);
    color: var(--color-cream);
}

.delete-btn {
    background: #fdeef0;
    color: var(--color-rose);
}

.delete-btn:hover {
    background: var(--color-rose);
    color: white;
}

.lock-icon {
    font-size: 18px;
    opacity: 0.6;
}

.link-btn {
    background: none;
    border: none;
    color: var(--color-green);
    cursor: pointer;
    text-decoration: underline;
    font-size: inherit;
    padding: 0;
    font-weight: 500;
}

.link-btn:hover {
    color: var(--color-green-mid);
}

.inline-form-box .ingredient-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.inline-form-box .ingredient-actions {
    width: 100%;
    justify-content: flex-end;
}

/* Ingredient card inline form */
.ingredient-card.inline-form-box {
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    width: 100%;
    max-width: 100%;
}

.ingredient-card.inline-form-box .ingredient-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.ingredient-card.inline-form-box .ingredient-info input,
.ingredient-card.inline-form-box .ingredient-info select {
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid var(--color-border);
    border-radius: 8px;
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    color: var(--color-text-dark);
    margin-top: 0;
    outline: none;
    transition: border-color 0.2s;
}

.ingredient-card.inline-form-box .ingredient-info input:focus,
.ingredient-card.inline-form-box .ingredient-info select:focus {
    border-color: var(--color-green-light);
    box-shadow: 0 0 0 3px rgba(61,122,87,0.1);
}

.ingredient-card.inline-form-box .ingredient-actions {
    width: 100%;
    justify-content: flex-end;
}

/* ── CATEGORY JUMP BAR ── */
.category-jump {
    position: sticky;
    top: 73px;
    z-index: 50;
    background: rgba(234, 244, 237, 0.95);
    backdrop-filter: blur(10px);
    margin-bottom: 16px;
    padding: 10px 0 12px;
    border-bottom: 1px solid rgba(26,58,42,0.1);
    -webkit-overflow-scrolling: touch;
}

.category-jump-inner {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 8px;
    padding-right: 16px;
}

.category-jump-inner::-webkit-scrollbar {
    display: none;
}

.jump-pill {
    padding: 7px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    border: 1.5px solid var(--color-border);
    background: white;
    color: var(--color-text-mid);
    cursor: pointer;
    transition: all 0.18s;
    white-space: nowrap;
    flex-shrink: 0;
    font-family: 'DM Sans', sans-serif;
}

.jump-pill:hover {
    border-color: var(--color-green-light);
    color: var(--color-green);
}

.jump-pill.active,
.jump-pill-all {
    background: var(--color-green);
    border-color: var(--color-green);
    color: var(--color-cream);
}

/* COLLAPSE/EXPAND TOOLBAR */
.ing-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.ing-results {
    font-size: 12px;
    color: var(--color-text-light);
    font-weight: 500;
    flex: 1;
}

.toggle-all-btn {
    font-size: 12px;
    font-weight: 500;
    color: var(--color-text-mid);
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 8px;
    transition: all 0.15s;
    font-family: 'DM Sans', sans-serif;
}

.toggle-all-btn:hover {
    background: white;
    color: var(--color-green);
}

/* CATEGORY SECTIONS */
.category-section {
    margin-bottom: 12px;
    animation: slideUp 0.4s ease both;
}

.category-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    background: white;
    border-radius: 14px;
    border: 1.5px solid transparent;
    cursor: pointer;
    transition: all 0.18s;
    box-shadow: 0 1px 3px rgba(26,58,42,0.06);
}

.category-header:hover {
    border-color: var(--color-border);
    background: #fafcfa;
}

.category-section.open .category-header {
    border-radius: 14px 14px 0 0;
    border-color: var(--color-border);
    border-bottom-color: transparent;
    box-shadow: none;
}

.category-name {
    font-family: 'Outfit', sans-serif;
    font-size: 15px;
    font-weight: 500;
    color: var(--color-green);
    flex: 1 0 auto;
    white-space: nowrap;
}

.category-count {
    font-size: 11px;
    font-weight: 600;
    color: var(--color-text-light);
    background: var(--color-cream-dark);
    padding: 3px 8px;
    border-radius: 20px;
    white-space: nowrap;
    flex-shrink: 0;
    margin-left: auto;
}

.category-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    /* flex: 1; */
    align-items: center;
    min-width: 0;
}

.preview-chip {
    font-size: 11px;
    font-weight: 500;
    padding: 3px 10px;
    border-radius: 16px;
    background: var(--color-cream-dark);
    color: var(--color-text-mid);
    white-space: nowrap;
    flex-shrink: 0;
}

.category-section.open .category-preview {
    display: none;
}

.category-chevron {
    font-size: 10px;
    color: var(--color-text-light);
    transition: transform 0.22s ease;
    margin-left: auto;
    flex-shrink: 0;
}

.category-section.open .category-chevron {
    transform: rotate(180deg);
}

.category-body {
    display: none;
    background: white;
    padding: 12px 16px;
    border-radius: 0 0 14px 14px;
    border: 1.5px solid var(--color-border);
    border-top: none;
    box-shadow: 0 4px 12px rgba(26,58,42,0.08);
}

.category-section.open .category-body {
    display: block;
}

/* INGREDIENT GRID */
.ingredient-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 8px;
}

/* INGREDIENT CARD */
.ingredient-card {
    background: var(--color-cream);
    border-radius: 12px;
    padding: 11px 13px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.18s;
    border: 1.5px solid transparent;
    cursor: default;
}

.ingredient-card:not(.visible) {
    display: none;
}

.ingredient-card:hover {
    border-color: rgba(26,58,42,0.1);
    background: white;
    box-shadow: 0 2px 8px rgba(26,58,42,0.07);
}

.ingredient-icon {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    flex-shrink: 0;
}

.ingredient-text {
    flex: 1;
    min-width: 0;
    text-align: left;
}

.ingredient-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--color-text-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.ingredient-cat {
    font-size: 11px;
    color: var(--color-text-light);
    margin-top: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ingredient-card .ingredient-actions {
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.15s;
}

.ingredient-card:hover .ingredient-actions {
    opacity: 1;
}

.icon-btn {
    width: 26px;
    height: 26px;
    border-radius: 7px;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.15s;
    padding: 0;
}

.icon-btn-edit {
    background: var(--color-cream-dark);
    color: var(--color-text-mid);
}

.icon-btn-edit:hover {
    background: var(--color-green);
    color: var(--color-cream);
}

.icon-btn-delete {
    background: #fdeef0;
    color: var(--color-rose);
}

.icon-btn-delete:hover {
    background: var(--color-rose);
    color: white;
}

/* ICON BACKGROUND COLORS BY CATEGORY */
.icon-produce {
    background: #e8f5ee;
}

.icon-dairy {
    background: #fff8e6;
}

.icon-protein {
    background: #fdeef0;
}

.icon-frozen {
    background: #e8f0ff;
}

.icon-cans {
    background: #f0ebe8;
}

.icon-bakery {
    background: #fdf4e3;
}

.icon-spices {
    background: #fce8f0;
}

.icon-breakfast {
    background: #e8f5f0;
}

.icon-dry {
    background: #f5f0e8;
}

.icon-condiments {
    background: #ede5d8;
}

.icon-beverages {
    background: #e3f2fd;
}

.icon-snacks {
    background: #fce4ec;
}

.icon-other {
    background: #f3e5f5;
}

/* MEAL GRID */
.meal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
    animation: slideUp 0.4s ease 0.1s both;
    text-align: left;
}

/* MEAL CARD */
.meal-card {
    background: white;
    border-radius: 18px;
    padding: 18px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.2s ease;
    border: 1.5px solid transparent;
    position: relative;
    cursor: pointer;
    display: flex;
    flex-direction: row;
    align-items: center;
    text-align: left;
}

.meal-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border-color: var(--color-border);
}

.meal-grid .meal-card {
    flex-direction: column;
}

.meal-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 10px;
    margin-right: auto;
}

.meal-name-link {
    flex: 1;
    text-decoration: none;
    display: flex;
    align-items: flex-start;
}

.meal-name {
    font-family: 'Outfit', sans-serif;
    font-size: 17px;
    font-weight: 500;
    color: var(--color-text-dark);
    line-height: 1.2;
    margin: 0 !important;
    text-align: left !important;
    width: 100%;
}

.meal-name em {
    font-style: italic;
    color: var(--color-rose);
}

.meal-emoji {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--color-bg);
    /* margin-right: 12px; */
    flex-shrink: 0;
    font-size: 20px;
}

.meal-name-link:hover .meal-name {
    opacity: 0.8;
}

.fav-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    padding: 2px;
    transition: transform 0.18s;
    flex-shrink: 0;
    color: var(--black);

}

.fav-btn:hover {
    transform: scale(1.2);
    background: none;
}

.meal-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
    text-align: left !important;
    justify-content: flex-start;
    width: 100%;
}

.meta-tag {
    font-size: 11px;
    font-weight: 500;
    padding: 3px 9px;
    border-radius: 20px;
    letter-spacing: 0.2px;
}

.meta-cuisine {
    background: #e8f4ee;
    color: var(--color-green-mid);
}

.meta-category {
    background: var(--color-cream-dark);
    color: var(--color-text-mid);
}

.meta-tag-label {
    background: #e8f0ff;
    color: #4a5a8a;
}

.meta-side {
    background: #fff3cd;
    color: #8a6a00;
}

.meta-dinnr {
    background: #fdeef0;
    color: var(--color-rose);
}

.meal-card-footer {
    display: flex;
    gap: 10px;
    padding-top: 16px;
    /* border-top: 1px solid rgba(26, 58, 42, 0.1); */
    margin-top: auto;
    width: 100%;
}

.card-btn {
    flex: 1;
    padding: 8px 12px;
    border-radius: 10px;
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.15s;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.card-btn-view {
    background: var(--color-green);
    color: var(--color-cream);
    flex-grow: 2;
}

.card-btn-view:hover {
    background: var(--color-green-mid);
}

.card-btn-delete {
    background: #fdeef0;
    color: var(--color-rose);
}

.card-btn-delete:hover {
    background: var(--color-rose);
    color: white;
}

.card-btn-form {
    display: flex;
    flex: 1;
    margin: 0;
    padding: 0;
    border: none;
    background: none;
}

.card-btn-form input[type="hidden"] {
    display: none;
}

.card-btn-form .card-btn {
    flex: 1;
    width: 100%;
    min-width: 0;
}

/* LEGEND */
.legend {
    margin-top: 32px;
    padding: 16px 20px;
    background: white;
    border-radius: 14px;
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    box-shadow: 0 1px 3px rgba(26, 58, 42, 0.06);
    animation: slideUp 0.4s ease 0.3s both;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--color-text-mid);
}

.legend-badge {
    font-size: 16px;
}

/* PAGINATION */
.pagination-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 32px;
    padding: 20px;
    animation: slideUp 0.4s ease 0.2s both;
}

.page-btn {
    padding: 8px 14px;
    border: 1.5px solid var(--color-border);
    border-radius: 8px;
    background: white;
    font-family: 'DM Sans', sans-serif;
    font-size: 12px;
    font-weight: 500;
    color: var(--color-text-mid);
    cursor: pointer;
    transition: all 0.2s;
}

.page-btn:hover {
    border-color: var(--color-green-light);
    color: var(--color-green);
}

.page-btn.active {
    background: var(--color-green);
    color: var(--color-cream);
    border-color: var(--color-green);
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-numbers {
    display: flex;
    gap: 4px;
}

/* EMPTY STATE */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--color-text-light);
    grid-column: 1 / -1;
}

.empty-state-icon {
    font-size: 40px;
    margin-bottom: 12px;
}

.empty-state-text {
    font-size: 15px;
}

.empty-state-text a {
    color: var(--color-green);
    text-decoration: none;
    font-weight: 600;
}

.empty-state-text a:hover {
    text-decoration: underline;
}

/* ANIMATIONS */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* RESPONSIVE */
@media (max-width: 640px) {
    /* Nav */
    nav { padding: 12px 16px; }
    .nav-links { display: none; }

    /* Page */
    .page { 
        margin-top: 0px; 
        padding: 16px 5px 100px;
    }

    /* Page header — stack title and actions vertically */
    .page-header { flex-direction: column; align-items: flex-start; gap: 8px; margin-bottom: 12px; }
    .page-title { font-size: 24px; margin: 0; }
    .page-eyebrow { font-size: 10px; margin-bottom: 2px; }

    /* Header actions — Bulk Add and Edit Tags smaller on one row, Add Meal full width below */
    .header-actions { display: flex; width: 100%; gap: 8px; flex-wrap: wrap; }
    #mealsHeaderActions .btn:nth-child(1),
    #mealsHeaderActions .btn:nth-child(2) { flex: 1; justify-content: center; font-size: 12px; padding: 9px 12px; min-width: 0; }
    #mealsHeaderActions .btn:nth-child(3) { flex-basis: 100%; justify-content: center; font-size: 13px; padding: 9px 14px; }

    /* Subtab bar — content-sized on mobile */
    .subtab-bar { width: auto; max-width: 100%; padding: 5px; margin: 0 auto 18px; display: flex; gap: 8px; justify-content: center; }
    .subtab { flex: 1; justify-content: center; padding: 10px 12px; font-size: 13px; }
    .subtab-count { font-size: 11px; padding: 1px 6px; }

    /* Meals toolbar — search full width, dropdowns on same row below */
    .toolbar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
    .search-wrap { flex: 0 0 100%; min-width: unset; width: auto; }
    .search-input { padding: 12px 14px 12px 38px; font-size: 14px; width: 100%; box-sizing: border-box; }
    .toolbar .filter-select { flex: 1; min-width: 0; padding: 11px 32px 11px 12px; font-size: 13px; }
    .toolbar .btn-ghost { width: 44px; padding: 11px 0; justify-content: center; align-self: flex-start; font-size: 18px; }

    /* Put the two filter selects on one row */
    .toolbar-selects { display: flex; gap: 10px; width: 100%; }
    .filter-divider { display: none; }
    .results-meta { margin-left: 0; width: 100%; margin-top: 8px; font-size: 12px; }

    /* Meal grid — single column */
    .meal-grid { grid-template-columns: 1fr; }

    /* Ingredient jump bar — nudge top for smaller nav */
    .category-jump { top: 73px; padding: 8px 0 10px; margin-bottom: 14px; }
    .jump-pill { padding: 6px 12px; font-size: 12px; }

    /* Category header — hide preview chips on very small screens, keep name+count+chevron clean */
    .category-preview { display: none !important; }
    .category-header { padding: 13px 14px; }
    .category-name { font-size: 14px; }
    .category-count { font-size: 11px; padding: 3px 8px; }

    /* Ingredient grid — 1 column on mobile */
    .ingredient-grid { grid-template-columns: 1fr; }

    /* Always show edit/delete actions on mobile (no hover) */
    .ingredient-actions { opacity: 1; }

    /* ing-toolbar — keep on one row but tighter */
    .ing-toolbar { gap: 8px; margin-bottom: 14px; }
    .ing-results { font-size: 12px; }
    .toggle-all-btn { font-size: 11px; padding: 5px 8px; }

    /* Modal — sheet from bottom on mobile */
    .ingredient-modal-backdrop { align-items: flex-end; padding: 0; }
    .ingredient-modal {
      max-width: 100%;
      border-radius: 24px 24px 0 0;
      transform: translateY(100%);
      max-height: 92vh;
      overflow-y: auto;
    }
    .ingredient-modal-backdrop.open .ingredient-modal { transform: translateY(0); }

    /* Category select grid — 3 cols is fine but tighten padding */
    .cat-option { padding: 8px 4px; }
    .cat-option-icon { font-size: 18px; }
    .cat-option-label { font-size: 10px; }

    /* Bottom nav */
    .bottom-nav { display: flex; padding: 10px 0 18px; }
    .bn-item { padding: 4px 0; }
    .bn-icon { font-size: 20px; }
    .bn-label { font-size: 10px; }
}

/* HIDE OLD STYLES FOR MEALS PAGE */
.meals-page {
    max-width: none !important;
    margin: 0 !important;
}

/* Override old meal-box styles */
.meal-box {
    /* display: none !important; */
}

.meal-grid .meal-card .meal-name,
h3.meal-name {
    font-family: 'Outfit', sans-serif;
    font-size: 17px;
    font-weight: 500;
    color: var(--color-text-dark);
    line-height: 1.2;
    margin: 0 !important;
    text-align: left !important;
    flex: 1;
    padding-right: 8px;
}

/* Ensure proper font loading */
@supports (font-variation-settings: "opsz" 144) {
    .meal-name {
        font-family: 'Outfit', sans-serif;
    }
    
    .page-title {
        font-family: 'Outfit', sans-serif;
    }
}

/* FORCE LEFT ALIGN FOR MEAL NAMES */
h3.meal-name,
.meal-card .meal-name {
    text-align: left !important;
    justify-content: flex-start !important;
}

/**********************
***** ADD INGREDIENT MODAL *****
**********************/

/* Ingredient Modal backdrop */
.ingredient-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(10, 30, 18, 0.45);
  backdrop-filter: blur(4px);
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}

.ingredient-modal-backdrop.open {
  opacity: 1;
  pointer-events: all;
}

/* Ingredient Modal container */
.ingredient-modal {
  background: white;
  border-radius: 24px;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  margin: 0 auto;
  padding: 0 20px;
  box-shadow: 0 24px 60px rgba(10, 30, 18, 0.2), 0 4px 16px rgba(10, 30, 18, 0.1);
  transform: translateY(16px) scale(0.98);
  transition: transform 0.25s ease;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.ingredient-modal-backdrop.open .ingredient-modal {
  transform: translateY(0) scale(1);
}

/* Ingredient Modal header */
.ingredient-modal-header {
  padding: 24px 24px 0;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 20px;
  flex-shrink: 0;
  width: 87%;
}

.ingredient-modal-header > div {
  flex: 1;
}

.ingredient-modal-eyebrow {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--color-text-light);
  margin-bottom: 4px;
}

.ingredient-modal-title {
  font-family: 'Outfit', sans-serif;
  font-size: 22px;
  font-weight: 500;
  color: var(--color-green);
}

.ingredient-modal-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--color-cream);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--color-text-light);
  transition: all 0.15s;
  flex-shrink: 0;
  margin-top: 2px;
  margin-left: auto;
}

.ingredient-modal-close:hover {
  background: #fdeef0;
  color: var(--color-rose);
}

/* Ingredient Modal body */
.ingredient-modal-body {
  padding: 0 24px 8px;
  flex: 1;
  overflow-y: auto;
}

#addIngredientForm {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Form fields */
.form-field {
  margin-bottom: 16px;
}

.form-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-mid);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 7px;
  display: block;
}

.form-input {
  width: 100%;
  padding: 13px 16px;
  border: 1.5px solid var(--color-border);
  border-radius: 14px;
  background: var(--color-cream);
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  color: var(--color-text-dark);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.form-input:focus {
  border-color: var(--color-green-light);
  background: white;
  box-shadow: 0 0 0 3px rgba(61, 122, 87, 0.1);
}

.form-input::placeholder {
  color: var(--color-text-light);
}

/* Category select grid */
.category-select-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 8px;
}

.cat-option {
  padding: 10px 8px;
  border-radius: 12px;
  border: 1.5px solid var(--color-border);
  background: var(--color-cream);
  cursor: pointer;
  text-align: center;
  transition: all 0.18s;
  font-family: 'DM Sans', sans-serif;
}

.cat-option:hover {
  border-color: var(--color-green-light);
  background: #f0faf4;
}

.cat-option.selected {
  border-color: var(--color-green);
  background: #e8f4ee;
}

.cat-option-icon {
  font-size: 20px;
  margin-bottom: 4px;
}

.cat-option-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--color-text-mid);
  line-height: 1.2;
}

.cat-option.selected .cat-option-label {
  color: var(--color-green-mid);
  font-weight: 600;
}

/* Ingredient Modal footer */
.ingredient-modal-footer {
  padding: 16px 24px 24px;
  display: flex;
  gap: 10px;
  border-top: 1px solid var(--color-border);
  margin-top: auto;
  flex-shrink: 0;
}

.ingredient-modal-btn-cancel {
  flex: 1;
  padding: 13px;
  border-radius: 14px;
  background: var(--color-cream);
  border: none;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-mid);
  transition: all 0.15s;
}

.ingredient-modal-btn-cancel:hover {
  background: var(--color-cream-dark);
  color: var(--color-text-dark);
}

.ingredient-modal-btn-save {
  flex: 2;
  padding: 13px;
  border-radius: 14px;
  background: var(--color-green);
  border: none;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: var(--color-cream);
  transition: all 0.15s;
  box-shadow: 0 4px 14px rgba(26, 58, 42, 0.2);
}

.ingredient-modal-btn-save:hover {
  background: var(--color-green-mid);
}

@media (max-width: 640px) {
  .ingredient-modal-backdrop {
    align-items: flex-end;
    padding: 0;
  }

  .ingredient-modal {
    max-width: 100%;
    border-radius: 24px 24px 0 0;
    transform: translateY(100%);
    max-height: 92vh;
    overflow-y: auto;
  }

  .ingredient-modal-backdrop.open .ingredient-modal {
    transform: translateY(0);
  }

  .category-select-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .cat-option {
    padding: 8px 4px;
  }

  .cat-option-icon {
    font-size: 18px;
  }

  .cat-option-label {
    font-size: 10px;
  }

  .ingredient-modal-footer {
    flex-direction: column-reverse;
  }

  .ingredient-modal-btn-cancel,
  .ingredient-modal-btn-save {
    flex: 1;
  }
}

/* ====================================================================
   MEAL PLAN PAGE STYLES
   ==================================================================== */

.meal-plan-page {
  margin-top: 20px; padding: 36px 20px 120px;
  max-width: 620px; margin-left: auto; margin-right: auto;
}

.back-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 500; color: var(--color-text-light);
  text-decoration: none; margin-bottom: 28px;
  transition: color 0.18s;
}
.back-link:hover { color: var(--color-green); }

.form-card {
  background: white; border-radius: 24px;
  padding: 28px;
  box-shadow: 0 1px 3px rgba(26,58,42,0.07), 0 8px 24px rgba(26,58,42,0.06);
  animation: slideUp 0.4s ease 0.1s both;
}

.form-field { margin-bottom: 24px; }
.form-field:last-child { margin-bottom: 0; }

.form-label {
  font-size: 11px; font-weight: 600; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--color-text-mid);
  margin-bottom: 8px; display: flex; align-items: center; gap: 8px;
}
.form-label-hint {
  font-size: 11px; font-weight: 400; letter-spacing: 0;
  text-transform: none; color: var(--color-text-light);
}

.form-input {
  width: 100%; padding: 13px 16px;
  border: 1.5px solid var(--color-border); border-radius: 14px;
  background: #eaf4ed; font-family: 'DM Sans', sans-serif;
  font-size: 15px; color: var(--color-text-dark); outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.form-input:focus { border-color: var(--color-green-light); background: white; box-shadow: 0 0 0 3px rgba(61,122,87,0.1); }
.form-input::placeholder { color: var(--color-text-light); }

/* Quantity Stepper */
.quantity-row { display: flex; align-items: center; gap: 12px; }
.qty-stepper {
  display: flex; align-items: center; gap: 0;
  background: #eaf4ed; border: 1.5px solid var(--color-border);
  border-radius: 14px; overflow: hidden;
}
.qty-btn {
  width: 44px; height: 48px; border: none; background: transparent;
  font-size: 18px; color: var(--color-text-mid); cursor: pointer;
  transition: all 0.15s; display: flex; align-items: center; justify-content: center;
  font-family: 'DM Sans', sans-serif;
}
.qty-btn:hover { background: #ede6d6; color: var(--color-green); }
.qty-value {
  min-width: 52px; text-align: center; font-size: 17px; font-weight: 600;
  color: var(--color-text-dark); font-family: 'Outfit', sans-serif; padding: 0 4px;
}
.qty-divider { width: 1px; height: 28px; background: var(--color-border); }
.qty-hint { font-size: 12px; color: var(--color-text-light); font-weight: 500; }

/* Pill Multi-Select */
.pill-select { display: flex; flex-wrap: wrap; gap: 8px; }
.pill-option {
  padding: 8px 16px; border-radius: 20px;
  font-size: 13px; font-weight: 500;
  border: 1.5px solid var(--color-border);
  background: #eaf4ed; color: var(--color-text-mid);
  cursor: pointer; transition: all 0.18s; user-select: none;
}
.pill-option:hover { border-color: var(--color-green-light); color: var(--color-green); background: #f0faf4; }
.pill-option.selected { background: var(--color-green); border-color: var(--color-green); color: #f5f0e8; }

/* Tags Input */
.tags-field { position: relative; }

.tags-wrap {
  display: flex; flex-wrap: wrap; gap: 6px;
  padding: 0px 10px;
  border: 1.5px solid var(--color-border); border-radius: 14px;
  background: #eaf4ed; min-height: 48px; align-items: center;
  cursor: text; transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.tags-wrap:focus-within {
  border-color: var(--color-green-light); background: white;
  box-shadow: 0 0 0 3px rgba(61,122,87,0.1);
}

.tag-chip {
  display: flex; align-items: center; gap: 5px;
  background: var(--color-green); color: #f5f0e8;
  border-radius: 20px; padding: 5px 12px;
  font-size: 13px; font-weight: 500;
  animation: tagPop 0.15s ease both;
}
@keyframes tagPop {
  from { transform: scale(0.8); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}
.tag-chip-x {
  cursor: pointer; opacity: 0.55; font-size: 15px; line-height: 1;
  transition: opacity 0.15s; margin-left: 1px;
}
.tag-chip-x:hover { opacity: 1; }

.tags-input {
  border: none; background: transparent; outline: none;
}

/* Tags dropdown */
.tags-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1.5px solid var(--color-border);
  border-top: none;
  border-radius: 0 0 14px 14px;
  margin-top: -2px;
  padding: 8px 0;
  max-height: 250px;
  overflow-y: auto;
  z-index: 10;
  box-shadow: 0 4px 12px rgba(26, 58, 42, 0.08);
}

.tags-dropdown.open {
  display: block;
}

.dropdown-section-label {
  padding: 8px 14px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--color-text-light);
  display: block;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  cursor: pointer;
  font-size: 13px;
  color: var(--color-text-dark);
  transition: background 0.15s, color 0.15s;
}

.dropdown-item:hover {
  background: #f0f9f3;
  color: var(--color-green);
}

.dropdown-item-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-green-light);
  flex-shrink: 0;
}

.dropdown-item-create {
  color: var(--color-rose);
  border-top: 1px solid var(--color-border);
  margin-top: 4px;
  padding-top: 8px;
}

.dropdown-item-create:hover {
  background: #fdeef0;
  color: var(--rose-light);
}

.dropdown-item-create .dropdown-item-dot {
  background: var(--color-rose);
}

.dropdown-item-create-label {
  font-size: 11px;
  color: var(--color-text-light);
  font-weight: 400;
  margin-right: 2px;
}

.dropdown-empty {
  padding: 14px;
  font-size: 13px;
  color: var(--color-text-light);
  text-align: center;
}

/* ════════════════════════════════════════════════════════════════ */
/* MEAL PLAN RESULT PAGE STYLES */
/* ════════════════════════════════════════════════════════════════ */

/* CSS Variables - Custom theme for meal plan result page */
:root {
    --green: #1a3a2a;
    --green-mid: #2c5a40;
    --green-light: #3d7a57;
    --bg: #eaf4ed;
    --cream: #f5f0e8;
    --cream-dark: #ede6d6;
    --rose: #c8455a;
    --rose-light: #e8687a;
    --text-dark: #1a2620;
    --text-mid: #4a6258;
    --text-light: #8aaa98;
    --border: rgba(26, 58, 42, 0.1);
}

.meal-plan-result-wrapper {
    padding-bottom: 120px;
}

.page {
    margin-top: 0px;
    padding: 36px 20px;
    max-width: 850px;
    margin-left: auto;
    margin-right: auto;
}

/* Progress */
.progress {
    display: flex;
    align-items: center;
    margin-bottom: 32px;
    animation: fadeDown 0.4s ease both;
}

.progress-step {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    font-weight: 500;
}

.progress-dot {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    flex-shrink: 0;
}

.progress-step.done .progress-dot {
    background: var(--green);
    color: var(--cream);
}

.progress-step.done .progress-label {
    color: var(--text-light);
}

.progress-step.active .progress-dot {
    background: var(--rose);
    color: white;
}

.progress-step.active .progress-label {
    color: var(--text-dark);
    font-weight: 600;
}

.progress-step.upcoming .progress-dot {
    background: var(--cream-dark);
    color: var(--text-light);
}

.progress-step.upcoming .progress-label {
    color: var(--text-light);
}

.progress-line {
    flex: 1;
    height: 1.5px;
    background: var(--border);
    margin: 0 8px;
    min-width: 16px;
}

.progress-line.done {
    background: var(--green);
    opacity: 0.3;
}

/* Page Header */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  animation: fadeDown 0.4s ease both;
}

.page-header-left {}

.page-eyebrow {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: 6px;
}

.page-title {
    font-family: 'Outfit', sans-serif;
    font-size: 30px;
    font-weight: 500;
    color: var(--green);
    letter-spacing: -0.5px;
    margin: 0;
    padding: 0;
}

.page-sub {
    font-size: 14px;
    color: var(--text-light);
    margin-top: 6px;
    line-height: 1.5;
}

.page-sub a {
    color: var(--green);
    font-weight: 500;
    text-decoration: none;
    border-bottom: 1px solid var(--green);
}

.page-sub a:hover {
    opacity: 0.8;
}

/* Meals List */
.meals-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 24px;
}

.meal-row {
    background: white;
    border-radius: 18px;
    box-shadow: 0 1px 3px rgba(26, 58, 42, 0.06), 0 4px 12px rgba(26, 58, 42, 0.04);
    border: 1.5px solid transparent;
    transition: border-color 0.22s, box-shadow 0.22s;
    overflow: hidden;
    animation: slideUp 0.4s ease both;
}

.meal-row.flagged {
    border-color: rgba(200, 69, 90, 0.3);
    box-shadow: 0 1px 3px rgba(200, 69, 90, 0.05), 0 4px 16px rgba(200, 69, 90, 0.1);
}

.meal-row.flagged .meal-row-main {
    opacity: 0.4;
}

.meal-row-main {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 18px;
    transition: opacity 0.22s;
}

.flag-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    flex-shrink: 0;
    border: 1.5px solid var(--border);
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.18s;
    font-size: 11px;
    color: var(--text-light);
    font-weight: 600;
    padding: 0;
}

.flag-btn:hover {
    border-color: var(--rose);
    color: var(--rose);
    background: #fdf4f5;
}

.meal-row.flagged .flag-btn {
    background: var(--rose);
    border-color: var(--rose);
    color: white;
}

.meal-info {
    flex: 1;
    min-width: 0;
}

.meal-name {
    font-family: 'Outfit', sans-serif;
    font-size: 17px;
    font-weight: 500;
    color: var(--text-dark);
    line-height: 1.2;
    margin-bottom: 4px;
}

.meal-name em {
    font-style: italic;
    color: var(--rose);
}

.meal-tags {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.meal-tag {
    font-size: 11px;
    font-weight: 500;
    padding: 2px 8px;
    border-radius: 20px;
}

.tag-cuisine {
    background: #e8f4ee;
    color: var(--green-mid);
}

.tag-category {
    background: var(--cream-dark);
    color: var(--text-mid);

}

.meal-fav {
    font-size: 16px;
    cursor: pointer;
    flex-shrink: 0;
    transition: transform 0.18s;
}

.meal-fav:hover {
    transform: scale(1.2);
}

/* Replacement Panel */
.replace-panel {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    padding: 0 18px;
}

.meal-row.flagged .replace-panel {
    max-height: 300px;
    padding: 0 18px 16px;
    border-top: 1px dashed rgba(200, 69, 90, 0.2);
}

.replace-hint {
    font-size: 12px;
    color: var(--rose);
    font-weight: 500;
    padding: 12px 0 8px;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.replace-hint-or {
    font-size: 11px;
    color: var(--text-light);
    font-weight: 400;
}

.replace-chosen {
    display: none;
    align-items: center;
    gap: 10px;
    background: #f0faf4;
    border: 1.5px solid rgba(61, 122, 87, 0.2);
    border-radius: 12px;
    padding: 9px 13px;
    margin-bottom: 8px;
}

.replace-chosen.visible {
    display: flex;
}

.replace-chosen.visible ~ .replace-search-wrap {
    display: none;
}

.replace-chosen-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--green-mid);
    flex: 1;
}

.replace-chosen-clear {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-light);
    font-size: 15px;
    padding: 0;
    line-height: 1;
    transition: color 0.15s;
}

.replace-chosen-clear:hover {
    color: var(--rose);
}

.replace-search-wrap {
    position: relative;
    margin-bottom: 5px;
}

.replace-search-icon {
    position: absolute;
    left: 11px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 13px;
    color: var(--text-light);
    pointer-events: none;
}

.replace-search-input {
    width: 100%;
    padding: 9px 13px 9px 32px;
    border: 1.5px solid var(--border);
    border-radius: 11px;
    background: var(--bg);
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    color: var(--text-dark);
    outline: none;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.replace-search-input:focus {
    border-color: var(--green-light);
    background: white;
    box-shadow: 0 0 0 3px rgba(61, 122, 87, 0.1);
}

.replace-search-input::placeholder {
    color: var(--text-light);
}

.replace-results {
    display: flex;
    flex-direction: column;
    gap: 2px;
    max-height: 160px;
    overflow-y: auto;
    margin-top: 4px;
}

.replace-result {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7px 10px;
    border-radius: 9px;
    cursor: pointer;
    transition: background 0.13s;
    border: 1.5px solid transparent;
}

.replace-result:hover {
    background: var(--bg);
    border-color: var(--border);
}

.replace-result-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-dark);
}

.replace-result-meta {
    font-size: 11px;
    color: var(--text-light);
    margin-top: 1px;
}

.replace-result-pick {
    font-size: 11px;
    font-weight: 500;
    color: var(--green-light);
    opacity: 0;
    transition: opacity 0.13s;
}

.replace-result:hover .replace-result-pick {
    opacity: 1;
}

/* Action Bar (inline card style) */
.action-bar {
    background: white;
    border-radius: 18px;
    padding: 16px;
    box-shadow: 0 1px 3px rgba(26, 58, 42, 0.06), 0 4px 12px rgba(26, 58, 42, 0.04);
    display: flex;
    gap: 10px;
}

.state-default {
    display: flex;
    flex: 1;
}

.state-replacing {
    display: none;
    flex: 1;
    gap: 10px;
}

.action-bar.has-flags .state-default {
    display: none;
}

.action-bar.has-flags .state-replacing {
    display: flex;
}

.btn-next {
    flex: 1;
    padding: 14px 20px;
    border-radius: 16px;
    background: var(--green);
    border: none;
    cursor: pointer;
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: var(--cream);
    transition: all 0.18s;
    box-shadow: 0 4px 14px rgba(26, 58, 42, 0.25);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.btn-next:hover {
    background: var(--green-mid);
    transform: translateY(-1px);
}

.btn-next-sub {
    font-size: 11px;
    opacity: 0.6;
    margin-top: 2px;
}

.btn-next-arrow {
    font-size: 20px;
    opacity: 0.6;
    transition: transform 0.18s, opacity 0.18s;
}

.btn-next:hover .btn-next-arrow {
    transform: translateX(3px);
    opacity: 1;
}

.btn-replace-all {
    flex: 1;
    padding: 14px 20px;
    border-radius: 16px;
    background: var(--rose);
    border: none;
    cursor: pointer;
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: white;
    transition: all 0.18s;
    box-shadow: 0 4px 14px rgba(200, 69, 90, 0.3);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.btn-replace-all:hover {
    background: var(--rose-light);
    transform: translateY(-1px);
}

.btn-replace-all-sub {
    font-size: 11px;
    opacity: 0.75;
    margin-top: 2px;
}

.btn-replace-all-icon {
    font-size: 18px;
    flex-shrink: 0;
}

.btn-cancel-replace {
    padding: 14px 16px;
    border-radius: 16px;
    background: white;
    border: 1.5px solid var(--border);
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-mid);
    cursor: pointer;
    transition: all 0.18s;
    white-space: nowrap;
}

.btn-cancel-replace:hover {
    border-color: var(--rose);
    color: var(--rose);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes swapIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@media (max-width: 640px) {
    .page {
        padding: 24px 0px 100px;
    }
    .bottom-nav {
        display: flex;
    }
    .progress-label {
        display: none;
    }
    .progress-step.active .progress-label {
        display: block;
    }
}

/* ════════════════════════════════════════════════════════════════ */
/* ADD SIDE DISHES PAGE STYLES */
/* ════════════════════════════════════════════════════════════════ */

.add-side-dishes-wrapper {
    padding-bottom: 120px;
}

.add-side-dishes-wrapper .page {
    margin-top: 73px;
    padding: 36px 20px 100px;
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
}

/* PAGE HEADER */
.page-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  animation: fadeDown 0.4s ease both;
}

.page-header-left {}

.page-eyebrow {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: 6px;
}

.page-title {
  font-family: 'Outfit', sans-serif;
  font-size: 32px;
  font-weight: 500;
  color: var(--green);
  letter-spacing: -0.5px;
  line-height: 1.1;
}

.btn-edit-plan {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  padding: 8px 14px;
  border-radius: 20px;
  margin-top: 4px;
  background: white;
  border: 1.5px solid var(--border);
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-mid);
  cursor: pointer;
  transition: all 0.18s;
  text-decoration: none;
}

.btn-edit-plan:hover {
  border-color: var(--green-light);
  color: var(--green);
}

.page-sub a:hover {
    text-decoration: underline;
}

/* MEAL CARDS */
.meals-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 14px;
}

.meal-row {
    background: white;
    border-radius: 18px;
    box-shadow: 0 1px 3px rgba(26,58,42,0.06), 0 4px 12px rgba(26,58,42,0.04);
    border: 1.5px solid transparent;
    transition: border-color 0.22s, box-shadow 0.22s;
    overflow: hidden;
    animation: slideUp 0.4s ease both;
    display: flex;
    flex-direction: column;
}

.meal-row.has-side {
    border-color: rgba(61,122,87,0.2);
}

.meal-row.open {
    border-color: rgba(26,58,42,0.1);
    box-shadow: 0 4px 20px rgba(26,58,42,0.1);
}

.meal-row-main {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 18px;
}

.meal-fav {
    font-size: 16px;
    cursor: pointer;
    flex-shrink: 0;
    transition: transform 0.18s;
}

.meal-fav:hover {
    transform: scale(1.2);
}

/* Scoped meal-row styles for add-side-dishes */
.add-side-dishes-wrapper .meal-row {
    display: flex;
    flex-direction: column;
}

.add-side-dishes-wrapper .meal-row-main {
    border-bottom: none;
}

.meal-info {
    flex: 1;
    min-width: 0;
}

.meal-name {
    font-family: 'Outfit', sans-serif;
    font-size: 17px;
    font-weight: 500;
    color: var(--text-dark);
    line-height: 1.2;
    margin-bottom: 2px;
}

.meal-name em {
    font-style: italic;
    color: var(--rose);
}

.meal-tags {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    margin-bottom: 0;
}

.meal-tag {
    font-size: 11px;
    font-weight: 500;
    padding: 2px 8px;
    border-radius: 20px;
}

.tag-cuisine {
    background: #e8f4ee;
    color: var(--green-mid);
}

.tag-category {
    background: var(--cream-dark);
    color: var(--text-mid);
}

/* Side dish badge — shown when a side is selected */
.add-side-dishes-wrapper .side-badge {
    display: none;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    width: fit-content;
    background: none !important;
    border: none !important;
}

.add-side-dishes-wrapper .side-badge.visible {
    display: flex;
}

.add-side-dishes-wrapper .side-badge-label {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-light);
    background: none;
}

.add-side-dishes-wrapper .side-badge-name {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-dark);
    background: #fff3cd;
    padding: 4px 10px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 5px;
    width: fit-content;
}

.add-side-dishes-wrapper .side-badge-remove {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-light);
    font-size: 13px;
    padding: 0;
    line-height: 1;
    transition: color 0.15s;
}

.add-side-dishes-wrapper .side-badge-remove:hover {
    color: var(--rose);
}

/* Add side button */
.add-side-dishes-wrapper .btn-add-side {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 7px 13px;
    border-radius: 20px;
    background: var(--bg);
    border: 1.5px dashed rgba(26,58,42,0.15);
    font-family: 'DM Sans', sans-serif;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.18s;
    flex-shrink: 0;
    white-space: nowrap;
}

.add-side-dishes-wrapper .btn-add-side:hover {
    border-color: var(--green-light);
    color: var(--green);
    background: #f0faf4;
}

.add-side-dishes-wrapper .meal-row.has-side .btn-add-side,
.add-side-dishes-wrapper .meal-row.open .btn-add-side {
    display: none;
}

/* SIDE SEARCH PANEL */
.add-side-dishes-wrapper .side-panel {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.28s ease, padding 0.28s ease;
    padding: 0;
    width: 100%;
    box-sizing: border-box;
}

.add-side-dishes-wrapper .meal-row.open .side-panel {
    max-height: 260px;
    padding: 14px 18px 16px;
    border-top: 1px solid var(--border);
}

.add-side-dishes-wrapper .side-panel-hint {
    font-size: 12px;
    color: var(--text-light);
    padding: 10px 0 8px;
}

.add-side-dishes-wrapper .side-search-wrap {
    position: relative;
    margin-bottom: 5px;
    box-sizing: border-box;
}

.add-side-dishes-wrapper .side-search-icon {
    position: absolute;
    left: 11px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 13px;
    color: var(--text-light);
    pointer-events: none;
}

.add-side-dishes-wrapper .side-search-input {
    width: 100%;
    padding: 9px 13px 9px 32px;
    border: 1.5px solid var(--border);
    border-radius: 11px;
    background: var(--bg);
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    color: var(--text-dark);
    outline: none;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.add-side-dishes-wrapper .side-search-input:focus {
    border-color: var(--green-light);
    background: white;
    box-shadow: 0 0 0 3px rgba(61,122,87,0.1);
}

.add-side-dishes-wrapper .side-search-input::placeholder {
    color: var(--text-light);
}

.add-side-dishes-wrapper .side-results {
    display: flex;
    flex-direction: column;
    gap: 2px;
    max-height: 150px;
    overflow-y: auto;
    margin-top: 4px;
}

.add-side-dishes-wrapper .side-result {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7px 10px;
    border-radius: 9px;
    cursor: pointer;
    transition: background 0.13s;
    border: 1.5px solid transparent;
}

.add-side-dishes-wrapper .side-result:hover {
    background: var(--bg);
    border-color: var(--border);
}

.add-side-dishes-wrapper .side-result-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-dark);
}

.add-side-dishes-wrapper .side-result-meta {
    font-size: 11px;
    color: var(--text-light);
    margin-top: 1px;
}

.add-side-dishes-wrapper .side-result-pick {
    font-size: 11px;
    font-weight: 500;
    color: var(--green-light);
    opacity: 0;
    transition: opacity 0.13s;
}

.add-side-dishes-wrapper .side-result:hover .side-result-pick {
    opacity: 1;
}

/* Close panel link */
.add-side-dishes-wrapper .side-panel-cancel {
    font-size: 12px;
    color: var(--text-light);
    cursor: pointer;
    display: inline-block;
    margin-top: 8px;
    transition: color 0.15s;
    background: none;
    border: none;
    font-family: 'DM Sans', sans-serif;
    padding: 0;
}

.add-side-dishes-wrapper .side-panel-cancel:hover {
    color: var(--rose);
}

/* UPSELL PANEL (free users) */
.add-side-dishes-wrapper .upsell-panel {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    padding: 0 18px;
    background: transparent !important;
    border: none !important;
}

.add-side-dishes-wrapper .meal-row.open-upsell .upsell-panel {
    max-height: 200px;
    padding: 14px 18px;
}

.add-side-dishes-wrapper .meal-row.open-upsell .btn-add-side {
    display: none;
}

.add-side-dishes-wrapper .upsell-inner {
    background: #fdf6e3;
    border: 1.5px solid rgba(212,168,67,0.35);
    border-radius: 14px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.add-side-dishes-wrapper .upsell-icon {
    font-size: 18px;
    color: #d4a843;
    flex-shrink: 0;
}

.add-side-dishes-wrapper .upsell-text {
    flex: 1;
    min-width: 0;
}

.add-side-dishes-wrapper .upsell-title {
    font-size: 13px;
    font-weight: 600;
    color: #9a7020;
    margin-bottom: 2px;
}

.add-side-dishes-wrapper .upsell-sub {
    font-size: 12px;
    color: #b8942a;
    line-height: 1.4;
}

.add-side-dishes-wrapper .btn-upsell,
.btn-upsell {
    padding: 8px 18px;
    border-radius: 20px;
    flex-shrink: 0;
    background: #d4a843;
    border: none;
    font-family: 'DM Sans', sans-serif;
    font-size: 12px;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: all 0.18s;
    white-space: nowrap;
    box-shadow: none;
}

.add-side-dishes-wrapper .btn-upsell:hover,
.btn-upsell:hover {
    background: #c09030;
    transform: translateY(-1px);
}

.add-side-dishes-wrapper .upsell-dismiss {
    font-size: 12px;
    color: #b08030;
    cursor: pointer;
    background: none;
    border: none;
    font-family: 'DM Sans', sans-serif;
    display: block;
    margin-top: 12px;
    opacity: 0.7;
    transition: opacity 0.15s;
    padding: 0;
}

.add-side-dishes-wrapper .upsell-dismiss:hover {
    opacity: 1;
}

/* Universal upsell styles */
.upsell-panel {
    background: #fdf6e3;
    border: 1.5px solid rgba(212,168,67,0.35);
    border-radius: 14px;
    padding: 16px 18px;
}

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

.upsell-icon {
    font-size: 18px;
    color: #d4a843;
    flex-shrink: 0;
}

.upsell-text {
    flex: 1;
    min-width: 0;
}

.upsell-title {
    font-size: 13px;
    font-weight: 600;
    color: #9a7020;
    margin-bottom: 2px;
}

.upsell-sub {
    font-size: 12px;
    color: #b8942a;
    line-height: 1.4;
}

.upsell-dismiss {
    display: block;
    margin-top: 12px;
    padding: 0;
    background: none;
    border: none;
    font-family: 'DM Sans', sans-serif;
    font-size: 12px;
    color: #d4a843;
    cursor: pointer;
    text-align: left;
    transition: color 0.15s;
}

.upsell-dismiss:hover {
    color: #c09030;
}

/* MODAL STYLES */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(26,42,34,0.5);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.2s ease both;
}

.modal-overlay.open {
    display: flex;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal {
    background: white;
    border-radius: 28px;
    max-width: 420px;
    width: 100%;
    overflow: hidden;
    box-shadow: 0 20px 48px rgba(0,0,0,0.25);
    animation: modalSlideUp 0.3s ease both;
    display: flex;
    flex-direction: column;
    /* margin: auto; */
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    background: #fdf6e3;
    padding: 28px 20px 24px;
    text-align: center;
    position: relative;
    border-bottom: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
}

.modal-close {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.6);
    color: #d4a843;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-weight: 300;
    line-height: 1;
}

.modal-close:hover {
    background: white;
    transform: scale(1.08);
}

.modal-header-icon {
    font-size: 32px;
    color: #d4a843;
    margin-bottom: 10px;
    display: block;
    line-height: 1;
}

.modal-header-eyebrow {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: #8a6200;
    margin-bottom: 4px;
}

.modal-header-title {
    font-family: 'Outfit', sans-serif;
    font-size: 28px;
    font-weight: 500;
    color: #5a3d1a;
    margin: 0 0 6px;
    line-height: 1.25;
}

.modal-header-sub {
    font-size: 14px;
    color: #c9a856;
    font-weight: 500;
}

.modal-body {
    padding: 24px 20px 20px;
    background: white;
}

.modal-price {
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(26,58,42,0.08);
}

.modal-price-amount {
    font-family: 'Outfit', sans-serif;
    font-size: 44px;
    font-weight: 500;
    color: #1a4d3a;
    line-height: 1;
    margin: 0;
}

.modal-price-period {
    font-size: 13px;
    color: #8aaa98;
    margin-top: 4px;
    font-weight: 400;
}

.modal-features {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.modal-feature {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.modal-feature-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #fdf6e3;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.modal-feature-title {
    font-size: 13px;
    font-weight: 600;
    color: #1a2620;
    margin-bottom: 2px;
}

.modal-feature-desc {
    font-size: 13px;
    color: #8aaa98;
    line-height: 1.5;
    margin: 0;
}

.btn-upgrade-modal {
    width: 100%;
    padding: 14px;
    border-radius: 18px;
    background: #d4a843;
    color: white;
    border: none;
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 10px;
    box-shadow: 0 4px 16px rgba(212,168,67,0.3);
    letter-spacing: 0.3px;
}

.btn-upgrade-modal:hover {
    background: #c09030;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(212,168,67,0.35);
}

.btn-upgrade-modal:active {
    transform: translateY(0);
}

.modal-note {
    text-align: center;
    font-size: 12px;
    color: #8aaa98;
    font-weight: 400;
}

/* NEXT CTA */
.add-side-dishes-wrapper .next-cta {
    background: var(--green);
    border-radius: 18px;
    padding: 22px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    box-shadow: 0 4px 20px rgba(26,58,42,0.2);
    animation: slideUp 0.4s ease 0.25s both;
    margin-top: 4px;
    color: inherit;
    width: 100%;
}

.add-side-dishes-wrapper .next-cta:hover {
    background: var(--green-mid);
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(26,58,42,0.25);
    text-decoration: none;
}

.add-side-dishes-wrapper .next-cta-label {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(245,240,232,0.5);
    margin-bottom: 4px;
}

.add-side-dishes-wrapper .next-cta-title {
    font-family: 'Outfit', sans-serif;
    font-size: 20px;
    font-weight: 500;
    color: var(--cream);
}

.add-side-dishes-wrapper .next-cta-sub {
    font-size: 12px;
    color: rgba(245,240,232,0.55);
    margin-top: 3px;
}

.add-side-dishes-wrapper .next-cta-arrow {
    font-size: 24px;
    color: rgba(245,240,232,0.55);
    flex-shrink: 0;
    transition: transform 0.2s, color 0.2s;
}

.add-side-dishes-wrapper .next-cta:hover .next-cta-arrow {
    transform: translateX(4px);
    color: var(--cream);
}

@media (max-width: 640px) {
    /* .page {
        padding: 24px 14px 100px;
    } */
    
    .bottom-nav {
        display: flex;
    }
    
    .progress-label {
        display: none;
    }
    
    .progress-step.active .progress-label {
        display: block;
    }
}

/* ════════════════════════════════════════════════════════════════ */
/* ░░░░░  MEAL PLAN RESULT PAGE STYLES  ░░░░░ */
/* ════════════════════════════════════════════════════════════════ */

/* Meals Search */
.meals-search-wrap { position: relative; margin-bottom: 12px; }
.meals-search-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); font-size: 14px; color: var(--color-text-light); pointer-events: none; }
.meals-search-input {
  width: 100%; padding: 13px 14px 13px 40px;
  border: 1.5px solid var(--color-border); border-radius: 14px;
  background: #eaf4ed; font-family: 'DM Sans', sans-serif;
  font-size: 14px; color: var(--color-text-dark); outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.meals-search-input:focus { border-color: var(--color-green-light); background: white; box-shadow: 0 0 0 3px rgba(61,122,87,0.1); }
.meals-search-input::placeholder { color: var(--color-text-light); }

.search-dropdown {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 20;
  background: white; border-radius: 14px;
  border: 1.5px solid var(--color-border);
  box-shadow: 0 8px 24px rgba(26,58,42,0.12);
  overflow: hidden; display: none;
}
.search-dropdown.open { display: block; }
.search-result {
  display: flex; align-items: center; justify-content: space-between;
  padding: 11px 16px; cursor: pointer; transition: background 0.15s;
  font-size: 14px; font-weight: 500; color: var(--color-text-dark);
  border-bottom: 1px solid var(--color-border);
}
.search-result:last-child { border-bottom: none; }
.search-result:hover { background: #eaf4ed; }
.search-result-meta { font-size: 11px; color: var(--color-text-light); font-weight: 400; }
.search-result-add { font-size: 16px; color: var(--color-text-light); }
.search-result:hover .search-result-add { color: var(--color-green); }

/* Selected Meals */
.selected-meals { display: flex; flex-direction: column; gap: 8px; }
.selected-meal {
  display: flex; align-items: center; gap: 12px;
  background: #eaf4ed; border-radius: 12px; padding: 10px 14px;
  border: 1.5px solid transparent; transition: border-color 0.15s;
}
.selected-meal:hover { border-color: var(--color-border); }
.selected-meal-name { font-size: 14px; font-weight: 500; color: var(--color-text-dark); flex: 1; }
.selected-meal-meta { font-size: 11px; color: var(--color-text-light); }
.selected-meal-remove {
  background: none; border: none; cursor: pointer;
  color: var(--color-text-light); font-size: 16px; padding: 2px 4px;
  border-radius: 6px; transition: all 0.15s; line-height: 1;
}
.selected-meal-remove:hover { background: #fdeef0; color: var(--color-rose); }

.meals-empty {
  text-align: center; padding: 20px;
  font-size: 13px; color: var(--color-text-light);
  border: 1.5px dashed var(--color-border); border-radius: 14px;
}

.form-divider { height: 1px; background: var(--color-border); margin: 4px 0 24px; }

/* Form Actions */
.form-actions-outer { display: none; }
.form-actions-inline {
  display: flex; gap: 10px; margin-top: 28px;
}

.btn-cancel {
  flex: 1; padding: 14px; border-radius: 14px;
  background: white; border: 1.5px solid var(--color-border);
  font-family: 'DM Sans', sans-serif; font-size: 14px; font-weight: 500;
  color: var(--color-text-mid); cursor: pointer; transition: all 0.18s;
  text-decoration: none; text-align: center;
  display: flex; align-items: center; justify-content: center;
}
.btn-cancel:hover { background: #ede6d6; color: var(--color-text-dark); border-color: #ede6d6; }

.btn-create {
  /* flex: 2;  */
  padding: 14px; border-radius: 14px;
  background: var(--color-rose); border: none;
  font-family: 'DM Sans', sans-serif; font-size: 14px; font-weight: 500;
  color: #f5f0e8; cursor: pointer; transition: all 0.18s;
  box-shadow: 0 4px 14px rgba(26,58,42,0.25);
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-create:hover { background: var(--color-rose-light); transform: translateY(-1px); box-shadow: 0 6px 18px rgba(26,58,42,0.3); }

.flashes {
  list-style: none;
  background: #fdeef0;
  border: 1.5px solid #e8687a;
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 24px;
  color: var(--color-rose);
  font-size: 14px;
  animation: slideUp 0.3s ease both;
}

@keyframes slideUp { 
  from { opacity: 0; transform: translateY(14px); } 
  to { opacity: 1; transform: translateY(0); } 
}
@keyframes fadeDown { 
  from { opacity: 0; transform: translateY(-8px); } 
  to { opacity: 1; transform: translateY(0); } 
}

/* ════════════════════════════════════════════════════════════════ */
/* ░░░░░  MEAL PLAN VIEW PAGE STYLES  ░░░░░ */
/* ════════════════════════════════════════════════════════════════ */

.meal-plan-view-page {
  margin-top: 20px;
  padding: 36px 20px 120px;
  max-width: 620px;
  margin-left: auto;
  margin-right: auto;
}

.plan-page-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-light);
  text-decoration: none;
  margin-bottom: 28px;
  transition: color 0.18s;
}

.plan-page-back:hover {
  color: var(--color-green);
}

.plan-page-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-bottom: 32px;
  animation: fadeDown 0.4s ease both;
}

.plan-page-title {
  font-family: 'Outfit', sans-serif;
  font-size: 32px;
  font-weight: 500;
  color: var(--color-green);
  letter-spacing: -0.5px;
  line-height: 1.1;
  margin: 0 0 4px;
}

.plan-page-subtitle {
  font-size: 13px;
  color: var(--color-text-light);
  font-weight: 400;
  margin: 0;
}

/* Progress bar */
.plan-progress {
  margin-bottom: 5px;
  animation: fadeDown 0.4s ease 0.05s both;
}

.plan-progress-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-light);
  margin-bottom: 8px;
}

.plan-progress-count {
  font-weight: 500;
}

.plan-progress-track {
  height: 4px;
  background: var(--cream-dark);
  border-radius: 99px;
  overflow: hidden;
}

.plan-progress-fill {
  height: 100%;
  background: var(--green);
  border-radius: 99px;
  transition: width 0.5s ease;
  width: var(--progress, 0%);
}

.plan-progress-labels {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-light);
  margin-bottom: 4px;
  font-weight: 500;
}

.plan-progress-label-left {
  color: var(--cream);
}

.plan-progress-label-right {
  color: var(--text-light);
}

.main-right .plan-progress-fill {
  background: var(--rose-light);
}

.plan-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.plan-date {
  font-size: 11px;
  color: var(--cream);
  opacity: 0.8;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Meals list */
.meals-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  animation: slideUp 0.4s ease 0.1s both;
}

/* Section labels */
.section-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--color-text-light);
  padding: 12px 0 6px;
  margin-top: 8px;
  border-top: 1px solid rgba(26, 58, 42, 0.1);
}

.section-label:first-of-type {
  border-top: none;
  margin-top: 0;
  padding-top: 0;
}

/* Meal row card */
.meal-row {
  background: white;
  border-radius: 18px;
  display: flex;
  box-shadow: 0 2px 8px rgba(26, 58, 42, 0.07);
  border: 1.5px solid transparent;
  transition: all 0.18s;
  animation: slideUp 0.4s ease both;
  position: relative;
  cursor: grab;
}

.meal-row:nth-child(1) { animation-delay: 0.08s; }
.meal-row:nth-child(2) { animation-delay: 0.11s; }
.meal-row:nth-child(3) { animation-delay: 0.14s; }
.meal-row:nth-child(4) { animation-delay: 0.17s; }
.meal-row:nth-child(5) { animation-delay: 0.20s; }
.meal-row:nth-child(6) { animation-delay: 0.23s; }
.meal-row:nth-child(7) { animation-delay: 0.26s; }

.meal-row:hover {
  border-color: rgba(26,58,42,0.07);
  box-shadow: 0 4px 16px rgba(26,58,42,0.09);
}

.meal-row.cooked {
  background: #f7faf8;
  box-shadow: none;
  border-color: rgba(26,58,42,0.06);
}

.meal-row.dragging {
  opacity: 0.4;
  cursor: grabbing;
  box-shadow: none;
  border-color: transparent;
}

.meal-row.drag-over {
  border-color: var(--green-light);
  box-shadow: 0 0 0 3px rgba(61,122,87,0.12);
}

/* Meal row inner flex container */
.meal-row-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
}

/* Meal check (checkbox) */
.meal-check {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 2px solid var(--border);
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.18s;
  font-size: 13px;
  color: transparent;
  cursor: pointer;
}

.meal-row.cooked .meal-check {
  background: var(--green);
  border-color: var(--green);
  color: white;
}

/* Drag handle */
.drag-handle {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 4px 2px;
  flex-shrink: 0;
  opacity: 0.25;
  transition: opacity 0.15s;
  cursor: grab;
}

.drag-handle:active {
  cursor: grabbing;
}

.meal-row:hover .drag-handle {
  opacity: 0.5;
}

.drag-handle span {
  display: block;
  width: 14px;
  height: 1.5px;
  background: var(--text-dark);
  border-radius: 99px;
}

.drag-handle:active {
  cursor: grabbing;
}

.drag-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--color-text-light);
}

.meal-info {
  flex: 1;
  min-width: 0;
}

.meal-name {
  font-family: 'Outfit', sans-serif;
  font-size: 16px;
  font-weight: 500;
  color: var(--green);
  line-height: 1.2;
  transition: color 0.2s;
}

.meal-name a {
  color: var(--green);
  text-decoration: none;
  transition: opacity 0.15s;
}

.meal-name a:hover {
  opacity: 0.8;
}

.meal-name em {
  font-style: italic;
  color: var(--rose);
}

.meal-name .single-word {
  color: var(--green);
  font-style: normal;
}

.meal-name .multi-word em {
  font-style: italic;
  color: var(--rose);
}

.meal-row.cooked .meal-name,
.meal-row.cooked .meal-name-text {
  color: var(--text-light);
  text-decoration: line-through;
  text-decoration-color: var(--text-light);
}

.meal-row.cooked .meal-name em {
  color: var(--text-light);
}

.meal-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 4px;
  margin-bottom: 0px;
}

.meal-meta:empty {
  display: none;
}

/* drag handle */
.drag-handle {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 4px 2px;
  flex-shrink: 0;
  opacity: 0.25;
  transition: opacity 0.15s;
  cursor: grab;
}

.drag-handle:active {
  cursor: grabbing;
}

.meal-row:hover .drag-handle {
  opacity: 0.5;
}

.drag-handle span {
  display: block;
  width: 14px;
  height: 1.5px;
  background: var(--text-dark);
  border-radius: 99px;
}

/* Side dish badge */
.side-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 500;
  background: #fdf4d6;
  color: #8a6200;
  padding: 2px 8px;
  border-radius: 20px;
  border: 1px solid rgba(212,168,67,0.3);
  transition: opacity 0.2s;
}

.side-badge-icon {
  font-size: 10px;
}

.meal-fav {
  font-size: 15px;
  flex-shrink: 0;
  transition: opacity 0.2s;
}

/* Grocery CTA button */
.grocery-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 28px;
  animation: slideUp 0.4s ease 0.3s both;
}

.grocery-cta-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  padding: 16px;
  border-radius: 18px;
  background: var(--color-rose);
  color: var(--color-cream);
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.18s;
  box-shadow: 0 4px 16px rgba(200, 69, 90, 0.25);
}

.grocery-cta-main:hover {
  background: var(--color-rose-light);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(200, 69, 90, 0.35);
}

.grocery-cta-left {
  flex: 1;
  text-align: left;
}

.grocery-cta-eyebrow {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(245, 240, 232, 0.7);
  margin-bottom: 3px;
}

.grocery-cta-title {
  font-family: 'Outfit', sans-serif;
  font-size: 18px;
  font-weight: 500;
  color: var(--color-cream);
  margin: 0;
  margin-bottom: 2px;
}

.grocery-cta-sub {
  font-size: 12px;
  color: rgba(245, 240, 232, 0.8);
  margin: 0;
}

.grocery-cta-icon {
  font-size: 24px;
  color: rgba(245, 240, 232, 0.5);
  flex-shrink: 0;
}

/* Animations */
@keyframes checkPop {
  0% { transform: scale(1); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

@media (max-width: 640px) {
  .meal-plan-view-page {
    padding: 20px 14px 140px;
  }

  .plan-page-title {
    font-size: 26px;
  }

  .meal-row {
    padding: 14px;
    gap: 10px;
  }

  .meal-name-text {
    font-size: 14px;
  }

  .meal-meta-text {
    font-size: 11px;
  }

  .drag-handle {
    display: none;
  }

  .side-badge {
    padding: 3px 8px;
    font-size: 10px;
  }

  .grocery-cta {
    padding: 14px;
    font-size: 13px;
    margin-top: 20px;
  }
}

/* Media Queries for Mobile */
@media (max-width: 640px) {
  .meal-plan-page { padding: 20px 14px 140px; }
  .page-title { font-size: 26px; }
  .form-card { padding: 20px 16px; border-radius: 18px; }
}

/****************************
***** MEAL PLANS PAGE ********
****************************/

/* Page wrapper */
.meal-plans-page .meal-plans-wrapper {
  margin-top: 73px;
  padding: 40px 20px 110px;
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
}

/* Page header */
.meal-plans-page .page-header-meal-plans {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  margin-top: 30px;
  animation: fadeDown 0.4s ease both;
}

.meal-plans-page .page-header-left {}

.meal-plans-page .page-eyebrow {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: 8px;
}

.meal-plans-page .page-title-meal-plans {
  font-family: 'Outfit', sans-serif;
  font-size: 36px;
  font-weight: 500;
  color: var(--green);
  letter-spacing: -0.5px;
  line-height: 1;
}

.meal-plans-page .btn-create {
  display: flex;
  align-items: center;
  gap: 7px;
  width: fit-content;
  padding: 10px 16px;
  border-radius: 24px;
  background: var(--rose);
  border: none;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: white;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 16px rgba(200, 69, 90, 0.3);
  text-decoration: none;
  letter-spacing: 0.2px;
}

.meal-plans-page .btn-create:hover {
  background: var(--rose-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(200, 69, 90, 0.35);
}

/* Search */
.meal-plans-page .search-wrap-meal-plans {
  position: relative;
  margin-bottom: 28px;
  animation: fadeDown 0.4s ease 0.06s both;
}

.meal-plans-page .search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  color: var(--text-light);
  pointer-events: none;
}

.meal-plans-page .search-input-meal-plans {
  width: 100%;
  padding: 13px 18px 13px 44px;
  border: 1.5px solid var(--border);
  border-radius: 16px;
  background: white;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  color: var(--text-dark);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-shadow: 0 1px 4px rgba(26, 58, 42, 0.05);
}

.meal-plans-page .search-input-meal-plans:focus {
  border-color: var(--green-light);
  box-shadow: 0 0 0 3px rgba(61, 122, 87, 0.1);
}

.meal-plans-page .search-input-meal-plans::placeholder {
  color: var(--text-light);
}

/* Plans list */
.meal-plans-page .plans-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Plan card */
.meal-plans-page .plan-card {
  background: white;
  background-clip: padding-box;
  border-radius: 22px;
  padding: 16px 18px 16px 22px;
  box-shadow: 0 2px 6px rgba(26, 58, 42, 0.06), 0 6px 20px rgba(26, 58, 42, 0.05);
  border: 1.5px solid transparent;
  display: block;
  transition: all 0.2s;
  text-decoration: none;
  animation: slideUp 0.45s ease both;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.meal-plans-page .plan-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 5px;
  background: var(--stripe-color, var(--cream-dark));
  transition: background 0.3s ease;
}

.meal-plans-page .plan-card:hover {
  border-color: rgba(26, 58, 42, 0.09);
  box-shadow: 0 6px 24px rgba(26, 58, 42, 0.1);
  transform: translateY(-2px);
}

.meal-plans-page .plan-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.meal-plans-page .plan-card-name {
  font-family: 'Outfit', sans-serif;
  font-size: 21px;
  font-weight: 500;
  color: var(--green);
  margin-bottom: 3px;
  line-height: 1.2;
}

.meal-plans-page .plan-card-name a {
  color: var(--green);
  text-decoration: none;
  transition: opacity 0.15s;
}

.meal-plans-page .plan-card-name a:hover {
  opacity: 0.8;
}

.meal-plans-page .plan-card-meta {
  font-size: 11px;
  color: var(--text-light);
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.meal-plans-page .plan-card-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
  align-items: flex-start;
}

.meal-plans-page .btn-plan-view {
  padding: 7px 15px;
  border-radius: 22px;
  font-size: 12px;
  font-weight: 500;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  transition: all 0.15s;
  border: 1.5px solid var(--border);
  background: var(--bg);
  color: var(--text-mid);
  text-decoration: none;
  display: inline-block;
}

.meal-plans-page .btn-plan-view:hover {
  border-color: var(--green-light);
  color: var(--green);
  background: #f0faf4;
}

.meal-plans-page .btn-plan-delete {
  padding: 7px 12px;
  border-radius: 22px;
  font-size: 12px;
  font-weight: 500;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  transition: all 0.15s;
  border: 1.5px solid transparent;
  background: transparent;
  color: var(--text-light);
}

.meal-plans-page .btn-plan-delete:hover {
  border-color: var(--rose);
  color: var(--rose);
  background: #fdf4f5;
}

.meal-plans-page .add-to-combine-btn {
  padding: 7px 12px;
  border-radius: 22px;
  font-size: 12px;
  font-weight: 500;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  transition: all 0.15s;
  border: 1.5px solid var(--border);
  background: var(--bg);
  color: var(--text-mid);
}

.meal-plans-page .add-to-combine-btn.btn-success {
  background: var(--rose);
  border-color: var(--rose);
  color: white;
}

.meal-plans-page .add-to-combine-btn:hover {
  border-color: var(--green-light);
  color: var(--green);
}

.meal-plans-page .plan-progress {
  margin-top: 10px;
  margin-bottom: 5px;
}

.meal-plans-page .plan-progress-labels {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-light);
  margin-bottom: 4px;
  font-weight: 500;
}

.meal-plans-page .plan-progress-labels .cooked-label {
  color: var(--text-mid);
}

.meal-plans-page .plan-progress-track {
  height: 5px;
  background: var(--cream-dark);
  border-radius: 99px;
  overflow: hidden;
}

.meal-plans-page .plan-progress-fill {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--green-light), var(--green));
  transition: width 0.5s ease;
}

.meal-plans-page .plan-progress-fill.complete {
  background: linear-gradient(90deg, #5aab7a, var(--green-light));
}

/* Combine action buttons */
.meal-plans-page .combine-action-buttons {
  display: flex;
  gap: 10px;
  margin: 20px 0;
  animation: slideUp 0.3s ease both;
}

.meal-plans-page .combine-action-buttons button {
  flex: 1;
  padding: 11px 20px;
  border-radius: 24px;
  border: none;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.meal-plans-page .combine-action-buttons .btn-go {
  background: var(--rose);
  color: white;
  box-shadow: 0 4px 16px rgba(200, 69, 90, 0.3);
}

.meal-plans-page .combine-action-buttons .btn-go:hover {
  background: var(--rose-light);
  box-shadow: 0 8px 20px rgba(200, 69, 90, 0.35);
}

.meal-plans-page .combine-action-buttons .btn-cancel {
  background: var(--bg);
  color: var(--text-mid);
  border: 1.5px solid var(--border);
}

.meal-plans-page .combine-action-buttons .btn-cancel:hover {
  border-color: var(--text-mid);
}

/* Empty state */
.meal-plans-page .empty-state {
  text-align: center;
  padding: 60px 20px;
  animation: fadeDown 0.5s ease 0.1s both;
}

.meal-plans-page .empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.4;
}

.meal-plans-page .empty-title {
  font-family: 'Outfit', sans-serif;
  font-size: 22px;
  color: var(--text-mid);
  margin-bottom: 8px;
}

.meal-plans-page .empty-sub {
  font-size: 14px;
  color: var(--text-light);
}

/* Mobile */
@media (max-width: 640px) {
  .meal-plans-page .meal-plans-wrapper {
    padding: 28px 14px 110px;
  }

  .meal-plans-page .page-title-meal-plans {
    font-size: 30px;
  }

  .meal-plans-page .btn-create {
    display: none;
  }

  .meal-plans-page .btn-plan-view {
    display: none;
  }

  .meal-plans-page .mobile-add-btn {
    display: flex !important;
  }
}
/* ═════════════════════════════════════════════════════════════════ */
/* MEAL PLAN PAGE REDESIGN — SUBTABS & PANELS */
/* ═════════════════════════════════════════════════════════════════ */

/* Subtab bar for switching between meals and groceries */
.subtab-bar {
  display: flex;
  gap: 4px;
  background: white;
  border-radius: 14px;
  padding: 4px;
  margin-bottom: 24px;
  width: fit-content;
  box-shadow: 0 1px 3px rgba(26,58,42,0.07);
  animation: slideUp 0.4s ease 0.08s both;
}

.subtab {
  padding: 9px 22px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  background: transparent;
  color: var(--text-mid);
  font-family: 'DM Sans', sans-serif;
  transition: all 0.18s;
  display: flex;
  align-items: center;
  gap: 7px;
}

.subtab:hover {
  color: var(--green);
}

.subtab.active {
  background: var(--green);
  color: var(--cream);
  box-shadow: 0 2px 8px rgba(26,58,42,0.2);
}

.subtab-count {
  font-size: 11px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 10px;
  background: rgba(255,255,255,0.2);
}

.subtab:not(.active) .subtab-count {
  background: var(--bg);
  color: var(--text-light);
}

/* Panel display/hide logic */
.panel {
  display: none;
}

.panel.active {
  display: block;
}

/* ════════════════════════════════════════════════════════════════ */
/* GROCERY LIST STYLING */
/* ════════════════════════════════════════════════════════════════ */

/* Category jump bar — sticky pills for jumping to categories */
.category-jump {
  position: sticky;
  top: 73px;
  z-index: 50;
  background: rgba(234,244,237,0.95);
  backdrop-filter: blur(10px);
  padding: 10px 0 12px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.category-jump-inner {
  display: flex;
  gap: 6px;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}

.category-jump-inner::-webkit-scrollbar {
  display: none;
}

.jump-pill {
  flex-shrink: 0;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  border: 1.5px solid var(--border);
  background: white;
  color: var(--text-mid);
  cursor: pointer;
  transition: all 0.18s;
  white-space: nowrap;
}

.jump-pill:hover {
  border-color: var(--green-light);
  color: var(--green);
}

.jump-pill.active {
  background: var(--green);
  border-color: var(--green);
  color: var(--cream);
}

/* ════════════════════════════════════════════════════════════════ */
/* GROCERY LIST BANNER */
/* ════════════════════════════════════════════════════════════════ */

.groc-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: white;
  border-radius: 16px;
  padding: 16px 20px;
  margin-bottom: 24px;
  border: 1.5px solid var(--border);
  box-shadow: 0 1px 4px rgba(26,58,42,0.06);
  animation: slideUp 0.35s ease 0.05s both;
}

.groc-banner-text {}

.groc-banner-label {
  font-family: 'Outfit', sans-serif;
  font-size: 15px;
  font-weight: 500;
  color: var(--green);
  margin-bottom: 3px;
}

.groc-banner-sub {
  font-size: 12px;
  color: var(--text-light);
}

.groc-banner-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--green);
  text-decoration: none;
  padding: 9px 16px;
  border-radius: 20px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  transition: all 0.18s;
  white-space: nowrap;
}

.groc-banner-link:hover {
  background: var(--cream-dark);
  border-color: rgba(26,58,42,0.2);
}

.btn-add-to-list {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--cream);
  font-family: 'DM Sans', sans-serif;
  padding: 9px 16px;
  border-radius: 20px;
  background: var(--green);
  border: none;
  cursor: pointer;
  transition: all 0.18s;
  white-space: nowrap;
}

#grocReaddBtn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  background: none;
  color: var(--green);
  border: none;
  text-decoration: underline;
  font-size: 13px;
  font-weight: 500;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  padding: 9px 16px;
  border-radius: 20px;
  transition: all 0.18s;
  white-space: nowrap;
}


.btn-add-to-list:hover {
  background: var(--green-mid);
  transform: translateY(-1px);
}

.btn-add-to-list:disabled {
  background: var(--green-mid);
  cursor: default;
  transform: none;
  box-shadow: none;
  opacity: 0.7;
}

/* ════════════════════════════════════════════════════════════════ */
/* CATEGORY JUMP BAR */
/* ════════════════════════════════════════════════════════════════ */

.cat-jump {
  position: sticky;
  top: 73px;
  z-index: 50;
  background: rgba(234,244,237,0.95);
  backdrop-filter: blur(10px);
  padding: 10px 0 12px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.cat-jump-inner {
  display: flex;
  gap: 6px;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}

.cat-jump-inner::-webkit-scrollbar {
  display: none;
}

/* ════════════════════════════════════════════════════════════════ */
/* GROCERY TOOLBAR - deprecated, kept for backwards compatibility */
/* ════════════════════════════════════════════════════════════════ */

/* Grocery toolbar */
.groc-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.groc-toolbar .stat-pill {
  font-size: 12px;
  font-weight: 500;
  padding: 5px 12px;
  border-radius: 20px;
  background: white;
  color: var(--text-mid);
  border: 1.5px solid var(--border);
  box-shadow: 0 1px 3px rgba(26,58,42,0.05);
  flex: none;
}

.groc-toolbar .stat-pill.checked {
  background: #e8f4ee;
  color: var(--green-mid);
  border-color: rgba(61,122,87,0.15);
}

.btn-groc {
  padding: 7px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  transition: all 0.15s;
  border: 1.5px solid var(--border);
  background: white;
  color: var(--text-mid);
}

.btn-groc:hover {
  border-color: var(--green-light);
  color: var(--green);
}

/* Collapsible grocery categories */
.gcat {
  margin-bottom: 10px;
}

.gcat-hdr {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 14px;
  background: white;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: all 0.18s;
  user-select: none;
  box-shadow: 0 1px 3px rgba(26,58,42,0.05);
}

.gcat-hdr:hover {
  border-color: var(--border);
  background: #fafcfa;
}

.gcat.open .gcat-hdr {
  border-radius: 14px 14px 0 0;
  border-color: var(--border);
  border-bottom-color: transparent;
  box-shadow: none;
}

.gcat-name {
  font-family: 'Outfit', sans-serif;
  font-size: 15px;
  font-weight: 500;
  color: var(--green);
  flex: 1;
}

.gcat-count {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-light);
  background: var(--cream-dark);
  padding: 2px 8px;
  border-radius: 20px;
}

.gcat-chevron {
  font-size: 11px;
  color: var(--text-light);
  transition: transform 0.22s ease;
  margin-left: 4px;
}

.gcat.open .gcat-chevron {
  transform: rotate(180deg);
}

.gcat-preview {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-left: 4px;
  overflow: hidden;
  max-width: 500px;
}

.gcat-preview span {
  font-size: 11px;
  color: var(--text-light);
  font-weight: 500;
  background: var(--bg);
  padding: 2px 8px;
  border-radius: 20px;
}

.gcat.open .gcat-preview {
  display: none;
}

.gcat-body {
  display: none;
  padding: 12px;
  background: white;
  border: 1.5px solid var(--border);
  border-top: none;
  border-radius: 0 0 14px 14px;
  margin-bottom: 2px;
}

.gcat.open .gcat-body {
  display: block;
}

/* Grocery items */
.gi-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  align-items: start;
}

.gi {
  background: var(--bg);
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 13px;
  border: 1.5px solid transparent;
  transition: border-color 0.15s, background 0.15s;
}

.gi:hover {
  background: white;
  border-color: rgba(26,58,42,0.08);
}

.gi-info {
  flex: 1;
  min-width: 0;
}

.gi-name {
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-dark);
  margin-bottom: 2px;
}

.gi-source {
  font-size: 11px;
  color: var(--text-light);
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 1px;
}

.gi-meal {
  display: flex;
  align-items: center;
  gap: 5px;
}

.dots {
  display: flex;
  gap: 3px;
  align-items: center;
  flex-shrink: 0;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green-light);
  flex-shrink: 0;
}

.dot.empty {
  background: transparent;
  border: 1.5px solid rgba(138,170,152,0.4);
}

.qty {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 20px;
  flex-shrink: 0;
}

.qty-smidge {
  background: #fdf6e3;
  color: #9a7020;
  border: 1px solid rgba(212,168,67,0.28);
}

.qty-little {
  background: #e8f4ee;
  color: var(--green-mid);
  border: 1px solid rgba(44,90,64,0.18);
}

.qty-medium {
  background: #d4eadd;
  color: var(--green);
  border: 1px solid rgba(26,58,42,0.2);
}

.qty-lot {
  background: var(--rose);
  color: white;
  border: none;
}

@media (max-width: 640px) {
  .gi-list {
    grid-template-columns: 1fr;
  }
}

/* ════════════════════════════════════════════════════════════════ */
/* BOTTOM NAVIGATION (Mobile) */
/* ════════════════════════════════════════════════════════════════ */

.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(245, 240, 232, 0.92);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  display: flex;
  padding: 10px 0 18px;
  z-index: 100;
}

.bn-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  padding: 0 8px;
  width: 100%;
}

.bn-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  cursor: pointer;
}

.bn-icon {
  font-size: 20px;
}

.bn-label {
  font-size: 10px;
  font-weight: 500;
  color: var(--color-green);
}

.bn-item.active .bn-label {
  color: var(--green);
}

.bn-center {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: -22px;
}

.bn-fab {
  width: 72px;
  height: 72px;
  background: var(--green);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 38px;
  box-shadow: 0 4px 16px rgba(26,58,42,0.35);
  cursor: pointer;
}

/* ════════════════════════════════════════════════════════════════ */
/* MOBILE RESPONSIVENESS FOR MEAL PLAN REDESIGN */
/* ════════════════════════════════════════════════════════════════ */

@media (max-width: 640px) {
  .bottom-nav {
    display: flex;
  }

  .meal-plan-page {
    padding-bottom: 100px;
  }

  .meal-plan-page .page-header {
    flex-direction: column;
  }

  .subtab-bar {
    width: 100%;
  }

  .category-jump {
    top: 60px;
  }
}

/* ════════════════════════════════════════════════════════════════
   MEAL PLAN PAGE - UTILITY STYLES
   ════════════════════════════════════════════════════════════════ */

/* Display utility classes */
.hidden {
  display: none !important;
}

.visible {
  display: flex !important;
}

/* Animation delay utilities for staggered animations */
.delay-1 { animation-delay: 0.05s; }
.delay-2 { animation-delay: 0.1s; }
.delay-3 { animation-delay: 0.12s; }
.delay-4 { animation-delay: 0.15s; }
.delay-5 { animation-delay: 0.2s; }

/* Flex button container */
.groc-banner-buttons {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
}

/* Button states for grocery list */
.btn-add-to-list {
  transition: all 0.3s ease;
}

.btn-add-to-list:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Mobile responsive styles for grocery banner */
@media (max-width: 768px) {
  .groc-banner {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .groc-banner-buttons {
    width: 100%;
    justify-content: flex-start;
  }

  .btn-add-to-list {
    flex: 1;
    min-width: 0;
  }
}

@media (max-width: 480px) {
  .groc-banner {
    padding: 12px;
    margin-bottom: 16px;
  }

  .groc-banner-buttons {
    flex-wrap: wrap;
  }

  .btn-add-to-list {
    padding: 10px 12px;
    font-size: 14px;
  }

  .groc-banner-label {
    font-size: 14px;
  }

  .groc-banner-sub {
    font-size: 12px;
  }
}

/* ── Calories & macros chips (meals list, meal plans, weekly planner) ── */
.macro-chips { display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 4px 10px; margin-top: 8px; font-size: 0.8rem; color: #4a6556; text-align: left; width: 100%; }
.macro-chip { display: inline-flex; align-items: center; gap: 3px; white-space: nowrap; }
.macro-chips-compact { margin-top: 4px; gap: 2px 8px; font-size: 11px; }
.macro-totals { font-size: 12px; line-height: 1.5; margin-top: 6px; padding: 6px 8px; border-radius: 8px; background: #f2f9f4; color: #1a3a2a; text-align: left; }
.macro-totals .mt-head, .macro-totals .mt-row { display: flex; justify-content: space-between; gap: 8px; }
.macro-totals .mt-row i { font-style: normal; opacity: .65; }
.macro-totals .mt-head { flex-wrap: wrap; }
.macro-totals .mt-head b, .macro-totals .mt-head span { white-space: nowrap; }
.macro-totals .mt-gauges { display: flex; flex-wrap: wrap; justify-content: space-around; gap: 6px; margin: 4px 0; }
.macro-totals .mt-gauge { display: flex; flex-direction: column; align-items: center; text-align: center; font-size: 11px; line-height: 1.25; min-width: 0; }
.macro-totals .mt-gauge svg { display: block; }
.macro-totals .mt-gauge-label { white-space: nowrap; }
/* Full-width days (weekly planner): label to the left of each ring, one tidy row */
.macro-totals-wide { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 22px; }
.macro-totals-wide .mt-head, .macro-totals-wide .mt-row { justify-content: flex-start; gap: 8px; }
.macro-totals-wide .mt-gauges { gap: 16px; margin: 0; }
.macro-totals-wide .mt-gauge { flex-direction: row; gap: 4px; }
.macro-totals-wide .mt-gauge-label { font-size: 10px; }
.macro-totals-wide .mt-gauge svg { width: 36px; height: 36px; }
.macro-missing { font-size: 11px; opacity: .6; cursor: help; white-space: nowrap; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Check showing whether a dish counts in its day's totals: green when it does, grey when it doesn't */
.incl-toggle { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; padding: 0; border: 0; background: none; cursor: pointer; color: #b5c4ba; }
.incl-toggle svg { width: 17px; height: 17px; }
.incl-toggle.on { color: #2f8f5b; }
.incl-toggle:hover { opacity: .7; }

/* Narrow day totals (meal plan page): small rings in one row, names in a legend underneath */
.macro-totals:not(.macro-totals-wide) .mt-gauges { flex-wrap: nowrap; gap: 2px; }
.macro-totals:not(.macro-totals-wide) .mt-gauge-label { display: none; }
.macro-totals:not(.macro-totals-wide) .mt-gauge svg { width: 36px; height: 36px; }
.mt-legend { margin-top: 10px; font-size: 11px; line-height: 1.6; color: #4a6556; text-align: center; }
.mt-legend span { white-space: nowrap; margin-left: 6px; }
.mt-legend span:first-child { margin-left: 0; }

/* Macro details on the dark Today box */
.wk-today .macro-chips { color: #d5e6da; }
.wk-today .macro-missing { opacity: .85; }
.incl-toggle:disabled { cursor: default; color: #d3ddd7; opacity: .7; }
.wk-today .incl-toggle:disabled { color: #6f8578; }
/* Home page: the four rings stay on one line, so the day cards are wide enough for them */
.hw-days .macro-totals:not(.macro-totals-wide) .mt-gauges { gap: 0; justify-content: space-between; }

/* Portion picker (0.5x, 1.5x ...) on planned dishes */
.portion-sel { font: inherit; font-size: 11px; padding: 0 1px; height: 22px; border: 1px solid #c3d6c9; border-radius: 6px; background: #fff; color: #1a3a2a; cursor: pointer; }
.portion-sel:disabled { opacity: .4; cursor: default; }
.wk-today .portion-sel { background: rgba(245,240,232,.12); border-color: rgba(245,240,232,.3); color: #f5f0e8; }
.wk-today .portion-sel option { color: #1a3a2a; }
.portion-row { margin-top: 3px; }
/* Phones: day cards are full width, so keep the rings together instead of spread across the card */
@media (max-width: 640px) {
  .hw-days .macro-totals:not(.macro-totals-wide) .mt-gauges { justify-content: flex-start; gap: 18px; }
}

/* Little box around the "not counted in the day total" icon */
.macro-chip.macro-off { padding: 0 6px; border: 1px solid currentColor; border-radius: 6px; background: rgba(176,58,78,.14); line-height: 1.5; }
