/* ======================
   WEEKLY BUILDER STYLES
   Weekly meal planning wizard
   ====================== */

/* --- Week Grid --- */
.week-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 1024px) {
    .week-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 768px) {
    .week-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .week-grid {
        grid-template-columns: 1fr;
    }
}

/* --- Day Column --- */
.day-column {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 0.75rem;
    min-height: 150px;
    display: flex;
    flex-direction: column;
}

.day-column.today {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 1px var(--color-accent);
}

.day-header {
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--color-border);
}

.day-header h3 {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0;
    color: var(--color-heading);
}

.day-header .day-date {
    font-size: 0.8rem;
    color: var(--color-subtle);
}

/* --- Meal Slot --- */
.meal-slot {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.meal-slot .slot-name {
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--color-subtle);
    margin: 0 0 0.5rem 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* --- Empty Slot --- */
.empty-slot {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 0.5rem;
    background: var(--color-bg);
    border: 1px dashed var(--color-border);
    border-radius: 6px;
    text-align: center;
    min-height: 80px;
}

.btn-add-dish {
    background: transparent;
    border: none;
    color: var(--color-accent);
    cursor: pointer;
    font-size: 0.85rem;
    font-style: italic;
    padding: 0.5rem 1rem;
    width: 100%;
    transition: all 0.2s;
}

.btn-add-dish:hover {
    background: var(--color-accent);
    color: white;
    border-radius: 4px;
    font-style: normal;
}

/* --- Planned Dish --- */
.planned-dish {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 0.75rem;
    background: linear-gradient(135deg,
        color-mix(in srgb, var(--color-accent) 8%, var(--color-card)) 0%,
        color-mix(in srgb, var(--color-accent) 15%, var(--color-card)) 100%);
    border: 1px solid color-mix(in srgb, var(--color-accent) 30%, transparent);
    border-radius: 8px;
    min-height: 80px;
}

.planned-dish .dish-name {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-heading);
    line-height: 1.3;
    flex: 1;
}

.planned-dish .dish-actions {
    margin-top: auto;
    padding-top: 0.5rem;
}

.planned-dish .btn-sm {
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    background: transparent;
    border: 1px solid var(--color-border);
    color: var(--color-subtle);
}

.planned-dish .btn-sm:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
}

/* --- Wizard Header --- */
.wizard-header h1 {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.wizard-header .text-subtle {
    color: var(--color-subtle);
    font-size: 0.9rem;
}

/* --- Wizard Footer --- */
.wizard-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--color-border);
}

.wizard-footer .wizard-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.wizard-footer .save-status {
    font-size: 0.85rem;
    color: var(--color-subtle);
}

.wizard-footer .save-status.saved {
    color: var(--color-accent);
}

@media (max-width: 480px) {
    .wizard-footer {
        flex-direction: column;
        gap: 0.75rem;
    }

    .wizard-footer .btn {
        width: 100%;
        text-align: center;
    }

    .wizard-footer .wizard-actions {
        width: 100%;
        flex-direction: column;
    }

    .wizard-footer .wizard-actions form {
        width: 100%;
    }
}

/* --- Week Picker (Inline Navigation) --- */
.week-picker {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin: 0.75rem 0;
}

.week-nav-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: 50%;
    color: var(--color-text);
    text-decoration: none;
    transition: all 0.15s;
}

.week-nav-btn:hover {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: white;
}

.week-option {
    padding: 0.4rem 0.75rem;
    font-size: 0.9rem;
    color: var(--color-subtle);
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.15s;
}

a.week-option:hover {
    background: var(--color-bg);
    color: var(--color-text);
}

.week-option.current {
    font-weight: 600;
    color: var(--color-heading);
    background: color-mix(in srgb, var(--color-accent) 10%, var(--color-card));
    border: 1px solid var(--color-accent);
}

.week-option.current.this-week {
    background: var(--color-accent);
    color: white;
}

.week-option.current small {
    font-weight: 400;
    font-size: 0.75rem;
    opacity: 0.8;
}

@media (max-width: 600px) {
    .week-picker {
        flex-wrap: wrap;
    }
    .week-option:not(.current) {
        display: none;
    }
}


