/* ============================================================
   Pedido de Producto - App CSS
   ============================================================ */

/* ------------------------------------------------------------
   General
   ------------------------------------------------------------ */
body {
    background-color: #f8f9fa;
    font-size: 15px;
}

main.container {
    padding-bottom: 60px;
}

/* ------------------------------------------------------------
   Dias sin pedido - badge coloreado
   ------------------------------------------------------------ */
.dias-badge {
    display: inline-block;
    min-width: 38px;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    color: #fff;
    text-align: center;
    border-radius: 12px;
    white-space: nowrap;
}
.dias-badge.bg-success { background-color: #198754 !important; }
.dias-badge.bg-warning { background-color: #ffc107 !important; color: #333 !important; }
.dias-badge.bg-danger  { background-color: #dc3545 !important; }

/* ------------------------------------------------------------
   Formulario de pedidos
   ------------------------------------------------------------ */
.familia-header {
    background-color: #0d6efd;
    color: #fff;
    padding: 7px 14px;
    border-radius: 6px;
    margin: 18px 0 0 0;
    font-weight: 600;
}

.familia-header .bi {
    margin-right: 6px;
}

.col-header {
    background-color: #e9ecef;
    padding: 6px 0;
    font-weight: 600;
    font-size: 13px;
    border-bottom: 2px solid #dee2e6;
    margin-bottom: 4px;
}

.producto-row {
    padding: 6px 0;
    border-bottom: 1px solid #f0f0f0;
    align-items: center;
}

.producto-row:last-child {
    border-bottom: none;
}

.producto-row:hover {
    background-color: #f9f9f9;
}

/* Input de cantidad: compacto en mobile */
.input-cantidad {
    max-width: 90px;
    text-align: center;
}

/* ------------------------------------------------------------
   Tablas de listados
   ------------------------------------------------------------ */
.table-pedidos th {
    background-color: #0d6efd;
    color: #fff;
    font-weight: 600;
}

.table-pedidos tbody tr:hover {
    background-color: #f0f7ff;
}

/* ------------------------------------------------------------
   Cards de resumen
   ------------------------------------------------------------ */
.card-resumen {
    border-left: 4px solid #0d6efd;
}

/* ------------------------------------------------------------
   Botones de acción flotantes en mobile
   ------------------------------------------------------------ */
@media (max-width: 576px) {
    .btn-accion-fixed {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 1030;
        border-radius: 0;
        padding: 14px;
        font-size: 16px;
    }
}

/* ------------------------------------------------------------
   Estado de horario
   ------------------------------------------------------------ */
.horario-permitido  { color: #198754; font-weight: 600; }
.horario-bloqueado  { color: #dc3545; font-weight: 600; }

/* ------------------------------------------------------------
   Modal de confirmación de pedido
   ------------------------------------------------------------ */
#modalResumen .modal-header {
    background-color: #0d6efd;
    color: #fff;
}

#modalExistente .modal-header {
    background-color: #ffc107;
    color: #333;
}

.resumen-producto {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    border-bottom: 1px solid #dee2e6;
}
.resumen-producto:last-child {
    border-bottom: none;
}
.resumen-cantidad {
    font-weight: 700;
    min-width: 50px;
    text-align: right;
}

/* ------------------------------------------------------------
   ABM - tabla de productos con drag&drop orden
   ------------------------------------------------------------ */
.sortable-row {
    cursor: grab;
}
.sortable-row:active {
    cursor: grabbing;
}
.sortable-row.dragging {
    opacity: 0.5;
    background: #e3f2fd;
}
