/* Site-level overrides for static deployment (no Ghost) */

/* Font family - match Ghost theme */
body {
    font-family: 'Noto Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Remove Ghost-specific display:none override since we no longer use that wrapper */
/* div[style*="display:none"] rule in mealplan.css handled this in Ghost */

/* Smooth scroll globally */
html {
    scroll-behavior: smooth;
}

/* ======================== Mobile Menu ======================== */

.gh-head {
    padding: 3vmin 4vmin;
    font-size: 1.6rem;
    line-height: 1.3em;
}

.gh-head a {
    color: inherit;
    text-decoration: none;
}

.gh-head-inner {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 2rem;
}

.gh-head-logo img {
    max-height: 60px;
}

.gh-head-menu {
    display: flex;
    justify-content: flex-end;
    gap: 2rem;
}

.gh-head-link {
    font-weight: 600;
    font-size: 1.5rem;
}

.gh-burger {
    display: none;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
}

.gh-burger-box {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 33px;
    height: 33px;
}

.gh-burger-inner {
    width: 100%;
    height: 100%;
}

.gh-burger-box::before,
.gh-burger-inner::before,
.gh-burger-inner::after {
    position: absolute;
    display: block;
    top: 0; left: 0; bottom: 0;
    margin: auto;
    content: '';
    width: 100%;
    height: 2px;
    background: #B83100;
    transition: transform 300ms cubic-bezier(.2,.6,.3,1), width 300ms cubic-bezier(.2,.6,.3,1);
}

.gh-burger-inner::before {
    transform: translateY(-6px);
}
.gh-burger-inner::after {
    transform: translateY(6px);
}

.gh-head-open .gh-burger-box::before {
    width: 0;
    transform: translateX(19px);
}
.gh-head-open .gh-burger-inner::before {
    width: 26px;
    transform: translateX(6px) rotate(135deg);
}
.gh-head-open .gh-burger-inner::after {
    width: 26px;
    transform: translateX(6px) rotate(-135deg);
}

@media (max-width: 768px) {
    .gh-burger {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    .gh-head-inner {
        grid-template-columns: auto auto;
        grid-template-rows: auto auto;
        grid-template-areas: "logo burger" "menu menu";
    }
    .gh-head-brand {
        grid-area: logo;
    }
    .gh-head-burger {
        grid-area: burger;
        justify-self: end;
    }
    .gh-head-menu {
        grid-area: menu;
        display: none;
    }
    .gh-head-logo img {
        max-height: 40px;
    }
    .gh-head-open {
        overflow: hidden;
        height: 100vh;
    }
    .gh-head-open #gh-head {
        position: fixed;
        inset: 0;
        background: #fff;
        overflow-y: auto;
        z-index: 999;
        padding: 3vmin 4vmin;
    }
    .gh-head-open #gh-head .gh-head-inner {
        grid-template-rows: auto 1fr;
    }
    .gh-head-open #gh-head .gh-head-menu {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 1.5rem;
        margin-top: 4rem;
    }
    .gh-head-open .gh-head-link {
        display: inline-block;
        padding: 1.2rem 3rem;
        background: #1D725E;
        color: #fff;
        border-radius: 999px;
        font-size: 2rem;
        font-weight: 600;
        text-decoration: none;
    }
    .gh-head-open .gh-head-link:first-child {
        background: #B83100;
    }
}

/* Ensure viewport fills screen */
html, .gh-viewport {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: #ffffff;
}

.gh-main {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
}