/* --- Existing Plans --- */
.existing-plans {
    margin-top: 2rem;
}

.plan-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

/* Recent plans - styled like action links */
.recent-plans .plan-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.plan-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.5rem 1rem;
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: 6px;
    text-decoration: none;
    color: var(--color-accent);
    font-size: 0.9rem;
    transition: all 0.15s;
}

.plan-card:hover {
    border-color: var(--color-accent);
    background: color-mix(in srgb, var(--color-accent) 5%, var(--color-card));
}

.plan-card .plan-week {
    font-weight: 500;
}

.plan-card .plan-dishes {
    font-size: 0.75rem;
    color: var(--color-subtle);
}

/* --- Modal Overrides for Weekly Builder --- */
#add-dish-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: var(--color-backdrop);
    align-items: center;
    justify-content: center;
}

#add-dish-modal .modal-content {
    background: var(--color-card);
    border-radius: 12px;
    max-width: 400px;
    width: 90%;
    max-height: 80vh;
    overflow: auto;
}

#add-dish-modal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--color-border);
}

#add-dish-modal .modal-header h2 {
    margin: 0;
    font-size: 1.1rem;
}

#add-dish-modal .modal-close {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--color-subtle);
    line-height: 1;
}

#add-dish-modal .modal-close:hover {
    color: var(--color-text);
}

#add-dish-modal .modal-body {
    padding: 1.25rem;
}

#add-dish-modal .dish-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

#add-dish-modal .option {
    padding: 1rem;
    background: var(--color-bg);
    border-radius: 8px;
}

#add-dish-modal .option h4 {
    margin: 0 0 0.25rem 0;
    font-size: 0.95rem;
}

#add-dish-modal .option p {
    margin: 0 0 0.75rem 0;
    font-size: 0.85rem;
    color: var(--color-subtle);
}

#add-dish-modal .form-select {
    width: 100%;
    padding: 0.5rem;
    margin-bottom: 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    background: var(--color-card);
    color: var(--color-text);
}

/* --- Dish Picker Modal (Three-Tab Design) --- */
.dish-picker-modal {
    max-width: 500px;
    display: flex;
    flex-direction: column;
}

.dish-picker-modal .modal-body {
    padding: 0;
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* --- Modal Tabs --- */
.modal-tabs {
    display: flex;
    border-bottom: 1px solid var(--color-border);
    padding: 0 0.5rem;
    background: var(--color-bg);
}

.tab-btn {
    flex: 1;
    padding: 0.75rem 0.5rem;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-subtle);
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.tab-btn:hover {
    color: var(--color-text);
}

.tab-btn.active {
    color: var(--color-accent);
    border-bottom-color: var(--color-accent);
}

/* --- Tab Panels --- */
.tab-panel {
    display: none;
    padding: 1rem;
    flex: 1;
    overflow-y: auto;
    max-height: 50vh;
}

.tab-panel.active {
    display: block;
}

/* --- Build Option (First Tab) --- */
.build-option {
    text-align: center;
    padding: 2rem 1.5rem;
}

.build-option .option-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: color-mix(in srgb, var(--color-accent) 10%, var(--color-card));
    border-radius: 50%;
    color: var(--color-accent);
}

.build-option h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
    color: var(--color-heading);
}

.build-option p {
    margin: 0 0 1.5rem 0;
    color: var(--color-subtle);
}

/* --- Dish Search --- */
.dish-search {
    margin-bottom: 1rem;
}

.dish-search .form-input {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    background: var(--color-card);
    color: var(--color-text);
    font-size: 0.9rem;
}

.dish-search .form-input:focus {
    outline: none;
    border-color: var(--color-accent);
}

/* --- Dish List --- */
.dish-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.dish-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    background: var(--color-bg);
    border-radius: 6px;
    transition: background-color 0.15s;
}

.dish-item:hover {
    background: color-mix(in srgb, var(--color-accent) 5%, var(--color-bg));
}

.dish-info {
    flex: 1;
    min-width: 0;
}

.dish-title {
    display: block;
    font-weight: 500;
    color: var(--color-heading);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dish-subtitle {
    display: block;
    font-size: 0.8rem;
    color: var(--color-subtle);
    margin-top: 0.15rem;
}

/* --- Loading/Empty/Error States --- */
.loading-text,
.empty-text,
.error-text {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--color-subtle);
    font-size: 0.9rem;
}

