/* ==========================================================================
   COMIDA DEL MES - Vista responsive
   Escritorio (>= 992px): tabla
   Movil/Tablet (< 992px): tarjetas por dia (Desayuno, Almuerzo, Cena apilados)
   ========================================================================== */

/* --- Selector de semanas --- */
.comida-semanas {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-wrap: wrap;
}

.comida-semana-btn {
    min-width: 44px;
    border: 1px solid #dee2e6;
    background: #fff;
    color: #495057;
    border-radius: .5rem;
    padding: .4rem .7rem;
    font-weight: 600;
    font-size: .9rem;
    text-decoration: none;
    transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}

.comida-semana-btn:hover,
.comida-semana-btn:focus {
    background: #f1f3f5;
    color: #212529;
}

.comida-semana-btn.activa {
    background: #0d3b66;
    border-color: #0d3b66;
    color: #fff;
}

.comida-nav-btn {
    border: 1px solid #dee2e6;
    background: #fff;
    color: #495057;
    border-radius: .5rem;
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.comida-nav-btn:hover,
.comida-nav-btn:focus {
    background: #f1f3f5;
    color: #212529;
}

.comida-nav-btn:disabled {
    opacity: .4;
    pointer-events: none;
}

/* --- Tarjetas de dia (movil) --- */
.comida-dia-card {
    border: 1px solid #e9ecef;
    border-radius: .75rem;
    margin-bottom: .85rem;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .05);
}

.comida-dia-head {
    background: #0d3b66;
    color: #fff;
    padding: .55rem .9rem;
    font-weight: 600;
    font-size: .95rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
}

.comida-comida {
    padding: .7rem .9rem;
    border-bottom: 1px dashed #eceff1;
}

.comida-comida:last-child {
    border-bottom: 0;
}

.comida-comida__label {
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: #6c757d;
    font-weight: 700;
    margin-bottom: .2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
}

.comida-comida__texto {
    font-size: .92rem;
    color: #212529;
    line-height: 1.45;
}

.comida-preparado {
    display: inline-block;
    background: #e7f1fb;
    color: #0d3b66;
    border: 1px solid #cfe2f7;
    border-radius: 999px;
    padding: .1rem .55rem;
    font-size: .72rem;
    font-weight: 600;
    white-space: nowrap;
}

/* --- Formato de edicion --- */
.comida-input {
    font-size: .88rem;
    border-radius: .45rem;
}

.comida-input:focus {
    border-color: #1d5c96;
    box-shadow: 0 0 0 .2rem rgba(29, 92, 150, .15);
}

.comida-guardar {
    flex: 0 0 auto;
    width: 34px;
    height: 31px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

/* En movil el boton de guardar el dia completo ocupa el ancho */
.comida-guardar-dia {
    width: 100%;
    justify-content: center;
}

/* --- Escritorio: la tabla se muestra limpia --- */
@media (min-width: 992px) {
    .comida-tabla td {
        vertical-align: middle;
    }

    .comida-tabla .comida-input {
        min-width: 190px;
    }
}

/* --- Movil: ajustes de la tabla (oculta) --- */
@media (max-width: 991.98px) {
    .comida-titulo {
        font-size: 1.35rem;
    }
}
