/* ===== ESTILOS PARA INVENTARIO ===== */
/* Archivo optimizado para mostrar productos agotados correctamente */

/* Modal de confirmación */
#modalConfirmarAccion .modal-dialog {
    display: flex;
    align-items: center;
    min-height: calc(100% - 1rem);
}

@media (min-width: 576px) {
    #modalConfirmarAccion .modal-dialog {
        margin: 1.75rem auto;
    }
}

/* Animación suave para la apertura del modal */
.modal.fade .modal-dialog {
    transform: translate(0, -25px);
    transition: transform 0.3s ease-out;
}

.modal.show .modal-dialog {
    transform: translate(0, 0);
}

/* ===== MEJORAS VISUALES DE LA TABLA ===== */

/* Filas alternadas mejoradas */
.table-striped-custom tbody tr:nth-of-type(odd) {
    background-color: rgba(0, 123, 255, 0.02) !important;
}

.table-striped-custom tbody tr:nth-of-type(even) {
    background-color: rgba(255, 255, 255, 0.8) !important;
}

/* Efectos hover mejorados */
.table-hover tbody tr:hover {
    background-color: rgba(0, 123, 255, 0.08) !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

/* Animación suave para las celdas */
.table tbody td {
    transition: all 0.2s ease;
    border-color: rgba(0, 0, 0, 0.05) !important;
}

/* Mejoras en los badges de stock */
.inventory-status-indicator {
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.inventory-status-indicator:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Estilos para la barra de progreso de stock */
.stock-indicator-container .progress {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

.stock-indicator-container .progress-bar {
    transition: width 0.6s ease;
    border-radius: 10px;
}

/* Animación para las barras de progreso */
@keyframes progressAnimation {
    0% { width: 0%; }
    100% { width: var(--progress-width); }
}

/* Mejoras en los enlaces de productos */
.product-link {
    color: #0d6efd !important;
    transition: all 0.2s ease;
    text-decoration: none !important;
}

.product-link:hover {
    color: #0a58ca !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.product-link:hover .bi-box-arrow-up-right {
    transform: translate(2px, -2px);
    transition: transform 0.2s ease;
}

/* Mejoras en los códigos de barras */
.code-badge {
    position: relative !important;
    transition: all 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.code-badge:hover {
    transform: scale(1.02);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.view-additional-codes {
    transition: all 0.2s ease;
}

.view-additional-codes:hover {
    transform: scale(1.1);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Mejoras en los encabezados */
.table thead th {
    position: relative;
    overflow: hidden;
}

.table thead th::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.table thead th:hover::before {
    left: 100%;
}

/* Tooltips personalizados */
.tooltip-inner {
    background-color: #212529;
    color: white;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 0.875rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Animación de entrada para las filas */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.table tbody tr {
    animation: fadeInUp 0.3s ease forwards;
}

/* Delay progresivo para las filas */
.table tbody tr:nth-child(1) { animation-delay: 0.1s; }
.table tbody tr:nth-child(2) { animation-delay: 0.15s; }
.table tbody tr:nth-child(3) { animation-delay: 0.2s; }
.table tbody tr:nth-child(4) { animation-delay: 0.25s; }
.table tbody tr:nth-child(5) { animation-delay: 0.3s; }

/* Mejoras responsivas */
@media (max-width: 768px) {
    .table-responsive {
        border-radius: 8px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }
    
    .inventory-status-indicator {
        font-size: 0.7rem !important;
        padding: 0.2rem 0.4rem !important;
    }
}

/* Efecto de carga para la tabla */
.table-loading {
    position: relative;
}

.table-loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Animación de pulso para elementos críticos */
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(220, 53, 69, 0); }
    100% { box-shadow: 0 0 0 0 rgba(220, 53, 69, 0); }
}

/* Mejoras adicionales para elementos críticos */
.inventory-status-indicator.bg-danger {
    position: relative;
    overflow: visible;
}

.inventory-status-indicator.bg-danger::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #dc3545, #ff6b7a);
    border-radius: inherit;
    z-index: -1;
    opacity: 0.3;
    animation: pulse 2s infinite;
}

/* ===== ESTILO PARA PRODUCTOS AGOTADOS ===== */
.table tbody tr.stock-zero-row {
    opacity: 0.8 !important;
    background-color: rgba(108, 117, 125, 0.05) !important;
}

.table tbody tr.stock-zero-row:hover {
    opacity: 0.9 !important;
    background-color: rgba(108, 117, 125, 0.1) !important;
}

/* El badge "AGOTADO" se maneja desde el PHP, no desde CSS */

/* Asegurar que el modal de edición rápida esté centrado */
#modalEdicionRapidaStock .modal-dialog {
    display: flex;
    align-items: center;
    min-height: calc(100vh - 1rem);
}

#modalEdicionRapidaStock .modal-content {
    margin: auto;
} 