.error-text {
    color: var(--color-error, #c53030);
}

/* --- Weekly Selection Mode (on dishes page) --- */
.weekly-select-banner {
    background: var(--color-accent);
    color: white;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    border-radius: 8px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.weekly-select-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.weekly-select-content span {
    font-weight: 500;
}

.weekly-select-content .btn-outline {
    color: white;
    border-color: white;
}

.weekly-select-content .btn-outline:hover {
    background: white;
    color: var(--color-accent);
}

/* Card select action */
.card-selectable {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card-select-action {
    padding: 0.75rem;
    border-top: 1px solid var(--color-border);
    margin-top: auto;
}

.card-select-action .btn-block {
    width: 100%;
}

/* --- Dish Picker Options (Single View) --- */
.dish-picker-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.5rem;
}

.dish-picker-option {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--color-bg);
    border-radius: 8px;
    text-decoration: none;
    color: var(--color-text);
    transition: all 0.15s;
}

.dish-picker-option:hover {
    background: color-mix(in srgb, var(--color-accent) 10%, var(--color-bg));
}

.dish-picker-option .option-text {
    flex: 1;
    min-width: 0;
}

.dish-picker-option .option-text h4 {
    margin: 0;
    font-size: 1rem;
    color: var(--color-heading);
}

.dish-picker-option .option-text p {
    margin: 0.25rem 0 0 0;
    font-size: 0.85rem;
    color: var(--color-subtle);
}

.dish-picker-option .option-arrow {
    font-size: 1.25rem;
    color: var(--color-subtle);
    flex-shrink: 0;
}

.dish-picker-option:hover .option-arrow {
    color: var(--color-accent);
}

/* ======================
   SMART LANDING PAGE
   Context-aware weekly entry
   ====================== */

.weekly-landing {
    max-width: 700px;
    margin: 0 auto;
}

/* --- Header --- */
.weekly-header {
    margin-bottom: 1.5rem;
}

.weekly-header.centered {
    text-align: center;
}

.weekly-header h1 {
    font-size: 1.75rem;
    margin-bottom: 0.25rem;
}

.weekly-header .intro-text {
    color: var(--color-subtle);
    font-size: 1rem;
}

/* --- Today Section (Main Focus) --- */
.today-section {
    margin-bottom: 2rem;
}

.today-label {
    font-size: 1rem;
    font-weight: 500;
    color: var(--color-subtle);
    margin-bottom: 0.75rem;
}

.today-dish-card {
    background: var(--color-card);
    border: 2px solid var(--color-accent);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

@media (min-width: 500px) {
    .today-dish-card {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

.today-dish-card.empty {
    border-color: var(--color-border);
    border-style: dashed;
    text-align: center;
    justify-content: center;
    padding: 2rem;
}

.today-dish-card .dish-info {
    flex: 1;
}

.today-dish-card .dish-title {
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--color-accent);
    margin: 0 0 0.25rem 0;
}

.today-dish-card .dish-components {
    margin: 0;
    font-size: 0.95rem;
}

.today-dish-card .no-dish-text {
    color: var(--color-subtle);
    margin: 0 0 1rem 0;
}

/* --- Week Overview (Day Pills Row) --- */
.week-overview h2 {
    font-size: 1rem;
    font-weight: 500;
    color: var(--color-subtle);
    margin-bottom: 0.75rem;
}

.day-pills-row {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.5rem;
}

@media (max-width: 700px) {
    .day-pills-row {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 450px) {
    .day-pills-row {
        grid-template-columns: repeat(3, 1fr);
    }
}

.day-pill-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.6rem 0.4rem;
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    text-decoration: none;
    color: var(--color-text);
    transition: all 0.15s;
    min-height: 70px;
}

.day-pill-card:hover {
    border-color: var(--color-accent);
    background: color-mix(in srgb, var(--color-accent) 5%, var(--color-card));
}

.day-pill-card.today {
    border-color: var(--color-accent);
    background: color-mix(in srgb, var(--color-accent) 10%, var(--color-card));
}

.day-pill-card.past {
    opacity: 0.6;
}

.day-pill-card.has-dish {
    background: color-mix(in srgb, var(--color-accent) 8%, var(--color-card));
}

.day-pill-card .day-name {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-heading);
    text-transform: uppercase;
}

.day-pill-card .day-date {
    font-size: 0.7rem;
    color: var(--color-subtle);
    margin-bottom: 0.25rem;
}

.day-pill-card .dish-name {
    font-size: 0.7rem;
    color: var(--color-text);
    text-align: center;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.day-pill-card .dish-name.empty {
    color: var(--color-subtle);
}

/* --- Quick Actions --- */
.quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    margin-top: 1.5rem;
}

.action-link {
    padding: 0.5rem 1rem;
    color: var(--color-accent);
    text-decoration: none;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    font-size: 0.9rem;
    transition: all 0.15s;
}

.action-link:hover {
    border-color: var(--color-accent);
    background: color-mix(in srgb, var(--color-accent) 5%, var(--color-card));
}

/* --- Start Planning Section --- */
.start-planning {
    text-align: center;
    padding: 2rem 0;
}

/* --- Empty State Card --- */
.empty-state-card {
    text-align: center;
    padding: 3rem 2rem;
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    max-width: 400px;
    margin: 2rem auto;
}

.empty-state-card h1 {
    font-size: 1.5rem;
    margin: 0 0 0.5rem 0;
    color: var(--color-accent);
}

.empty-state-card p {
    color: var(--color-subtle);
    margin: 0 0 1.5rem 0;
}

.empty-state-card .btn {
    min-width: 200px;
}

/* --- Recent Plans --- */
.recent-plans {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--color-border);
}

.recent-plans h2 {
    font-size: 1rem;
    font-weight: 500;
    color: var(--color-subtle);
    margin-bottom: 0.75rem;
}

/* ======================
   DAILY RECIPE VIEW
   Day-of cooking execution
   ====================== */

/* --- Daily Page Container --- */
.daily-recipe-page {
    max-width: 800px;
    margin: 0 auto;
}

/* --- Weekly Top Navigation --- */
.weekly-top-nav {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.weekly-top-nav .nav-link {
    color: var(--color-accent);
    text-decoration: none;
    font-size: 0.9rem;
}

.weekly-top-nav .nav-link:hover {
    text-decoration: underline;
}

/* --- Day Pills Navigation (Daily View) --- */
.day-pills-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.day-pills-container {
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
    justify-content: center;
}

.day-nav-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--color-card);
    border: 1px solid var(--color-border);
    color: var(--color-text);
    text-decoration: none;
    transition: all 0.15s;
    flex-shrink: 0;
}

