/* ============================================
   POS STOCK BADGES - ESTILOS
   ============================================ */

.stock-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.75rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    user-select: none;
    /* ✅ No seleccionar texto */
}

/* Stock Bueno (>10 unidades) */
.stock-badge.stock-good {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(5, 150, 105, 0.15));
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

/* Stock Bajo (5-10 unidades) */
.stock-badge.stock-low {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(217, 119, 6, 0.15));
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

/* Stock Crítico (<5 unidades) */
.stock-badge.stock-critical {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(220, 38, 38, 0.15));
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
    animation: pulse-warning 2s infinite;
}

/* Sin Stock */
.stock-badge.stock-empty {
    background: linear-gradient(135deg, rgba(107, 114, 128, 0.15), rgba(75, 85, 99, 0.15));
    color: #6b7280;
    border: 1px solid rgba(107, 114, 128, 0.3);
}

/* Animación de pulso para stock crítico */
@keyframes pulse-warning {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

/* Fila de producto deshabilitada */
.pos-product-row.disabled {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
    pointer-events: none;
}

.pos-product-row.disabled:hover {
    background: transparent !important;
}

/* ============================================
   MEJORAS AL HOVER DE PRODUCTO
   ============================================ */

.pos-product-row {
    transition: all 0.2s ease;
    user-select: none !important;
    /* ✅ EVITAR SELECCIÓN DE TEXTO */
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
}

.pos-product-row * {
    user-select: none !important;
    /* ✅ Aplicar a todos los hijos también */
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
}

.pos-product-row:not(.disabled):hover {
    background: rgba(139, 92, 246, 0.1) !important;
    transform: scale(1.01);
}

.pos-product-row:not(.disabled):hover .stock-badge {
    transform: scale(1.05);
}

/* ✅ PREVENIR SELECCIÓN EN TODA LA TABLA DE PRODUCTOS */
#pos-product-list,
#pos-product-list * {
    user-select: none !important;
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
}

/* Permitir selección solo en inputs si existen */
#pos-product-list input,
#pos-product-list textarea {
    user-select: text !important;
    -webkit-user-select: text !important;
    -moz-user-select: text !important;
    -ms-user-select: text !important;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .stock-badge {
        font-size: 0.75rem;
        padding: 0.3rem 0.6rem;
    }
}