/* ===== PEDIDO.PHP SPECIFIC STYLES ===== */

/* Hero Section */
.pedido-hero {
    background: linear-gradient(135deg, #5869fc 0%, #4654d8 100%);
    color: white;
    padding: 40px 0;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(88, 105, 252, 0.2);
}

.pedido-hero h2 {
    font-weight: 600;
    margin-bottom: 15px;
}

.pedido-hero p {
    opacity: 0.9;
    font-size: 1.1rem;
}

/* Main Container */
.pedido-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Action Buttons Section */
.action-buttons {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.btn-volver {
    background: white;
    border: 2px solid #6c757d;
    color: #6c757d;
    border-radius: 25px;
    padding: 10px 25px;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-volver:hover {
    background: #6c757d;
    border-color: #6c757d;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.3);
    text-decoration: none;
}

.btn-cargar {
    background: #5869fc;
    border-color: #5869fc;
    color: white;
    border-radius: 25px;
    padding: 10px 25px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-cargar:hover {
    background: #4654d8;
    border-color: #4654d8;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(88, 105, 252, 0.3);
}

.btn-limpiar-tabla {
    background: white;
    border: 2px solid #ffc107;
    color: #ffc107;
    border-radius: 25px 0 0 25px;
    padding: 10px 20px;
    font-weight: 500;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.btn-limpiar-tabla:hover {
    background: #ffc107;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.3);
}

.btn-vaciar-carrito {
    background: white;
    border: 2px solid #dc3545;
    border-left: 1px solid #dc3545;
    color: #dc3545;
    border-radius: 0 25px 25px 0;
    padding: 10px 20px;
    font-weight: 500;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.btn-vaciar-carrito:hover {
    background: #dc3545;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
}

/* Button group styling */
.btn-group {
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border-radius: 25px;
}

.btn-group .btn:focus {
    box-shadow: none;
}

/* Table Styling */
.pedido-table {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    margin-bottom: 30px;
}

.pedido-table thead {
    background: linear-gradient(135deg, #5869fc 0%, #4654d8 100%);
    color: white;
}

.pedido-table thead th {
    border: none;
    font-weight: 500;
    padding: 15px;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pedido-table tbody tr {
    transition: all 0.3s ease;
    border-bottom: 1px solid #e9ecef;
}

.pedido-table tbody tr:hover {
    background: #f8f9fa;
}

.pedido-table tbody tr:last-child {
    border-bottom: none;
}

.pedido-table td {
    padding: 12px 15px;
    vertical-align: middle;
}

.pedido-table .form-control {
    border-radius: 10px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.pedido-table .form-control:focus {
    border-color: #5869fc;
    box-shadow: 0 0 0 0.2rem rgba(88, 105, 252, 0.25);
}

.row-number {
    background: #5869fc;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.85rem;
}

.product-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 3px;
}

.product-description {
    font-size: 0.8rem;
    color: #6c757d;
    line-height: 1.3;
}

/* Send Button */
.btn-enviar-wrapper {
    position: sticky;
    bottom: 20px;
    background: white;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
    margin-top: 20px;
    z-index: 100;
}

.btn-enviar {
    background: #28a745;
    border-color: #28a745;
    color: white;
    border-radius: 30px;
    padding: 15px 40px;
    font-weight: 600;
    font-size: 1.1rem;
    width: 100%;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-enviar:hover {
    background: #218838;
    border-color: #218838;
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(40, 167, 69, 0.4);
}

.btn-enviar:active {
    transform: translateY(0);
}

.btn-enviar img {
    width: 25px;
    height: 25px;
}

/* Cart Summary */
.cart-summary {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 30px;
    border: 2px solid #e9ecef;
}

.cart-summary-title {
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.cart-summary-title i {
    color: #5869fc;
}

.cart-summary-count {
    font-size: 2rem;
    font-weight: 700;
    color: #5869fc;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 40px;
    color: #6c757d;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.5;
}

/* Loading State */
.loading-state {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    display: none;
    z-index: 1000;
}

/* Floating back button */
.floating-back-btn {
    position: fixed;
    bottom: 100px;
    left: 20px;
    background: #5869fc;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(88, 105, 252, 0.4);
    text-decoration: none;
    transition: all 0.3s ease;
    z-index: 99;
}

.floating-back-btn:hover {
    background: #4654d8;
    color: white;
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(88, 105, 252, 0.5);
    text-decoration: none;
}

.floating-back-btn i {
    font-size: 1.5rem;
}

/* Tooltip for floating button */
.floating-back-btn::before {
    content: "Volver al catálogo";
    position: absolute;
    right: 70px;
    background: #333;
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.floating-back-btn:hover::before {
    opacity: 1;
}

/* Modal Styles */
.modal-header-info {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    color: white;
}

.modal-header-info .close {
    color: white;
    opacity: 0.8;
}

.modal-header-info .close:hover {
    opacity: 1;
}

.modal-content {
    border: none;
    border-radius: 15px;
    overflow: hidden;
}

.modal-body {
    padding: 25px 30px;
}

.modal-footer {
    border-top: 1px solid #e9ecef;
    padding: 15px 30px;
}

/* Confirmation modal specific */
#confirmModal .modal-body {
    font-size: 1.05rem;
    line-height: 1.6;
}

#confirmModal .highlight-number {
    font-weight: 700;
    color: #5869fc;
    font-size: 1.2rem;
}

#confirmModal .warning-text {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 10px;
    padding: 12px 15px;
    margin-top: 15px;
    color: #856404;
    font-size: 0.9rem;
}

#confirmModal .warning-text i {
    color: #f39c12;
    margin-right: 8px;
}

/* Info modal specific */
#infoModal .modal-body {
    padding: 30px;
}

#infoModal .modal-body i {
    font-size: 3rem;
    color: #17a2b8;
    margin-bottom: 15px;
}

/* Toast notification reuse */
.notification-success {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #28a745;
    color: white;
    padding: 15px 25px;
    border-radius: 25px;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
    display: none;
    z-index: 9999;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

/* ===== RESPONSIVE STYLES ===== */
@media (max-width: 768px) {
    .pedido-hero {
        padding: 30px 0;
    }
    
    .pedido-hero h2 {
        font-size: 1.5rem;
    }
    
    .pedido-table {
        font-size: 0.85rem;
    }
    
    .pedido-table thead th {
        padding: 10px 5px;
        font-size: 0.75rem;
    }
    
    .pedido-table td {
        padding: 8px 5px;
    }
    
    .pedido-table .form-control {
        font-size: 0.85rem;
        padding: 5px;
    }
    
    .row-number {
        width: 25px;
        height: 25px;
        font-size: 0.75rem;
    }
    
    .action-buttons {
        padding: 15px;
    }
    
    .btn-cargar {
        padding: 8px 15px;
        font-size: 0.85rem;
    }
    
    .btn-limpiar-tabla, .btn-vaciar-carrito {
        padding: 8px 12px;
        font-size: 0.8rem;
    }
    
    /* Stack button group on mobile */
    .btn-group {
        display: flex;
        flex-direction: column;
        width: 100%;
    }
    
    .btn-limpiar-tabla {
        border-radius: 25px 25px 0 0;
        border-bottom: 1px solid #dee2e6;
    }
    
    .btn-vaciar-carrito {
        border-radius: 0 0 25px 25px;
        border-left: 2px solid #dc3545;
    }
    
    .btn-enviar {
        padding: 12px 25px;
        font-size: 1rem;
    }
    
    /* Stack buttons on mobile */
    .action-buttons .btn {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .action-buttons .btn:last-child {
        margin-bottom: 0;
    }
    
    /* Floating button adjustments */
    .floating-back-btn {
        bottom: 80px;
        width: 50px;
        height: 50px;
    }
    
    .floating-back-btn i {
        font-size: 1.2rem;
    }
    
    .floating-back-btn::before {
        display: none;
    }
}