.day-nav-arrow:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
}

.day-nav-arrow.disabled {
    opacity: 0.3;
    pointer-events: none;
}

.day-nav-arrow svg {
    width: 20px;
    height: 20px;
}

.day-pills-nav .day-pill {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.5rem 0.75rem;
    min-width: 50px;
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    text-decoration: none;
    color: var(--color-text);
    font-size: 0.8rem;
    transition: all 0.15s;
}

.day-pills-nav .day-pill:hover:not(.empty) {
    border-color: var(--color-accent);
}

.day-pills-nav .day-pill.active {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: white;
}

.day-pills-nav .day-pill.today:not(.active) {
    border-color: var(--color-accent);
}

.day-pills-nav .day-pill.empty {
    opacity: 0.5;
    cursor: default;
}

.day-pills-nav .dish-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--color-accent);
    margin-top: 0.25rem;
}

.day-pills-nav .day-pill.active .dish-dot {
    background: white;
}

@media (max-width: 400px) {
    .day-pills-nav .day-pill {
        padding: 0.4rem 0.5rem;
        min-width: 40px;
        font-size: 0.7rem;
    }

    .day-nav-arrow {
        width: 32px;
        height: 32px;
    }
}

/* Back link below day pills */
.daily-back-link {
    text-align: center;
    margin-top: 0.75rem;
}

.daily-back-link .btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.9rem;
}

.daily-back-link .btn-ghost svg {
    width: 16px;
    height: 16px;
}

