/* =============================================================================
   Menu e Pasti — stili
   Solo quanto non coperto da Bootstrap: card dei pasti, badge delle diete,
   stato "variato" e editor delle portate.
   ============================================================================= */

/* Controlli data nella header (allineati a presenze.css) */
.date-controls {
    gap: 0.4rem;
}

/* ---- Card di un pasto nella vista giorno ---- */
.pasto-card {
    border-left: 4px solid #dee2e6;
}
.pasto-card.pianificato   { border-left-color: #198754; }
.pasto-card.variato       { border-left-color: #fd7e14; }
.pasto-card.annullato     { border-left-color: #dc3545; }
.pasto-card.non-pianificato { border-left-color: #dee2e6; }

.pasto-card .pasto-titolo {
    font-size: 1.05rem;
    font-weight: 600;
}

/* Elenco delle portate: numerato, compatto, senza bullet di Bootstrap */
.portate-list {
    list-style: none;
    padding-left: 0;
    margin-bottom: 0;
    counter-reset: portata;
}
.portate-list li {
    counter-increment: portata;
    padding: 0.3rem 0 0.3rem 1.9rem;
    position: relative;
    border-bottom: 1px dashed #eef0f2;
}
.portate-list li:last-child {
    border-bottom: none;
}
.portate-list li::before {
    content: counter(portata);
    position: absolute;
    left: 0;
    top: 0.3rem;
    width: 1.35rem;
    height: 1.35rem;
    line-height: 1.35rem;
    text-align: center;
    font-size: 0.72rem;
    font-weight: 600;
    color: #6c757d;
    background: #f1f3f5;
    border-radius: 50%;
}

/* ---- Badge delle diete coperte da un menu speciale ---- */
.dieta-badge {
    display: inline-block;
    font-size: 0.72rem;
    padding: 2px 8px;
    border-radius: 20px;
    background: #e7f1ff;
    color: #084298;
    border: 1px solid #b6d4fe;
    margin: 1px 2px;
    white-space: nowrap;
}
/* La dieta libera va verificata caso per caso: si distingue a vista. */
.dieta-badge.dieta-altra {
    background: #fff3cd;
    color: #664d03;
    border-color: #ffe69c;
}

/* Ogni menu speciale e' un blocco a se': ha portate e variazione proprie, e un
   separatore rende evidente dove finisce uno e comincia il successivo. */
.menu-speciale-blocco + .menu-speciale-blocco {
    margin-top: 0.85rem;
    padding-top: 0.85rem;
    border-top: 1px dashed #dee2e6;
}

/* ---- Stato "variato" ---- */
.badge-variato {
    background-color: #fd7e14;
    color: #fff;
}
.motivo-variazione {
    font-size: 0.82rem;
    color: #664d03;
    background: #fff3cd;
    border: 1px solid #ffe69c;
    border-radius: 6px;
    padding: 0.35rem 0.6rem;
}

/* Nota sul giorno archiviato: lo storico e' congelato, niente modifiche */
.nota-archiviato {
    font-size: 0.82rem;
    color: #495057;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-left: 3px solid #6c757d;
    border-radius: 4px;
    padding: 0.4rem 0.7rem;
}

/* ---- Griglia della pianificazione settimanale ---- */
.settimana-pasto {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 0.9rem 1rem;
    margin-bottom: 0.85rem;
    background: #fff;
}
.settimana-pasto .pasto-nome {
    font-weight: 600;
    margin-bottom: 0.6rem;
}
.menu-assegnato {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.55rem 0.65rem;
    border-radius: 6px;
    background: #f8f9fa;
    margin-bottom: 0.35rem;
}
.menu-assegnato.tipo-standard { border-left: 3px solid #198754; }
.menu-assegnato.tipo-speciale { border-left: 3px solid #0d6efd; }

/* Pasti che il menu copre davvero: l'assegnazione e' per la giornata intera,
   quindi e' qui che si legge quali pasti sono inclusi. */
.pasti-coperti {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin-top: 0.4rem;
}
.pasto-chip {
    display: inline-flex;
    align-items: center;
    font-size: 0.72rem;
    padding: 0.1rem 0.45rem;
    border-radius: 10px;
    background: #e7f1ff;
    color: #084298;
    white-space: nowrap;
}
.pasto-chip.nessuno {
    background: #fff3cd;
    color: #664d03;
}

/* ---- Editor delle portate (modale) ---- */
.portata-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.4rem;
}
.portata-row .drag-handle {
    color: #adb5bd;
    cursor: default;
    flex-shrink: 0;
}
.portate-editor-pasto {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 0.85rem;
    margin-bottom: 0.85rem;
}
.portate-editor-pasto .pasto-label {
    font-weight: 600;
    font-size: 0.92rem;
    margin-bottom: 0.6rem;
}

/* Il giorno senza apertura non e' pianificabile: lo si dice, non lo si nasconde */
.giorno-chiuso-hint {
    font-size: 0.82rem;
    color: #6c757d;
}