/* Plans hub page styles */
.plans-hub {
    max-width: 900px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

.plans-hub h1 {
    text-align: center;
    color: #B83100;
    font-size: 3.5rem;
    margin-bottom: 0.5rem;
}

.plans-hub .plans-subtitle {
    text-align: center;
    font-size: 1.8rem;
    color: #464646;
    margin-bottom: 3rem;
}

.plans-week-cards {
    display: grid;
    gap: 2rem;
}

.plan-week-card {
    display: block;
    background: #fff;
    border: 2px solid #1D725E;
    border-radius: 12px;
    padding: 2rem;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.plan-week-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.plan-week-card.current {
    border-color: #B83100;
    border-width: 3px;
    position: relative;
}

.plan-week-card.current::before {
    content: "This Week";
    position: absolute;
    top: -12px;
    right: 16px;
    background: #B83100;
    color: #fff;
    font-size: 1.2rem;
    font-weight: 700;
    padding: 2px 12px;
    border-radius: 999px;
}

.plan-week-card h3 {
    font-size: 2.2rem;
    color: #1D725E;
    margin-bottom: 0.8rem;
    text-align: center;
}

.plan-week-card .plan-recipes {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.plan-week-card .plan-recipe-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 1.3rem;
    background: #f8f8f8;
    padding: 0.3rem 0.8rem;
    border-radius: 6px;
    border: 1px solid #eee;
}

.plan-recipe-pill .day-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.day-dot.mo { background: #B83100; }
.day-dot.tu { background: #4682B4; }
.day-dot.we { background: #1D725E; }
.day-dot.th { background: #8A2BE2; }
.day-dot.fr { background: #eaaa05; }

/* Weekly plan page - hub layout */
.week-plan-page {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
}

.week-plan-header {
    text-align: center;
    margin-bottom: 2rem;
}

.week-plan-header h1 {
    color: #B83100;
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.week-plan-header .date-range {
    font-size: 1.6rem;
    color: #888;
}

.week-plan-nav {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.week-plan-nav a {
    color: #1D725E;
    font-weight: 600;
    text-decoration: none;
    font-size: 1.4rem;
}

.week-plan-nav a:hover {
    text-decoration: underline;
}

/* Action cards on weekly plan hub */
.week-actions {
    display: flex;
    justify-content: center;
    margin-bottom: 2.5rem;
}

.week-action-card {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 1rem 2rem;
    border-radius: 10px;
    text-decoration: none;
    color: #fff !important;
    font-weight: 700;
    font-size: 1.6rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.week-action-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.week-action-card.grocery {
    background: #1D725E;
    font-size: 2rem;
}

.week-action-card .action-icon-flip {
    display: inline-block;
    transform: scaleX(-1);
}

.week-action-card span.action-icon {
    font-size: 1.8rem;
}

/* Recipe cards on weekly plan page */
.recipe-cards {
    display: grid;
    gap: 1.2rem;
}

.recipe-card-link {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    background: #fff;
    border-top: 1px solid #ddd;
    border-bottom: 1px solid #ddd;
    border-left: 4px solid var(--day-color, #1D725E);
    border-right: 4px solid var(--day-color, #1D725E);
    border-radius: 10px;
    padding: 1.5rem 1.2rem;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
    transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.recipe-card-link:hover {
    transform: translateX(4px);
    box-shadow: 0 3px 12px rgba(0,0,0,0.1);
}

.recipe-card-day {
    display: inline-block;
    padding: 0.3em 0.8em;
    border-radius: 999px;
    font-weight: bold;
    color: #fff;
    font-size: 1.4rem;
    min-width: 40px;
    text-align: center;
}

.recipe-card-title {
    font-size: 1.7rem;
    font-weight: 600;
}

/* Prev/next week navigation */
.week-plan-prev-next {
    display: flex;
    justify-content: space-between;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #eee;
}

.week-plan-prev-next a {
    color: #1D725E;
    font-weight: 600;
    text-decoration: none;
    font-size: 1.4rem;
}

.week-plan-prev-next a:hover {
    text-decoration: underline;
}

/* Individual recipe page */
.recipe-page {
    max-width: 960px;
    margin: 0 auto;
    padding: 2rem;
}

.recipe-page-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid #f0f0f0;
}

.recipe-page-header .back-link {
    display: block;
    color: #1D725E;
    font-size: 1.4rem;
    text-decoration: none;
    margin-bottom: 0.5rem;
}

.recipe-page-header .back-link:hover {
    text-decoration: underline;
}

.recipe-page-header h1 {
    font-size: 2.8rem;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.recipe-page-header .recipe-day-badge {
    display: inline-block;
    padding: 0.35em 1em;
    border-radius: 999px;
    font-weight: 600;
    color: #fff;
    font-size: 1.8rem;
    margin-top: 1rem;
    margin-bottom: 1rem;
}

.recipe-page-header .prep-cook-time {
    font-size: 1.4rem;
    color: #888;
}

/* Recipe grid: ingredients left, tips right */
.recipe-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    margin-bottom: 3rem;
}

@media (max-width: 700px) {
    .recipe-grid {
        grid-template-columns: 1fr;
    }
}

.ingredients-column h3,
.tips-column h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: #333;
}

/* Ingredient checkboxes */
.ingredient-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ingredient-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid #f5f5f5;
    font-size: 1.5rem;
    cursor: pointer;
    transition: opacity 0.2s;
}

.ingredient-list li:last-child {
    border-bottom: none;
}

.ingredient-list li.struck {
    opacity: 0.4;
    text-decoration: line-through;
}

.ing-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    min-width: 18px;
    margin-top: 2px;
    border: 2px solid #ccc;
    border-radius: 4px;
    transition: all 0.15s ease;
}

.ingredient-list li.struck .ing-check {
    background: #1D725E;
    border-color: #1D725E;
}

.ingredient-list li.struck .ing-check::after {
    content: "✓";
    color: #fff;
    font-size: 12px;
    font-weight: bold;
}

/* Tips sidebar */
.recipe-tips {
    background: #f9f9f7;
    border-radius: 10px;
    padding: 1.5rem;
    border-left: 4px solid #1D725E;
}

.recipe-tips h3 {
    margin-bottom: 1rem;
}

.tips-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tips-list li {
    padding: 0.5rem 0;
    font-size: 1.4rem;
    color: #555;
    border-bottom: 1px solid #eee;
    line-height: 1.5;
}

.tips-list li:last-child {
    border-bottom: none;
}

/* Instructions */
.recipe-instructions {
    margin-top: 1rem;
    padding-top: 2rem;
    border-top: 2px solid #f0f0f0;
}

.recipe-instructions h3 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: #333;
}

.instructions {
    list-style: none;
    padding: 0;
    margin: 0;
    counter-reset: step-counter;
}

.instructions li {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.2rem 0;
    border-bottom: 1px solid #f5f5f5;
    font-size: 1.5rem;
    line-height: 1.6;
    cursor: pointer;
    counter-increment: step-counter;
    transition: opacity 0.2s;
}

.instructions li:last-child {
    border-bottom: none;
}

.instructions li.struck {
    opacity: 0.35;
}

.instructions li.struck .step-text {
    text-decoration: line-through;
}

.step-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #f0f0f0;
    color: #1D725E;
    font-size: 1.3rem;
    font-weight: 700;
    margin-top: 2px;
    transition: all 0.15s ease;
}

.step-check::before {
    content: counter(step-counter);
}

.instructions li.struck .step-check {
    background: #1D725E;
    color: #fff;
}

.instructions li.struck .step-check::before {
    content: "✓";
}

.step-text {
    flex: 1;
}

/* Recipe page nav */
.recipe-page-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 2px solid #f0f0f0;
}

.recipe-nav-prev,
.recipe-nav-next {
    color: #1D725E;
    font-weight: 600;
    text-decoration: none;
    font-size: 1.5rem;
}

.recipe-nav-prev:hover,
.recipe-nav-next:hover {
    text-decoration: underline;
}

/* Standalone grocery list page */
.grocery-page {
    max-width: 860px;
    margin: 0 auto;
    padding: 2rem;
}

.grocery-page-header {
    text-align: center;
    margin-bottom: 2rem;
}

.grocery-page-header .back-link {
    display: inline-block;
    color: #1D725E;
    font-size: 1.4rem;
    text-decoration: none;
    margin-bottom: 1rem;
}

.grocery-page-header h1 {
    color: #B83100;
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

@media (max-width: 768px) {
    .plans-hub h1 {
        font-size: 2.8rem;
    }
    .plan-week-card h3 {
        font-size: 1.8rem;
    }
    .week-action-card {
        font-size: 1.6rem;
        padding: 2rem 1.5rem;
    }
}
