/* Diseño Moderno para Pedidos Para Llevar */

/* Grid Principal */
.pedidos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 24px;
    padding: 24px;
    align-items: start;
}

/* Tabs de Navegación */
.cocina-tabs {
    display: flex;
    gap: 10px;
    padding: 0 32px;
    margin-top: 24px;
    border-bottom: 1px solid var(--gray-200);
}

.tab-btn {
    padding: 12px 24px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    font-size: 15px;
    font-weight: 600;
    color: var(--gray-500);
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-btn:hover {
    color: var(--primary);
    background: var(--gray-50);
    border-radius: 8px 8px 0 0;
}

.tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

/* Tarjeta de Pedido */
.pedido-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

.pedido-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

/* Bordes distintivos por tipo */
.pedido-card.tipo-delivery {
    border-left: 6px solid #2563eb; /* Azul */
}

.pedido-card.tipo-llevar {
    border-left: 6px solid #f97316; /* Naranja */
}

/* Encabezado de Tarjeta */
.pedido-header {
    padding: 16px 24px;
    background: linear-gradient(to right, #ffffff, #f9fafb);
    border-bottom: 1px solid var(--gray-100);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pedido-tipo {
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--gray-700);
}

.pedido-hora {
    font-size: 0.85rem;
    color: var(--gray-400);
    font-weight: 500;
}

/* Cuerpo de Tarjeta */
.pedido-body {
    padding: 24px;
    flex: 1;
}

.cliente-nombre {
    margin: 0 0 16px 0;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--gray-900);
    display: flex;
    align-items: center;
    gap: 10px;
}

.lista-platos {
    list-style: none;
    padding: 0;
    margin: 0;
}

.lista-platos li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px dashed var(--gray-200);
    font-size: 0.95rem;
    color: var(--gray-700);
}

.lista-platos li:last-child {
    border-bottom: none;
}

.cantidad-badge {
    background: var(--gray-100);
    color: var(--gray-800);
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 0.85rem;
    margin-right: 12px;
}

/* Footer de Tarjeta */
.pedido-footer {
    padding: 16px 24px;
    background: var(--gray-50);
    border-top: 1px solid var(--gray-100);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.estado-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.estado-pendiente { background: #fee2e2; color: #991b1b; }
.estado-listo { background: #d1fae5; color: #065f46; }

.total-precio {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--primary);
}

/* Animación de parpadeo para nuevos pedidos */
@keyframes flash-new {
    0%, 100% { transform: scale(1); box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05); }
    50% { transform: scale(1.02); box-shadow: 0 0 0 4px #dbeafe; background-color: #f0f9ff; }
}

.new-order-blink {
    animation: flash-new 1s ease-in-out 3; /* Parpadea 3 veces */
}

/* Estilos para Observaciones y Dirección */
.pedido-observaciones {
    margin-top: 16px;
    padding: 12px;
    background: #fffbeb; /* Amarillo muy suave */
    border-left: 4px solid var(--warning);
    font-size: 0.9rem;
    color: var(--gray-700);
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    line-height: 1.5;
}

.delivery-address {
    margin-top: 16px;
    padding: 12px 16px;
    background: #eff6ff; /* Azul muy claro */
    border-left: 4px solid #3b82f6; /* Borde azul */
    border-radius: 8px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 0.95rem;
    color: #1e3a8a; /* Azul oscuro */
    line-height: 1.5;
}
.delivery-address i {
    font-size: 1.1rem;
    margin-top: 4px;
    color: #3b82f6;
}
.delivery-address-text {
    flex: 1;
    font-weight: 500;
}

/* Estilos del Modal (Reutilizados y adaptados) */
.modal {
    display: none; 
    position: fixed; 
    z-index: 2000; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    overflow: auto; 
    background-color: rgba(0,0,0,0.5); 
    backdrop-filter: blur(4px);
    animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal-content {
    background-color: #fefefe;
    margin: 10% auto; 
    padding: 0;
    border: 1px solid #888;
    width: 90%;
    border-radius: 12px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn { from { transform: translateY(-20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.modal-header {
    padding: 16px 24px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f9fafb;
    border-radius: 12px 12px 0 0;
}

.modal-header h2 { margin: 0; font-size: 1.25rem; color: #1f2937; }

.close-modal {
    color: #9ca3af;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

.close-modal:hover { color: #1f2937; }

.modal-body { padding: 24px; }

/* Botones de Opción de Pedido */
.opciones-pedido {
    display: grid;
    gap: 16px;
}

.btn-opcion {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 20px;
    border: 2px solid transparent;
    border-radius: 12px;
    background: white;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.btn-opcion i { font-size: 1.5rem; }

.btn-opcion.llevar { border-color: #f97316; color: #c2410c; background: #fff7ed; }
.btn-opcion.llevar:hover { background: #ffedd5; transform: translateY(-2px); }

.btn-opcion.delivery { border-color: #2563eb; color: #1d4ed8; background: #eff6ff; }
.btn-opcion.delivery:hover { background: #dbeafe; transform: translateY(-2px); }

@media (min-width: 600px) {
    .opciones-pedido { grid-template-columns: 1fr 1fr; }
    .btn-opcion { flex-direction: column; padding: 30px 20px; }
}

/* Estilos para Toasts (Notificaciones flotantes) */
#toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.toast {
    background: white;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    gap: 10px;
    transform: translateX(120%);
    transition: transform 0.3s ease;
    border-left: 4px solid #3b82f6;
}
.toast.show { transform: translateX(0); }
.toast-success { border-color: #10b981; }
.toast-warning { border-color: #f59e0b; }
.toast-error { border-color: #ef4444; }

/* Estilos Modal Pago */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #374151;
}

.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 1rem;
    box-sizing: border-box;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary, #2563eb);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.pago-info {
    text-align: center;
    margin-bottom: 20px;
    font-size: 1.2rem;
    font-weight: bold;
}

.btn-success {
    background-color: #10b981;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-success:hover {
    background-color: #059669;
}

.cambio-text {
    margin-top: 5px;
    font-weight: 700;
    color: #10b981;
    text-align: right;
}