/* ========== Recipe Cards ========== */
.recipe-card {
    transition: transform 0.15s;
    height: 100%;
}
.recipe-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}
.recipe-card .card-img-top {
    height: 200px;
    object-fit: cover;
}

.macro-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-right: 4px;
}
.macro-kcal { background: rgba(238,155,0,0.15); color: #ffb940; }
.macro-protein { background: rgba(6,214,160,0.12); color: var(--accent); }
.macro-fat { background: rgba(238,155,0,0.12); color: #ee9b00; }
.macro-carbs { background: rgba(92,124,250,0.12); color: var(--blue); }

.daily-dozen-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.75rem;
    background: rgba(6,214,160,0.12);
    color: var(--accent);
    margin: 2px;
}

/* ========== Meal Plan Cards ========== */
.mp-days {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.mp-day-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}
.mp-day-sun {
    background: rgba(238,155,0,0.06);
    border-color: rgba(238,155,0,0.2);
}
.mp-day-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    background: rgba(6,214,160,0.06);
    border-bottom: 1px solid var(--border);
}
.mp-day-sun .mp-day-header {
    background: rgba(238,155,0,0.08);
}
.mp-day-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text);
}
.mp-day-date {
    font-weight: 400;
    color: var(--text-muted);
    font-size: 0.85rem;
}
.mp-day-macros {
    font-size: 0.8rem;
    text-align: right;
}
.mp-slots {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
}
.mp-slot {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 10px 12px;
    border-right: 1px solid var(--border);
    min-height: 60px;
}
.mp-slot:last-child {
    border-right: none;
}
.mp-slot-icon {
    flex-shrink: 0;
    color: var(--accent);
}
.mp-slot-icon .material-symbols-rounded {
    font-size: 20px;
}
.mp-slot-content {
    flex: 1;
    min-width: 0;
}
.mp-slot-label {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--accent);
    margin-bottom: 2px;
}
.mp-slot-recipe {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.mp-slot .meal-select {
    font-size: 0.8rem;
}
.mp-slot .select2-container {
    min-width: 100px !important;
}
.meal-plan-table th { text-align: center; vertical-align: middle; }
.meal-plan-table td { vertical-align: middle; }

.macro-summary {
    font-size: 0.85rem;
    padding: 8px;
    border-radius: 8px;
}
.macro-ok { background: rgba(6,214,160,0.15); }
.macro-warn { background: rgba(238,155,0,0.15); }
.macro-bad { background: rgba(230,57,70,0.15); }

.smoothie-badge {
    background: rgba(6,214,160,0.15);
    color: var(--accent);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.75rem;
}

.week-nav a {
    font-size: 1.1rem;
    text-decoration: none;
}

.ingredient-row { margin-bottom: 5px; }

.target-bar {
    height: 8px;
    border-radius: 4px;
    background: rgba(255,255,255,0.08);
    overflow: hidden;
    margin-top: 4px;
}
.target-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s;
}

.recipe-props {
    gap: 8px;
}
.macro-icon {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
}
.macro-icon .material-symbols-rounded {
    font-size: 18px;
}
.mi-kcal { color: var(--orange); }
.mi-protein { color: var(--accent); }
.mi-fat { color: var(--yellow); }
.mi-carbs { color: var(--blue); }
.icon-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 6px;
}
.icon-label .material-symbols-rounded {
    font-size: 18px;
    color: #fff;
}
.icon-smoothie { background: var(--accent); }
.icon-freezer { background: var(--teal); }

.meal-plan-table .select2-container { min-width: 140px; }

/* ========== Meal cards container ========== */
.meal-cards {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Slot label inside cards */
.card-slot-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--accent);
    margin-bottom: 4px;
}
.card-slot-label .material-symbols-rounded {
    font-size: 20px;
}

/* Cook card (főzős) - large card with details */
.cook-card {
    display: flex;
    flex-direction: row;
}
.cook-card-image {
    width: 280px;
    min-height: 200px;
    flex-shrink: 0;
    overflow: hidden;
}
.cook-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.cook-card-body {
    flex: 1;
    padding: 20px 24px;
    min-width: 0;
}
.cook-card-title {
    font-size: 1.25rem;
    font-weight: 500;
    margin: 0 0 6px;
    color: var(--text);
    letter-spacing: 0.15px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.cook-card-macros {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    margin-bottom: 16px;
    overflow: hidden;
}
.cook-card-section-title {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 12px 0 6px;
}
.cook-card-ingredients {
    list-style: none;
    padding: 0;
    margin: 0 0 12px;
    columns: 2;
    column-gap: 16px;
}
.cook-card-ingredients li {
    font-size: 0.9rem;
    padding: 3px 0;
    color: var(--text);
    break-inside: avoid;
}
.cook-card-ingredients li strong {
    font-weight: 500;
    color: var(--text-secondary);
}
.cook-card-summary {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-secondary);
}
.cook-card-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