/* --- Daily Header --- */
.daily-header {
    text-align: center;
}

.daily-header .week-label {
    margin-bottom: 0.25rem;
}

.daily-header h1 {
    font-size: 1.75rem;
    margin: 0;
}

/* --- Component Recipe Section --- */
.component-recipe {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 1.5rem;
}

.component-recipe-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--color-border);
}

.component-recipe-header h2 {
    margin: 0;
    font-size: 1.25rem;
}

.servings-badge,
.prep-badge {
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    background: var(--color-bg);
}

.prep-badge {
    background: color-mix(in srgb, var(--color-accent) 15%, var(--color-bg));
    color: var(--color-accent);
}

/* --- Recipe Ingredients --- */
.recipe-ingredients {
    margin-bottom: 1.5rem;
}

.recipe-ingredients h3 {
    font-size: 1rem;
    margin-bottom: 0.75rem;
    color: var(--color-heading);
}

/* --- Recipe Steps --- */
.recipe-steps h3 {
    font-size: 1rem;
    margin-bottom: 0.75rem;
    color: var(--color-heading);
}

.recipe-steps .step-note {
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--color-subtle);
}

.recipe-step {
    display: flex;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--color-border);
}

.recipe-step:last-child {
    border-bottom: none;
}

.recipe-step .step-number {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-accent);
    color: white;
    border-radius: 50%;
    font-size: 0.85rem;
    font-weight: 600;
}

.recipe-step .step-content {
    flex: 1;
}

.recipe-step .step-instruction {
    margin: 0;
    line-height: 1.5;
}

.recipe-step .step-time {
    display: inline-block;
    margin-top: 0.25rem;
    font-size: 0.8rem;
    color: var(--color-subtle);
}

/* --- Recipe Actions --- */
.recipe-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
}

/* --- No Dishes Section --- */
.no-dishes-section h1 {
    color: var(--color-heading);
}

/* --- Print Styles --- */
@media print {
    .weekly-top-nav,
    .day-pills-nav,
    .daily-back-link,
    .recipe-actions {
        display: none !important;
    }

    .component-recipe {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}

/* ======================
   PREP REVIEW STYLES
   Component prep selection
   ====================== */

.prep-review {
    max-width: 600px;
    margin: 0 auto;
}

.prep-header {
    text-align: center;
}

.prep-header h1 {
    margin-bottom: 0.25rem;
}

/* --- Opportunity List --- */
.opportunity-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.prep-candidate {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    transition: all 0.15s;
}

.prep-candidate.enabled {
    border-color: var(--color-accent);
    background: color-mix(in srgb, var(--color-accent) 8%, var(--color-card));
}

.prep-candidate .candidate-info h4 {
    margin: 0 0 0.25rem 0;
    font-size: 1rem;
    color: var(--color-heading);
}

.prep-candidate .candidate-info p {
    margin: 0;
    font-size: 0.85rem;
}

.prep-candidate .storage-info {
    margin-top: 0.25rem;
}

/* --- Toggle Prep Checkbox --- */
.toggle-prep {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    flex-shrink: 0;
}

.toggle-prep input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--color-accent);
    cursor: pointer;
}

.toggle-prep .toggle-label {
    font-size: 0.85rem;
    color: var(--color-subtle);
}

.prep-candidate.enabled .toggle-label {
    color: var(--color-accent);
    font-weight: 500;
}

@media (max-width: 480px) {
    .prep-candidate {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .toggle-prep {
        justify-content: flex-end;
    }
}

/* --- Summary Stats --- */
.prep-summary {
    text-align: center;
}

.summary-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.summary-stats .stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.summary-stats .stat-value {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-accent);
}

.summary-stats .stat-label {
    font-size: 0.8rem;
    color: var(--color-subtle);
}

/* --- Empty State --- */
.no-opportunities .empty-state {
    text-align: center;
    padding: 2rem;
    background: var(--color-card);
    border: 1px dashed var(--color-border);
    border-radius: 10px;
}

/* --- Prep Footer --- */
.prep-footer {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--color-border);
}

@media (max-width: 480px) {
    .prep-footer {
        flex-direction: column;
    }

    .prep-footer .btn {
        width: 100%;
        text-align: center;
    }
}