/* Eat card (nem főzős) - compact: image left flush, content right */
.eat-card {
    display: flex;
    align-items: stretch;
    padding: 0;
}
.eat-card-image {
    width: 25%;
    min-width: 80px;
    max-width: 140px;
    flex-shrink: 0;
    overflow: hidden;
}
.eat-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.eat-card-content {
    flex: 1;
    min-width: 0;
    padding: 14px 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.eat-card-name {
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--text);
    margin: 0 0 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.eat-card-slot {
    font-size: 0.72rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--accent);
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.eat-card-note {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.eat-card-macros {
    display: flex;
    flex-wrap: nowrap;
    gap: 4px;
    overflow: hidden;
}

/* No meal card */
.no-meal-card {
    padding: 20px 24px;
}
.no-meal-text {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-style: italic;
}

/* "Jump to today" link */
.today-jump {
    text-align: center;
    margin-bottom: 20px;
}
.today-jump a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 6px 16px;
    border-radius: 20px;
    transition: background 0.2s;
}
.today-jump a:hover {
    background: rgba(6,214,160,0.1);
    text-decoration: none;
}

/* Daily totals card */
.daily-totals {
    display: flex;
    justify-content: center;
    gap: 24px;
    padding: 16px;
    margin-bottom: 24px;
    background: rgba(6,214,160,0.08);
    border-radius: 12px;
    border: 1px solid rgba(6,214,160,0.12);
}
.daily-total-item {
    text-align: center;
}
.daily-total-value {
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--text);
}
.daily-total-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Shopping list */
.shopping-card {
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border);
    overflow: hidden;
    margin-top: 32px;
    margin-bottom: 24px;
}
.shopping-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 20px;
    background: rgba(6,214,160,0.08);
    font-size: 1rem;
    font-weight: 500;
    color: var(--text);
}
.shopping-card-header .material-symbols-rounded {
    font-size: 24px;
    color: var(--accent);
}

/* Responsive */
@media (max-width: 767px) {
    .cook-card {
        flex-direction: column;
    }
    .cook-card-image {
        width: 100%;
        min-height: 180px;
        max-height: 220px;
    }
    .cook-card-ingredients {
        columns: 1;
    }
    .daily-totals {
        gap: 12px;
        flex-wrap: wrap;
    }
    .eat-card-image {
        min-width: 70px;
    }
    .eat-card-content {
        padding: 10px 14px;
    }
    .dd-grid {
        grid-template-columns: repeat(5, 1fr);
    }
    .mp-slots {
        grid-template-columns: 1fr;
    }
    .mp-slot {
        border-right: none;
        border-bottom: 1px solid var(--border);
        padding: 8px 12px;
        min-height: auto;
    }
    .mp-slot:last-child {
        border-bottom: none;
    }
    .mp-day-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    .mp-day-macros {
        text-align: left;
    }
    .ws-day-header {
        flex-wrap: wrap;
    }
    .ws-day-kcal {
        margin-left: 0;
    }
}

/* ========== Weekly Summary Cards ========== */
.ws-days {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.ws-day-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}
.ws-day-sun {
    background: rgba(238,155,0,0.06);
    border-color: rgba(238,155,0,0.2);
}
.ws-day-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    background: rgba(6,214,160,0.06);
    border-bottom: 1px solid var(--border);
}
.ws-day-sun .ws-day-header {
    background: rgba(238,155,0,0.08);
}
.ws-day-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text);
    min-width: 32px;
}
.ws-day-date {
    font-weight: 400;
    color: var(--text-muted);
    font-size: 0.85rem;
}
.ws-day-kcal {
    margin-left: auto;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 8px;
}
.ws-day-macros-detail {
    display: flex;
    gap: 6px;
    padding: 6px 16px;
    border-bottom: 1px solid var(--border);
}
.ws-day-meals {
    padding: 8px 16px 10px;
}
.ws-meal-row {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 2px 0;
}
.ws-meal-name {
    font-size: 0.85rem;
    color: var(--text);
}

/* Daily Dozen grid */
.dd-grid {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 8px 4px;
}
.dd-grid-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 8px 4px;
    border-radius: 12px;
    transition: background 0.2s;
    cursor: default;
}
.dd-grid-item:hover {
    background: rgba(255,255,255,0.04);
}

/* DD ring — circular progress around icon */
.dd-ring {
    position: relative;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 6px;
    background: conic-gradient(
        var(--dd-color) calc(var(--dd-pct) * 3.6deg),
        rgba(255,255,255,0.1) calc(var(--dd-pct) * 3.6deg)
    );
}
.dd-ring-inner {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
}
.dd-ring img {
    width: 36px;
    height: 36px;
}
.dd-ring .material-symbols-rounded {
    font-size: 32px;
}
.dd-grid-label {
    font-size: 0.65rem;
    color: var(--text-secondary);
    line-height: 1.2;
    margin-bottom: 2px;
}
.dd-grid-count {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
}

/* ========== Dark Mode Overrides ========== */

[data-theme="dark"] .recipe-card:hover {
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
}
[data-theme="dark"] .dd-ring {
    background: conic-gradient(
        var(--dd-color) calc(var(--dd-pct) * 3.6deg),
        rgba(255,255,255,0.06) calc(var(--dd-pct) * 3.6deg)
    );
}
[data-theme="dark"] .dd-grid-item:hover {
    background: rgba(255,255,255,0.04);
}
[data-theme="dark"] .target-bar {
    background: rgba(255,255,255,0.08);
}