/* ======================
   PREP DAY STYLES
   Prep execution view
   ====================== */

.prep-day-page {
    max-width: 800px;
    margin: 0 auto;
}

.prep-day-header {
    text-align: center;
}

.prep-day-header h1 {
    margin-bottom: 0.25rem;
}

/* --- Prep Batch Cards --- */
.prep-batches {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.prep-batch {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 1.5rem;
}

.batch-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--color-border);
}

.batch-header h2 {
    margin: 0;
    font-size: 1.25rem;
}

.batch-servings,
.batch-usage {
    font-size: 0.8rem;
    padding: 0.2rem 0.5rem;
    background: var(--color-bg);
    border-radius: 4px;
    color: var(--color-subtle);
}

.batch-steps {
    margin-bottom: 1rem;
}

.batch-completion {
    padding-top: 1rem;
    border-top: 1px solid var(--color-border);
}

.batch-completion .completion-text {
    margin: 0;
    font-size: 0.9rem;
    color: var(--color-subtle);
    font-style: italic;
}

@media (max-width: 480px) {
    .prep-batch {
        padding: 1rem;
    }

    .batch-header h2 {
        font-size: 1.1rem;
    }
}

/* --- No Batches State --- */
.no-batches {
    text-align: center;
    padding: 2rem;
    background: var(--color-card);
    border: 1px dashed var(--color-border);
    border-radius: 10px;
}

.no-batches p {
    margin-bottom: 1rem;
}

/* --- Prep Day Footer --- */
.prep-day-footer {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

@media (max-width: 480px) {
    .prep-day-footer {
        flex-direction: column;
    }

    .prep-day-footer .btn {
        width: 100%;
        text-align: center;
    }
}

/* ======================
   SHOPPING LIST STYLES
   Weekly shopping list
   ====================== */

.shopping-list-page {
    max-width: 600px;
    margin: 0 auto;
}

.shopping-header {
    text-align: center;
}

.shopping-header h1 {
    margin-bottom: 0.25rem;
}

/* --- Category Groups --- */
.shopping-categories {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.category-group {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    padding: 1rem 1.25rem;
}

.category-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-accent);
    margin: 0 0 0.75rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--color-border);
}

/* --- Shopping Items --- */
.shopping-items {
    list-style: none;
    margin: 0;
    padding: 0;
}

.shopping-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--color-border);
}

.shopping-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.shopping-item:first-child {
    padding-top: 0;
}

.shopping-item.checked {
    opacity: 0.5;
}

.shopping-item.checked .item-name {
    text-decoration: line-through;
}

/* --- Item Checkbox --- */
.item-checkbox {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    flex: 1;
    min-width: 0;
}

.item-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--color-accent);
    cursor: pointer;
    flex-shrink: 0;
}

.item-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex: 1;
    min-width: 0;
    gap: 0.5rem;
}

.item-name {
    font-weight: 500;
    color: var(--color-heading);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.item-quantity {
    font-size: 0.9rem;
    color: var(--color-text);
    white-space: nowrap;
    flex-shrink: 0;
}

.item-days {
    font-size: 0.75rem;
    white-space: nowrap;
    flex-shrink: 0;
}

/* --- Progress Bar --- */
.shopping-progress {
    text-align: center;
}

.shopping-progress-bar {
    height: 6px;
    background: var(--color-border);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.shopping-progress-bar .progress-fill {
    height: 100%;
    background: var(--color-accent);
    transition: width 0.3s ease;
}

.shopping-progress-text {
    font-size: 0.85rem;
    margin: 0;
}

/* --- Shopping Footer --- */
.shopping-footer {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--color-border);
}

/* --- Empty List --- */
.empty-list {
    text-align: center;
    padding: 2rem;
    background: var(--color-card);
    border: 1px dashed var(--color-border);
    border-radius: 10px;
}

.empty-list p {
    margin-bottom: 1rem;
}

@media (max-width: 480px) {
    .shopping-footer {
        flex-direction: column;
    }

    .shopping-footer .btn {
        width: 100%;
        text-align: center;
    }

    .item-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.15rem;
    }

    .item-days {
        display: none;
    }
}
